-
flashrwcode
说明: 针对两种flash所写的读写程序,公布我原来写的针对两种flash所写的读写程序,用的单片机是51系列!(against two flash reader written procedures, I was originally announced against two flash reader written procedures, the MCU is 51!)
- 2006-05-12 21:28:13下载
- 积分:1
-
ATMEGA128L精简开发板 (1)
ATMEGA128 各种实用程序,C代码,初学者实用(ATMEGA128 various utilities, C code, beginners practica)
- 2017-06-26 17:30:20下载
- 积分:1
-
qt 快速读取excel实例代码
#Qt Windows 下快速读写Excel指南很多人搜如何读写excel都会看到用`QAxObject`来进行操作,很多人试了之后都会发现一个问题,就是慢,非常缓慢!因此很多人得出结论是`QAxObject`读写excel方法不可取,效率低。后来我曾试过用ODBC等数据库类型的接口进行读写,遇到中文嗝屁不说,超大的excel还是会读取速度慢。最后,看了一些开源的代码后发现,Windows下读取excel,还是用`QAxObject`最快!没错,就是用`QAxObject`读写最快!!!大家以后读取excel时(win下),不用考虑别的方法,用`QAxObject`就行,速度杠杠的,慢是你操作有误!下面就说说咋能提高其读取效率。#读取excel慢的原因这里不说如何打开或生成excel,着重说说如何快速读取excel。网上搜到用Qt操作excel的方法,读取都是使用类似下面这种方法进行:```C QVariant ExcelBase::read(int row, int col){ QVariant ret; if (this->sheet != NULL && ! this->sheet->isNull()) { QAxObject* range = this->sheet->querySubObject("Cells(int, int)", row, col); //ret = range->property("Value"); ret = range->dynamicCall("Value()"); delete range; } return ret;}```读取慢的根源就在于`sheet->querySubObject("Cells(int, int)", row, col)`试想有10000个单元就得调用10000次`querySubObject`,网络上90%的教程都没说这个`querySubObject`产生的`QAxObject*`最好进行手动删除,虽然在它的父级`QAxObject`会管理它的内存,但父级不析构,子对象也不会析构,若调用10000次,就会产生10000个`QAxObject`对象得益于[QT快速读取数据量很大的Excel文件](http://blog.csdn.net/a1069962325/article/details/49514377)此文,下面总结如何快速读写excel#快速读取excel文件原则是一次调用`querySubObject`把所有数据读取到内存中VBA中可以使用`UsedRange`把所有用到的单元格范围返回,并使用属性`Value`把这些单元格的所有值获取。这时,获取到的值是一个table,但Qt把它变为一个变量QVariant来储存,其实实际是一个`QList`,此时要操作里面的内容,需要把这个`QVariant`转换为`QList`先看看获取整个单元格的函数示意(这里ExcelBase是一个读写excel的类封装):```C QVariant ExcelBase::readAll(){ QVariant var; if (this->sheet != NULL && ! this->sheet->isNull()) { QAxObject *usedRange = this->sheet->querySubObject("UsedRange"); if(NULL == usedRange || usedRange->isNull()) { return var; } var = usedRange->dynamicCall("Value"); delete usedRange; } return var;}```
- 2020-05-28下载
- 积分:1
-
基于C#蓝牙通讯系统
基于C#蓝牙串口通讯系统,可用于WINCE下开发。实现串口的通讯。
- 2022-02-05 12:13:02下载
- 积分:1
-
opencv的java代码实现
opencv3 的java开发资源,内附opencv的示例,包含图片和java工程,每个例子,一个小工程
- 2022-03-14 07:02:00下载
- 积分:1
-
Beginning-Visual C++ (2013, Apress)
说明: 比较好的VC++教程,英文电子版,没有任何水印,便于阅读(Better VC++ tutorial, English electronic version, without any watermarking, easy to read)
- 2020-06-23 02:00:02下载
- 积分:1
-
串口接收
说明: 通过usart实现串口接收信号,使用串口调试软件可发送信号。(The serial port receives the signal through usart, and the serial port debugging software can send the signal.)
- 2020-06-20 04:00:02下载
- 积分:1
-
Objective-C-2.1
Objective-c详细描述,对学习该语言有很大帮助(Objective-c detailed description of great help in learning the language)
- 2012-07-27 16:46:43下载
- 积分:1
-
用c++做出变色条
用c++做出变色条
- 2023-06-19 16:15:03下载
- 积分:1
-
牛顿 拉夫逊
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
- 2022-04-19 02:59:42下载
- 积分:1