自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Yvan Jiang的专栏

CS、CV、ML

  • 博客(49)
  • 资源 (23)
  • 收藏
  • 关注

原创 Leetcode Linked List Cycle

Given a linked list, determine if it has a cycle in it.使用两个指针,一前一后,(p,q),p与q相差一个位置,之后p移动一步,q相对应移动两步,如果存在环,那么q和p一定会相遇/** * Definition for singly-linked list. * struct ListNode { * int val;

2015-05-29 22:07:52 350

原创 Leetcode Implement strStr()

Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.class Solution {public: int strStr(string haystack, string need

2015-05-29 09:54:32 274

原创 C++ string类型和char类型转换

在C++常用的字符串对象类string,有很多实用的类成员函数,比如求字符串的长度,查找字符串的子串,字符串连接等等我们使用C语言的一些处理字符串的函数的时候,由于我们使用的是string类对象,所以需要转化一下,由string-->char类型转换这时候需要时候c_str()函数,作用就是实现string-->char的转换。

2015-05-29 09:48:24 648

原创 torch7 install 环境搭建

1、before intallation,you should install node.js,gfx.jsNode.js是一个软件平台,通常用于构建大规模的服务器端应用。Node.js使用JavaScript作为其脚本语言,由于其非阻塞I/O设计以及单线程事件循环机制,使得它可以交付超高的性能。 Node.js包含了Google V8 JavaScript引擎,libuv库和核心

2015-05-27 09:00:39 7330 1

原创 Leetcode Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node./** * Definition for a binary tree

2015-05-26 09:54:35 373

原创 Leetcode Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]杨辉三角的特点class Solutio

2015-05-25 09:49:35 309

原创 从Linux系统拷贝的文本文件到windows下出现乱码

从Linux系统拷贝的文本文件到windows下,用记事本打开的时候出现乱码,但是发现用写字板打开的时候显示正常,很奇怪?之后用写字板打开文件-》另存为,保存类型选择Unicode文本文档,发现再次用记事本打开的时候一切显示正常了。出现这种情况的原因为两种操作系统的中文压缩方式不同,在windows环境中中文压缩一般为gbk,而在linux环境中为utf8,这就导致了在windows下

2015-05-23 19:36:23 2649

原创 Leetcode Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, return 5

2015-05-23 16:43:25 308

原创 Leetcode Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.题意是写一个函数,找到字符串最大相同的前缀。首先以第一个字符串的子串作为参考,依次和其它字符串子串比较,如果相同,则继续,不同则返回上一次的参考子串。class Solution {public: stri

2015-05-23 16:30:17 262

原创 Leetcode Pow(x, n)

Implement pow(x, n).题目是很简单,就是求x的n次方,但是提交的时候很费劲,TLE,超时,主要考虑一些条件问题:1、result 2、x = 1 或者-1的时候,返回值根据n的奇偶情况返回1或者-13、n = 0的情况,返回值1.4、n不能直接累积,肯定会超时,因此要成倍的累积。class Solution {public: double myPo

2015-05-23 09:35:46 273

原创 Leetcode Rotate Array

Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].数组的旋转问题,需要找到每一个位置对应旋转之后的位置,保存为 itoj 数组,然后需要申请

2015-05-22 21:53:44 347

原创 Leetcode Reverse Bits

Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as0011100101

2015-05-22 20:46:24 363

原创 Leetcode Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 000000

2015-05-22 20:21:50 281

原创 Leetcode Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is

2015-05-22 10:46:02 304

原创 Leetcode 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact

2015-05-18 19:49:29 288

原创 Leetcode Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get

2015-05-18 19:47:26 275

原创 Leetcode Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2015-05-18 19:45:05 236

原创 Leetcode Add Binary

Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".二进制数相加,主要是判断进位的问题,如何保存结果,字符如何转化成数字等,要考虑产生进位的情况,求和时要加上进位。class Solution {pub

2015-05-18 19:41:58 261

原创 Leetcode Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.用递归的思想做

2015-05-18 19:40:00 264

原创 Leetcode Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2015-05-18 19:36:38 201

原创 Leetcode Minimum Depth of Binary Tree

/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */clas

2015-05-18 19:34:15 247

原创 Leetcode Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e

2015-05-18 19:28:30 198

原创 Leetcode Count and Say

The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as 

2015-05-18 19:25:25 336

原创 Leetcode Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers

2015-05-18 19:22:53 266

原创 Leetcode Reverse Linked List

