param

ROS | rosparameter server used in C++

匿名 (未验证) 提交于 2019-12-02 23:56:01
我在写 roslaunch file 的时候,插入了几个参数,其中一个 double 型的参数始终无法利用 rosparam 获取。 ROS官方的教程 Using Parameters in roscpp 并没有解决我的问题。 该laucn file 的逻辑很简单,就是把 role_name 和 detect_range 这两个参数送到 gap_selector 中去使用。然而,我只能获取到 role_name 却始终无法获得 detect_range 的值。 <!-- --> <launch> <arg name = "role_name" default = "hero" /> <arg name = "detect_range" default = "30.0" /> <node pkg = "gap_selector" type = "gap_selector" name = "gap_selector" output = "screen" > <param name = "role_name" value = "$(arg role_name)" /> <param name = "detect_range" value = "$(arg detect_range)" /> </node> </launch> 而同样的逻辑在 python 的文件里却没有问题,唯独在 C+

HttpPostUtil工具类

匿名 (未验证) 提交于 2019-12-02 23:49:02
package com.okni.okpool.okfinance.util; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.MultiFormatWriter; import com.google.zxing.WriterException; import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods

应用程序的缓存模块

匿名 (未验证) 提交于 2019-12-02 23:47:01
1、模块的生命周期定义 添加AddMemoryCache(),AddDistributedMemoryCache() 注册泛型的服务为单例。缓存的类型为class slidingExpiration:用于设置可调过期时间,它表示当离最后访问超过某个时间段(20分钟)后就过期 [DependsOn( typeof(AbpThreadingModule), typeof(AbpSerializationModule), typeof(AbpMultiTenancyModule), typeof(AbpJsonModule))] public class AbpCachingModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { context.Services.AddMemoryCache(); context.Services.AddDistributedMemoryCache(); context.Services.AddSingleton(typeof(IDistributedCache<>), typeof(DistributedCache<>)); context.Services.Configure<CacheOptions>

String indexOf 算法

匿名 (未验证) 提交于 2019-12-02 23:43:01
2019独角兽企业重金招聘Python工程师标准>>> /** * Code shared by String and StringBuffer to do searches. The * source is the character array being searched, and the target * is the string being searched for. * * @param source the characters being searched. * @param sourceOffset offset of the source string. * @param sourceCount count of the source string. * @param target the characters being searched for. * @param targetOffset offset of the target string. * @param targetCount count of the target string. * @param fromIndex the index to begin searching from. */ static int indexOf(char[] source, int sourceOffset,

CAD与用户互在图面上得到一个矩形框(com接口VB语言)

匿名 (未验证) 提交于 2019-12-02 23:41:02
主要用到函数说明: MxDrawXCustomFunction::ExApp_CutDwg 与用户互在图面上得到一个矩形框,详细说明如下: 参数 说明 IN DOUBLE dX1 保存范围的左下角位置X值 IN DOUBLE IN dY1 保存范围的左下角位置Y值 IN DOUBLE dX2 保存范围的右上角位置X值 IN DOUBLE IN dY2 保存范围的右上角位置Y值 sFile 保存的文件名 主要用到函数说明: MxDrawXCustomFunction::Mx_GetCorner 与用户互在图面上得到一个矩形框,详细说明如下: 参数 说明 IN DOUBLE dX1 矩形框的左下角位置X值 IN DOUBLE IN dY1 矩形框的左下角位置Y值 DOUBLE IN dZ1 矩形框的左下角位置Z值 IN LPCTSTR pszPrompt 命令行提示,可以为空 OUT DOUBLE dX2 返回得到的点X值 OUT DOUBLE OUT dY2 返回得到的点Y值 DOUBLE OUT dZ2 返回得到的点Z值 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Set mxUtility = New MxDrawXLib.MxDrawUtility Dim getPt As

析构函数 实例析构 类析构

匿名 (未验证) 提交于 2019-12-02 23:40:02
#!python# -*- coding:utf-8 -*-# 场景:# 目的:通过单例实现客户端调用sdk时,sdk中的方法对客户端数据的批处理# 参考:# {# Python单例模式(Singleton)的N种实现 - 知乎# https://zhuanlan.zhihu.com/p/37534850# 设计模式(Python)-单例模式 - 简书# https://www.jianshu.com/p/ec6589e02e2f# http://xiaorui.cc/2016/04/10/python多线程下保持单例模式的实例唯一/# PythonDecoratorLibrary - Python Wiki# https://wiki.python.org/moin/PythonDecoratorLibrary# 3. Data model ― Python 3.7.3 documentation# https://docs.python.org/3/reference/datamodel.html#object.__new__# 8.10. Queue ― A synchronized queue class ― Python 2.7.16 documentation# https://docs.python.org/2/library/queue.html# The

后台对Json数据加密、解密

匿名 (未验证) 提交于 2019-12-02 23:40:02
1、工具类 package com.abc.er.util; import org.apache.commons.codec.binary.Base64; import javax.crypto.*; import javax.crypto.spec.SecretKeySpec; import java.security.SecureRandom; public class AesUtil { public static void main(String[] args) throws Exception { // aes + base --> aes + base String content = "{\"mac\":\"123\",\"idfa\":\"123\",\"clientIp\":\"456\",insertTime\":\"test\"}"; System.out.println("加密内容:" + content); String key = "123abc"; System.out.println("加密密钥和解密密钥:" + key); String encrypt = aesEncrypt(content, key); System.out.println("加密后:" +encrypt); String decrypt = aesDecrypt

吴恩达第一课第二周编程作业

匿名 (未验证) 提交于 2019-12-02 23:35:02
本次 作业是完成 一个“识别猫”的神经网络网络搭建。 源代码: import numpy as np import matplotlib.pyplot as plt from lr_utils import load_dataset train_set_x_orig, train_set_y, test_set_x_orig, test_set_y, classes = load_dataset() m_train = train_set_y.shape[1] m_test = test_set_y.shape[1] num_px = train_set_x_orig[1] # 降维 train_set_x_flatten = train_set_x_orig.reshape(train_set_x_orig.shape[0], -1).T test_set_x_flatten = test_set_x_orig.reshape(test_set_x_orig.shape[0], -1).T # 标准化数据,让数据在【0,1】之间 train_set_x = train_set_x_flatten / 255 test_set_x = test_set_x_flatten / 255 # 建立神经网络的主要步骤是: # 1. 定义模型结构(例如输入特征的数量) # 2.

asp.net执行SqlServer存储过程!(详解!)

匿名 (未验证) 提交于 2019-12-02 23:32:01
原文: https://www.cnblogs.com/accumulater/p/6255305.html ASP.NET执行存储过程 一. 执行一个没有参数的存储过程的代码如下: connectionString为连接字符串 SqlConnection conn=new SqlConnection(connectionString); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand(); da.SelectCommand.Connection = conn; //myProc存储过程的名字 da.SelectCommand.CommandText = “myProc”; da.SelectCommand.CommandType = CommandType.StoredProcedure; 二. 执行一个有参数的存储过程的代码如下 SqlConnection conn=new SqlConnection(connectionString); SqlDataAdapter da = new SqlDataAdapter(); da.selectCommand = new SqlCommand(); da.selectCommand.Connection = conn; da

RocketMQ的使用

匿名 (未验证) 提交于 2019-12-02 23:32:01
1.如何发布? 1.1.业务层调用发送mq消息方法 asyncService.sendAliMqttMsg(); //相关配置 public static final String TOPIC_TEST = "qbkj_test_mqtt" ; public static final String TOPIC_QUEUE = "qbkj_queue_mqtt" ; public static final String TOPIC_OBSERVE = "qbkj_observe_mqtt" ; /** 排号类型-登记台 */ public static final String QUEUE_TYPE_REG = "1" ; /** 排号类型-接种台 */ public static final String QUEUE_TYPE_INJECT = "2" ; //TODO:登记台叫号 Map < String , Object > param = new HashMap < String , Object >(); param . put ( "type" , WebSocket . QUEUE_TYPE_REG ); param . put ( "reg" , callList ); param . put ( "queueno" , bsRegQueue . getQueue (