2016年5月23日
摘要:
clear; close all; clc; I = imread('d.png'); G = rgb2gray(I); %灰度化 level = graythresh(I); %设定阈值 BW = im2bw(I,level); %二值化 BW_edge = edge(BW,'canny'); dim =size(BW); i = floor(dim(1)/2); for m = 1:dim...
阅读全文
posted @ 2016-05-23 17:03
各种笔记
阅读(466)
推荐(0)
2016年5月20日
摘要:
const int PREORDER=0; const int INEORDER=1; const int POSTEORDER=2; const bool RECURSIVE=true; const bool NONRECURSIVE=false; class MyBinaryTree{ public: class Node{ public: char dat...
阅读全文
posted @ 2016-05-20 14:41
各种笔记
阅读(240)
推荐(0)
2016年5月19日
摘要:
class Sort{ public: void printIt(int const * arr,int const n){ for (int i = 0; i =0 && arr[j]>tmp)arr[j+1] = arr[j--]; arr[j+1]=tmp; } } //2.堆排序12:32----12:53...
阅读全文
posted @ 2016-05-19 19:56
各种笔记
阅读(179)
推荐(0)
2016年3月30日
摘要:
//工厂模式 function creatCar(color,host,size){ var o = new Object(); o.color = color; o.host = host; o.size = size; o.tellColor = function(){alert(o.color);}; return o; } var my...
阅读全文
posted @ 2016-03-30 20:04
各种笔记
阅读(206)
推荐(0)
2016年3月28日
摘要:
toFixed() returns a string, with the number written with a specified number of decimals:var x = 9.656;x.toFixed(0); // returns 10x.toFixed(2); // retu
阅读全文
posted @ 2016-03-28 18:14
各种笔记
阅读(197)
推荐(0)
2016年3月26日
摘要:
1. JavaScript can "display" data in different ways: Writing into an alert box, using window.alert().Writing into the HTML output using document.write(
阅读全文
posted @ 2016-03-26 18:22
各种笔记
阅读(185)
推荐(0)
摘要:
#include "stdafx.h" #include #include using namespace std; class Lab1 { private: vector> whole; public: Lab1(int n) { vector tmpVec; tmpVec.push_back(1); whole.pus...
阅读全文
posted @ 2016-03-26 13:56
各种笔记
阅读(436)
推荐(0)
2016年3月24日
摘要:
MemB.h的代码: MemB.cpp的代码: MyString的代码和main函数: strcpy遇到的不安全问题可以通过这个来解决: http://jingyan.baidu.com/article/ce436649fd61543773afd32e.html 1. char *strcpy(ch
阅读全文
posted @ 2016-03-24 22:16
各种笔记
阅读(281)
推荐(0)
摘要:
#include "stdafx.h" #include #include using namespace std; const int sz=20; struct Holder{ private: int a[sz]; public: void initialize(); struct Pointer; friend Pointer; struc...
阅读全文
posted @ 2016-03-24 14:20
各种笔记
阅读(215)
推荐(0)
摘要:
#include "stdafx.h" #include using namespace std; //A里面有个private的变量,需要被其他的如 //全局函数g(A *a)、h()、结构体C、结构体中的某个函数B::f(A *a)访问 struct A; struct B{ void f(A *a); //这里用到了A,那么前面必须前面有A的声明 }; st...
阅读全文
posted @ 2016-03-24 13:35
各种笔记
阅读(237)
推荐(0)