- 博客(11)
- 资源 (2)
- 收藏
- 关注
原创 C++获取给定目录下所有的文件
std::vector<std::string> AtomPressInfo::getFilesFromPath(const char *path) { std::vector<std::string> strFilesVec; std::vector<std::string> strDirVec; strDirVec.emplace_back(std::string(path)); DIR *dir = nullptr; str.
2021-12-05 11:10:00 279
原创 第八章 OLEDB无控件数据库访问 -- 学习笔记
1、访问数据库时,需要访问物理路径,而不是虚拟路径。2、网站的根目录用“~”表示,如果想要获取根目录的地址,可以如此:Server.MapPath("~")。3、OLEDB提供了三个执行操作:ExecuteNonQuery(执行更新和插入操作)、ExecuteScalar(执行查询操作,只返回结果集中的一个值,比如sum操作)和ExecuteReader(执行查询操作,返回整个结果集)。
2016-07-18 17:19:24 789
原创 第七章 数据控件基础课程 -- 学习笔记
1、数据控件中,最有用的两个控件是GridView(以表格的形式来显示数据)和ListView。2、数据控件具有增、删、改、查、分页、排序、选择七个功能中的几个或者全部,其中,只有ListView具有全部的功能,GridView没有新增功能。3、GridView对应于HTML标签table,但是比table更易于操作,当需要使用table时,用GridView省时方便。4、中大型的项目
2016-07-13 14:41:45 564
原创 第六章 ASP.NET应用实例 -- 学习笔记
1、在aspx页面之间进行跳转时,使用的是虚拟路径,也就是根据站点目录去寻找文件;而当去访问文件或者数据库时,程序就只会根据实际的物理路径去寻找。类库中提供了一个办法,把虚拟路径转换为物理路径:物理路径 = Server.Mappath(虚拟路径)。2、类库中提供了三个功能类对文件以及目录进行操作:File、Directory、Path。这三个类都是辅助类(不能创建对象,但是提供很多实用的
2016-07-13 14:38:22 577
原创 第五章 ASP.NET内置对象 -- 学习笔记
1、TextBox可以设置可视属性为false,这样,TextBox可以用来暂存值,而且这个暂存值在按下按钮控件之后还是保存着,这个可以暂时充当全局变量写入磁盘的功能。2、在使用网页重定向是,有两个方法:Response.Redirect()VS Server.Transfer(),其中,后一个好用资源更少,但是有的控件不支持。如果为了BUG更少,而且系统资源不强求,最好使用Respons
2016-07-11 16:55:16 753
原创 在牛客网看到这样的一个选择题,给出自己的见解
题目是:以下程序输出是____。12345678910#include using namespace std; int main(void) { constint a = 10; int* p = (int *)(&a); *p =20;
2015-04-12 00:14:35 1347
原创 剑指Offer --> Question 40
#include using namespace std;unsigned findThePositionOfFirstBitIs1(int num){ unsigned pos = 0; while (!(num & 0x1)) { num = num >> 1; pos++; } return pos;}bool isBit1(int num, unsign
2015-03-16 16:02:50 448
原创 剑指Offer --> Question 38
#include #include "test.h"using namespace std;int getTheLastestK(int num[], int length, int k);int getFirstK(int num[], int length, int k);int getNumberOfK(int num[], int length, int k);
2015-03-16 13:51:19 314
原创 剑指Offer --> Question 36
#include #include "inversePairs.h"using namespace std;static int times = 0;void mergeSort(int num[], int start, int end){ if (num == nullptr) { cout << "invalid input." << endl; return;
2015-03-15 20:15:25 345
原创 剑指Offer --> Questions 35
#include #include #include using namespace std;const int CHARNUM = 256;unsigned char firstNotRepeatingChar(const string &s);int main(){ string s; cin >> s; cout << firstNotRepeatingChar(
2015-03-15 17:59:27 328
原创 剑指Offer --> Question 33
#include #include #include #include using namespace std;string intConvertString(unsigned int a);bool compareNumber(const string &a, const string &b);string printMinNumber(unsigned int num[],
2015-03-14 12:04:43 389
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人