Reverse a singly linked list.单链表反序,很简单...class Solution {public: ListNode* reverseList(ListNode* head) { ListNode * H=new ListNode(0); H->next=NULL; ListNode * p=head;

2015-05-18 19:18:37 248

原创 Leetcode Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it t

2015-05-18 19:12:41 223

原创 Leetcode Integer to Roman

Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题目意思:罗马数字转换成数字形式,第一次提交的时候出现超时,class Solution {public: string intToRoman(int n

2015-05-17 19:31:07 241

原创 Leetcode Count Primes

Description:Count the number of prime numbers less than a non-negative number, n题目意思就是统计1~n之间有多少素数。C语言教程中提到一种求素数的方法,如果X不能被2~sqrt(x)之间的数整除,则x是素数,但是这样会出现time limit out,超时,接下来要优化这种方法,就是记录已经找到

2015-05-17 15:06:44 212

原创 Leetcode Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, t

2015-05-17 10:36:26 185

原创 Leetcode Compare Version Numbers

Compare two version numbers version1 and version2.If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.You may assume that the version strings are non-empty and co

2015-05-16 20:38:53 224

原创 Leetcode Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?爬楼梯问题,每一次可以爬1阶或者2阶,问爬上N阶的选择法

2015-05-16 19:03:39 278

原创 linux文件属性及权限修改

Linux文件的基本属性有9个,分别是owner/group/others组别的read/write/ excute属性r:4、w:2、x:1更改文件属性的命令 chmod1)同一组(owner/group/others)的3个属性(r/w/x)是需要累加的,例如当属性为 [-rwxrwx---] 则是:owner = rwx = 4+2+1 = 7group = rwx =

2015-05-16 18:33:07 453

原创 opencv的imread函数无法读取图像

今天在用OpenCV测试程序的时候发现imread函数无法读取图像,而利用C函数cvLoadImage时却能读取到图像。几经考证,发现的确是由于库关联的问题。也就是在Debug模式下应该选择带'd'的lib,在Release模式下就选择不带'd'的lib。而实际我们在配置OpenCV环境的时候往往图方便将Debug和Release的目录都一起加了进去,再修改起来也比较麻烦。所以这时候最简单

2015-05-16 18:28:43 3448

原创 C++中clock()函数的使用

函数声明:clock_t clock( void ); clock_t 是 long 型,typedef long clock_t;clock() 使用的头文件是:time.hCLOCK_PER_SEC表示每一秒经历的时钟数。通常我们用clock_t now = clock(); while(i--);  finish = clock(); seconds = (f

2015-05-16 18:26:24 9523

原创 C++ 读文件为什么最后一个字符会多读一次

一般判断读文件的结束条件 !fin.eof(),当读到文件结束时,fin.eof()并不会立即返回1,所以最后一个字符就多读了一次,如何避免这种情况发生,需要加上一个条件:int main(){ uchar c; ifstream in("2.txt"); while (!in.eof()) { in >> c; if (in.fail()) { break;

2015-05-16 18:23:25 3013

原创 环境变量

环境变量是提供了一个标识,在该标识下对应一个路径,一些应用程序会通过该标识去识别路径下的应用程序执行文件。我们通过 我的电脑(右击)-》属性-》高级-》环境变量 来设置环境变量 Path,多个路径用‘;’隔开。通过命令行下 path命令可以查看当前已经设置的环境变量。

2015-05-16 18:16:33 549

原创 如何将一个C++代码工程转换为matlab的mex文件直接调用呢

1)首先我们要写一个接口函数mexFunction(),这个接口函数就是类似C++的main函数,它是入口函数,传递参数给我们的C++函数。#include "mex.h" //mx函数,mex函数用到的头文件#include "exp.h"//调用函数用到的头文件void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxAr

2015-05-16 17:27:10 2530

原创 如何使用matlab来批处理文件图片格式

1)首先第一步,建立一个matlab脚本文件,要设置处理图片文件的路径,我们使用dir()函数来获取某一个文件夹下的jpg格式的图片的结构体信息 X*X struct array with fields:    name    date    bytes    isdir    datenum2)使用matlab读写图片的函数imread()、imwrite()读写

2015-05-16 17:24:10 858

原创 MATLAB函数库

Matlab函数库Matlab函数库2006-12-01 10:06:03.0A aabs 绝对值、模、字符的ASCII码值acos 反余弦acosh 反双曲余弦acot 反余切acoth 反双曲余切acsc 反余割acsch 反双曲余割align 启动图形对象几何位置排列工具all 所有元素非零为真angle 相角ans 表达式计算结果的缺省变

2015-05-16 17:23:22 1435

原创 将图像分割成以每个像素为中心32*32的区域

DIRPARAM.ORIGIN_IMAGE_DIR = 'E:\background\images';DIRPARAM.RESULT_IMAGE_DIR = 'E:\background\cropimage';fprintf('make a new dir for every image named by imagename\n');im_dir = dir([DIRPARAM.ORIG

2015-05-16 16:03:58 1656 1

基于zlib库实现简单文件及文件夹的压缩解压缩功能

//add file void add_file_to_zip_arrary(std::string file); void add_directory_to_zip_arrary(std::string directory); //zip void run_zip_arrary(const char * dest_zip_path); void run_file_zip(std::string file, const char * dest_zip_path); void run_dest_zip(std::string dest_floder_path, const char * dest_zip_path);

2022-04-28

threadPool.rar

提供c++11线程池实现源码,以及测试示例。适合c++相关的开发者和c++线程池开发者。vs2017下开发,跨平台适用Windows和Linux系统平台。

2021-04-12

shell脚本学习.md

编译型语言的优点是执行速度快、对硬件要求低、保密性好,适合开发操作系统、大型应用程序、数据库等。 脚本语言的优点是使用灵活、部署容易、跨平台性好,非常适合Web开发以及小工具的制作。 Shell 就是一种脚本语言,我们编写完源码后不用编译,直接运行源码即可。

2020-11-20

msdn gdi+文档.pdf

Windows GDI+ is the portion of the Windows XP operating system or Windows Server 2003 operating system that provides two-dimensional vector graphics, imaging, and typography. GDI+ improves on Windows Graphics Device Interface (GDI) (the graphics device interface included with earlier versions of Win

2020-08-31

InjectDllTool.exe

代码参考网上,最后做个小工具可以加载dll并注入到目标进程。64位应用可以导入自己的dll注入到目标进程,实现挂钩,同时可以卸载导入的dll

2020-08-04

GetSoftInfo.rar

windows系统安装的软件在注册表中有记录,路径为:注册表根句柄KEY_LOCAL_MACHINE,路径为"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall",涉及到32位应用和64位应用,如果是64位系统,32位的应用则存放在"Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall",64位应用则存放在"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall",如果是32位系统,只能安装32位应用,存放在"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"

2020-07-09

zstd解压缩库.rar

zstd是Facebook在2016年开源的新无损压缩算法,附件是已编译的32位和64位静态库,头文件有c接口介绍,在vs工程中选择配置属性-c\c++ - 代码生成-运行库-多线程调试/MTd

2020-06-15

transdataexe.rar

此附件是应用程序与驱动交互代码示例,编写了缓冲内存模式和直接内存模式,开发环境vs2017+wdk10,仅供参考,有需要的可以下载学习。

2019-12-10

QNX_Neutrino_RTOS_C_Library_Reference.pdf

附件是qnx c语言库接口说明文档,里面讲解了所有的接口函数,以及参数,使用方法等等,欢迎下载使用。

2019-11-20

libtorrent1.2dll 32 and 64.rar

附件是libtorrent1.2版本编译好的dll和lib文件,以及bt客户端依赖的boost1.7版本库,都是最新版,分别编译了64位和32位,有需要的可以下载使用,文件列表如下: ​ 32位torrent客户端程序 依赖的lib文件:boost_system-vc141-mt-gd-x32-1_70.lib libboost_date_time-vc141-mt-gd-x32-1_70.lib(MD)libboost_date_time-vc141-mt-sgd-x32-1_70.lib(MT) torrent-rasterbar.lib (32) **64位torrent客户端程序** 依赖的lib文件:boost_system-vc141-mt-gd-x64-1_70.lib libboost_date_time-vc141-mt-gd-x64-1_70.lib (MD) libboost_date_time-vc141-mt-sgd-x64-1_70.lib (MT) torrent-rasterbar.lib (64)

2019-07-05

软件注册码生成以及验证方法(duilib界面)

软件注册码生成以及验证, 使用duilib界面库开发的界面,代码讲解如何生成注册码,以及如何验证注册码的正确性,感兴趣的同学可以下载使用demo

2018-09-11

基于tensorflow实现猫狗识别代码(CNN)

通过TensorFlow搭建卷积神经网络实现猫狗识别代码,训练和测试代码完整,下载之后可以直接运行测试打码,运行环境在Linux下,需要把代码中的路径修改为本机实际路径

2018-08-17

卷积神经网络MNIST代码及测试数据

博客:卷积神经网络之手写数字识别应用MNISTCNN https://blog.csdn.net/jiangyingfeng/article/details/81031401 对应的实现代码

2018-07-13

CEdit控件重写类CEditList,输入自动提示匹配内容

CEdit控件重写类CEditList,输入自动提示匹配内容,博客链接https://blog.csdn.net/jiangyingfeng/article/details/80454180

2018-05-25

duilib界面库,库ListCtrl可以添加checkbox

duilib界面库,库ListCtrl可以添加checkbox,可以任意添加各种控件,希望可以帮助别人

2018-01-31

网口通信客户端工具

MFC开发的网口通信工具,有详尽的通信日志记录,希望可以帮助别人,使用过程如果有问题可以提问

2018-01-31

串口通信收发调试工具

自己做的串口通信工工具,希望能够帮助别人,使用过程如果遇到问题可以提问。

2018-01-31

duilib与MFC结合做的软件界面DEMO

网上duilib相关学习资源并不多,希望把自己做的分享出去,这个DEMO是在MFC对话框程序下使用DUILIB界面,工程在VS2005及以上版本都可以编译运行

2018-01-26

串口通信助手工具

设置接收线程,接收串口数据,很好的资源,希望可以帮到学习者

2018-01-26

SkinUI界面库开发

SkinUI界面库开发

2017-04-17

很不错的汇编程序设计,看了你就知道了

很不错的汇编程序设计,看了你就知道了,绝对震惊!!!!!!!!!!!!!!!!!!!!!

2011-05-31

世界编程大赛顶尖作品 看了绝对震撼

世界编程大赛顶尖作品,看了之后你绝对震惊,都是牛人啊!!!!!!!!!!!!

2011-05-31

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除