- 博客(22)
- 问答 (1)
- 收藏
- 关注
原创 C#:Find
实例化一个集合List userCollection = new List();userCollection.Add(new User(1, “testOne”));userCollection.Add(new User(2, “testTwo”));userCollection.Add(new User(3, “testThree”));方法一User resultUser = userCollection.Find(delegate(User user){return user.Use
2021-04-20 19:42:55
2074
原创 C#:时间
时间格式:有时候我们要对时间进行转换,达到不同的显示效果 默认格式为:2005-6-6 14:33:34 如果要换成成200506,06-2005,2005-6-6或更多的该怎么办呢?我们要用到:DateTime.ToString的方法(String, IFormatProvider) using System; using System.Globalization;String format="D"; DateTime date=DataTime,Now;
2021-02-02 11:28:10
205
转载 C#:List<string[]>使用Add方法覆盖数据问题
最近码墙时发现了一个很有意思的问题,定义一个引用对象,如果在循环外面定义对象,在循环里list.add(对象),最后的结果却是所有的对象值都是一样的,即每add一次,都会把之前所有的数据覆盖掉,蛮有趣的,在网上轻松的搜到了答案,把对象在循环里new就行了,问题虽然解决了,但感觉这里面包含了一些.net底层存储的知识,有关于引用类型和值类型的存储方式问题,写了个demo总结了一下,水平,有大牛发现demo中有不足之处还请指正。 如下面两图:图1:在外面定义对象a,调试界面中可以看到,i=4时,之前l
2021-01-29 11:12:04
3428
1
原创 C#:添加COM引用方式读取Excel
新建Win32 Console Application (C#),添加COM引用Microsoft Office Excel 15.0 Object Library (Office 2013对应版本15.0)完整示例代码如下using System;using Microsoft.Office; // Add new referencenamespace ExcelReader{ class Program { static void Main(string
2021-01-28 13:44:14
718
原创 C#:常用数值范围汇总
short.MaxValue 32767short.MinValue -32768int.MaxValue 2147483647int.MinValue -2147483648long.MaxValue 9223372036854775807long.MinValue -9223372036854775808float.Epsilon 1.401298E-45float.MaxValue 3.402823E+38float.MinValue -3.402823E+38float.NaN 非
2021-01-20 15:25:00
520
原创 C#:获取时间
--DateTime 数字型System.DateTime currentTime=new System.DateTime();1.1 取当前年月日时分秒currentTime=System.DateTime.Now;1.2 取当前年int 年=currentTime.Year;1.3 取当前月int 月=currentTime.Month;1.4 取当前日int 日=currentTime.Day;1.5 取当前时int 时=currentTime.Hour;1.6 取当前分in
2021-01-07 11:27:19
200
原创 caffe: 训练自己的数据集
https://blog.youkuaiyun.com/sst___/article/details/79847697
2019-08-01 10:26:44
180
原创 caffe:对数据集进行test
https://blog.youkuaiyun.com/kkk584520/article/details/41694301
2019-08-01 10:23:56
411
原创 jetson-tx2主机与开发板环境配置
主机环境配置:Ubuntu16.04+CUDA9.0+cuDNN+OpenCV+caffe+DIGITS开发板环境配置:Ubuntu16.04+CUDA9.0+cuDNN参考博客:https://blog.youkuaiyun.com/cherry_dr/article/details/80134372,官方流程:https://github.com/dusty-nv/jetson-inference...
2019-07-06 15:05:22
587
原创 双系统安装 Win7 + Ubuntu16.04
从Ubuntu官网https://www.ubuntu.com/download/server下载系统的iso镜像文件 。格式化你的U盘,格式化的时候选择FAT32格式的。从网上https://cn.ultraiso.net/xiazai.html下载UltraISO软件安装,选择“继续试用”打开软件。点击下图中文件图标,将刚才下载的镜像文件选择。选中后如下图所示界面:接着进行如下...
2019-07-06 14:34:09
443
转载 嵌入式stm32学习:SPI-读写串行FLASH
bsp_spi_flash.h#ifndef __SPI_FLASH_H#define __SPI_FLASH_H#include "stm32f4xx.h"#include <stdio.h>/* Private typedef -----------------------------------------------------------*///#def...
2018-09-11 18:09:58
1706
转载 嵌入式STM32学习:I2C-读写EEPROM2
bsp_i2c_ee.h#ifndef __I2C_EE_H#define __I2C_EE_H#include "stm32f4xx.h"/* AT24C01/02每页有8个字节 */#define I2C_PageSize 8/* AT24C04/08A/16A每页有16个字节 *///#define I2C_PageSize ...
2018-09-11 15:13:26
711
原创 嵌入式stm32学习:I2C-读写EEPROM
bsp_i2c_gpio.h#ifndef _BSP_I2C_GPIO_H#define _BSP_I2C_GPIO_H#include "stm32f4xx.h"#include <inttypes.h>#define EEPROM_I2C_WR 0 /* 写控制bit */#define EEPROM_I2C_RD 1 /* ...
2018-09-08 16:46:45
1216
原创 嵌入式stm32学习:DMA-存储到外设
bsp_usart_dma.h#ifndef __USART_DMA_H#define __USART_DMA_H#include "stm32f4xx.h"#include <stdio.h>//USART#define DEBUG_USART USART1#define DEBUG_USART_CLK ...
2018-09-08 15:21:26
767
原创 嵌入式stm32学习:DMA-存储到存储
main.c#include "stm32f4xx.h"#include "./led/bsp_led.h"/* 相关宏定义,使用存储器到存储器模式必须使用DMA2 */#define DMA_STREAM DMA2_Stream0#define DMA_CHANNEL DMA_Channel_0#define DMA_STRE...
2018-09-08 12:00:19
1552
原创 嵌入式stm32学习:USART串口通信
bsp_debug_usart.h#ifndef __DEBUG_USART_H#define __DEBUG_USART_H#include "stm32f4xx.h"#include <stdio.h>//引脚定义/*******************************************************/#define DEBUG_USA...
2018-09-08 10:27:08
2505
原创 嵌入式stm32学习:系统定时器
bsp_SysTick.h#ifndef __SYSTICK_H#define __SYSTICK_H#include "stm32f4xx.h"void SysTick_Init(void); //定义初始化函数void Delay_us(__IO u32 nTime); //单位10us//#define Delay_ms(x) Delay_us(...
2018-09-08 09:14:33
257
原创 嵌入式stm32学习:外部中断
#ifndef __EXTI_H#define __EXTI_H#include "stm32f4xx.h"//引脚定义/*******************************************************/#define KEY1_INT_GPIO_PORT GPIOA#define KEY1_INT_GPIO_CLK ...
2018-09-08 08:38:04
696
原创 嵌入式-stm32学习:位带操作
// GPIO 位操作#include "stm32f4xx.h"// 这里只定义了GPIO ODR和IDR这两个寄存器的位带别名区地址,其他寄存器没有定义//SRAM 位带区: 0X2000 0000~0X200F 0000//SRAM 位带别名区: 0X2200 0000~0X23FF FFFF//外设位带区: 0X4000 0000~0X400F ...
2018-09-07 16:20:12
807
原创 嵌入式-stm32学习:按键检测
bsp_key.h#ifndef __KEY_H#define __KEY_H#include &quot;stm32f4xx.h&quot;//引脚定义/*******************************************************/#define KEY1_PIN GPIO_Pin_0 //GPIO引脚号...
2018-09-07 15:38:24
6722
原创 嵌入式-stm32学习:使用固件库点亮LED
LED与GPIO连接通用头文件bsp_led.h#ifndef __LED_H#define __LED_H#include "stm32f4xx.h"//引脚定义/*******************************************************///红色灯 R#define LED1_PIN GPIO_Pin...
2018-09-07 15:06:18
1795
1
空空如也
DIGITS 测试报错:无法加载模型
2019-07-03
TA创建的收藏夹 TA关注的收藏夹
TA关注的人