自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(58)
  • 资源 (3)
  • 收藏
  • 关注

原创 leetcode 题解目录

leetcode 083 Remove Duplicates from Sorted List(难易度:Easy)leetcode 169 Majority Element(难易度:Easy)leetcode 217 Contains Duplicate(难易度:Easy)leetcode 226 Invert Binary Tree(难易度:Easy)

2015-09-06 11:53:27 242

原创 Flutter 图表插件 fl_chart 使用研究(二)

在上一篇博文中 ,我们用fl_chart插件画出了一个最简单的两条曲线的折线图,下面再说以下其余的参数的含义。回顾以下上一篇结尾的代码:return LineChart( LineChartData( lineBarsData: [ LineChartBarData( spots: spots1, ), LineChartBarData( spots: spots

2020-09-18 21:59:24 2275 1

原创 Flutter 图表插件 fl_chart 使用研究(一)

Flutter 图表插件 fl_chart 使用研究(以Line chart 为例子)LineChart( LineChartData( // 大部分属性都在这里面写 ),);看LineChart的源码,发现LineChart构造函数还有一个命名参数:swapAnimationDuration,猜测是控制动画的时间间隔,默认是150毫秒,也就是说,fl_chart默认支持动画。进入LineChartData类中,其构造函数的参数较多,其中,最重要的一个,也就是我们放数据的地.

2020-09-18 16:34:59 6835

转载 WM_INITDIALOG与WM_CREATE消息的区别

WM_CREATE是所有窗口都能响应的消息,表明本窗口已经创建完毕(可以安全的使用这个窗口了,例如在它上面画控件等)。在响应WM_CREATE消息响应函数的时候,对话框及子控件还未创建完成,亦是说只是通知系统说要开始创建窗口啦,这个消息响应完之后,对话框和子控件才开始创建。因此在此消息响应函数中无法对控件进行修改和初始化。        WM_INITDIALOG消息是对话框才能收到的消息

2016-07-15 13:22:33 607

转载 Vc中自定义消息及其触发使用

Vc中自定义消息及其触发使用 如何在VC++中加入自定义消息,我的做法:这里我以一个对话框为例子,环境:VS 2008,新建一个工程,选择对话框:以编译器给出的对话框为蓝本,自己新建一个按钮如图:把名字改成如图的,其他比如ID什么的都不改了,默认。1 首先在ownermessageDlg.h中定义消息:例如define WM_MYMESSAGE (WM_USER

2016-06-16 10:58:05 345

转载 Combo Box(组合框)控件使用总结

Combo Box(组合框)控件很简单,可以节省空间。从用户角度来看,这个控件是由一个文本输入控件和一个下拉菜单组成的。用户可以从一个预先定义的列表里选择一个选项,同时也可以直接在文本框里面输入文本。1.改变下拉框大小  1)直接在控件上操作,先点向下的箭头,就可以调整下拉框大小;  2)为了让列表框变的更宽,可以用setdroppedwidth(int width)函数来调整列表框的

2016-05-25 16:22:58 4692

转载 MFC相关问题汇总

1. “fatal error LNK1561: 必须定义入口点”解决方法解决方案上,右键->属性->链接器->系统->子系统,下拉框选择:窗口 (/SUBSYSTEM:WINDOWS)

2016-05-24 15:00:23 296

转载 MFC 非模态对话框 创建 销毁

采用成员变量创建一个非模态对话框        首先在你所要编写的类的头文件中声明一个指针变量:[cpp] view plain copyprivate:      CTestDialog *pTD;          然后再在相应的CPP文件,在你要创建对话框的位置添加如下代码:[cpp] view

2016-05-17 11:23:22 1006

转载 VS如何为基于对话框的MFC添加菜单及菜单项事件

方法/步骤新建一个基于对话框的MFC工程。在资源视图中,右键单击-->添加 资源-->Menu--新建,并命名ID为IDR_MENU1在对话框的属性表中,找到Menu属性,并选择ID_MENU1,至此,菜单就添加到对话框中。打开菜单文件,编辑自己的菜单项在具体的菜单项中,右键单击,选择添加事件处理程序添加编辑后

2016-05-16 14:26:21 2957

原创 leetcode 328 Odd Even Linked List(难易度:Easy)

Odd Even Linked ListGiven a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.

2016-02-10 20:41:03 352

原创 leetcode 326 Power of Three(难易度:Easy)

Power of ThreeGiven an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?代码:bool isPowerOfThree(int n) { if

2016-02-03 22:57:17 302

原创 leetcode 009 Palindrome Number(难易度:Easy)

Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you ar

2015-12-08 11:11:22 257

原创 leetcode 112 Path Sum(难易度:Easy)

Path SumGiven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary t

2015-12-03 13:25:45 305

原创 leetcode 107 Binary Tree Level Order Traversal II(难易度:Easy)

Binary Tree Level Order Traversal IIGiven a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:

2015-10-23 08:25:26 265

原创 leetcode 198 House Robber(难易度:Easy)

House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is tha

2015-10-14 11:00:50 294

原创 leetcode 292 Nim Game(难易度:Easy)

Nim GameYou are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone

2015-10-13 10:08:59 466

原创 leetcode 102 Binary Tree Level Order Traversal(难易度:Easy)

Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,

2015-10-07 16:35:49 232

原创 leetcode 118 Pascal's Triangle(难易度:Easy)

Pascal's TriangleGiven 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]]代码:/*

2015-10-05 12:14:24 279

原创 leetcode 066 Plus One(难易度:Easy)

Plus OneGiven a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.代码:/*** R

2015-10-02 12:34:10 254

原创 leetcode 231 Power of Two(难易度:Easy)

Power of TwoGiven an integer, write a function to determine if it is a power of two.代码:bool isPowerOfTwo(int n) { return (n > 0) && (!(n &(n - 1)));}原题地址:https://leetcode.com/problems/power

2015-09-30 07:51:13 242

原创 leetcode 101 Symmetric Tree

Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3

2015-09-29 10:41:34 235

原创 leetcode 027 Remove Element(难易度:Easy)

Remove ElementGiven an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the

2015-09-29 01:31:52 439

原创 leetcode 080 Remove Duplicates from Sorted Array II(难易度:Medium)

Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function shoul

2015-09-26 10:19:09 242

原创 leetcode 283 Move Zeroes(难易度:Easy)

Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after

2015-09-24 08:20:22 208

原创 leetcode 120 Triangle(难易度:Medium)

TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [

2015-09-23 16:16:39 328

原创 leetcode 026 Remove Duplicates from Sorted Array(难易度:Easy)

Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another

2015-09-22 10:56:47 221

原创 leetcode 110 Balanced Binary Tree(难易度:Easy)

Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees o

2015-09-18 10:56:53 367

原创 leetcode 202 Happy Number(难易度:Easy)

Happy NumberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum

2015-09-17 09:35:20 281

原创 leetcode 070 Climbing Stairs(难易度:Easy)

Climbing StairsYou 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?代码:int clim

2015-09-16 10:42:54 217

原创 leetcode 206 Reverse Linked List(难易度:Easy)

Reverse Linked ListReverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?代码:/** * Definition for singly-linked li

2015-09-16 10:29:53 392

原创 leetcode 232 Implement Queue using Stacks(难易度:Easy)

Implement Queue using Stacks

2015-09-16 09:44:27 232

原创 leetcode 013 Roman to Integer(难易度:Easy)

Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.代码:int romanCharToInt(char c);int romanToInt(char* s){ int num =

2015-09-14 11:04:07 218

原创 leetcode 70 Climbing Stairs(难易度:Easy)

Climbing StairsYou 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?代码:int clim

2015-09-08 07:01:58 200

原创 leetcode 083 Remove Duplicates from Sorted List(难易度:Easy)

Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, retur

2015-09-07 19:45:01 212

原创 leetcode 169 Majority Element(难易度:Easy)

Majority ElementGiven 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 ma

2015-09-06 11:48:13 198

原创 leetcode 217 Contains Duplicate(难易度:Easy)

Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false

2015-09-05 20:23:28 196

原创 leetcode 226 Invert Binary Tree(难易度:Easy)

Invert Binary TreeInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this origin

2015-09-02 14:09:10 274

原创 leetcode 191 Number of 1 Bits(难易度:Easy)

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

2015-09-01 13:39:46 269

原创 leetcode 100 Same Tree(难易度:Easy)

Same TreeGiven 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.d

2015-08-31 18:11:06 248

原创 leetcode 263 Ugly Number

Ugly NumberWrite a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example,6, 8 are ugly while 14 is

2015-08-31 11:42:21 245

HeadFirst设计模式(中文版).pdf

Head First 设计模式(中文版).pdf

2014-10-23

空空如也

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

TA关注的人

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