<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sheldon0227的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/sheldon0227</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sheldon0227]]></copyright><item><title><![CDATA[Qt5.9.1 QDoubleValidator 直接构建失效的解决办法]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/78402735</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/78402735</guid><author>sheldon0227</author><pubDate>Tue, 31 Oct 2017 14:06:40 +0800</pubDate><description><![CDATA[QIntValidator和QDoubleValidator都是用于限制Qt下输入组件输入的类，对于整形数一般使用QIntValidator就可以了，但是根据文档，QIntValidator的范围只能从-2147483647到2147483647。
当我需要限制比较打的输入，比如电话号码等等时，就必须使用QDoubleValidator了，但是如果只是将代码中的QIntValidator替换为Q]]></description><category></category></item><item><title><![CDATA[Qt5.9.1 Windows下QPlainTextEdit无法正常垂直填充QFormLayout的问题]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/78391692</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/78391692</guid><author>sheldon0227</author><pubDate>Mon, 30 Oct 2017 12:08:44 +0800</pubDate><description><![CDATA[使用Qt designer将QPlainTextEdit放在QFormLayout里的时候发现垂直向不能正确resize到QFormLayout的问题。
解决办法为调整QPlainTextEdit的size policy：
    //让notePlainTextEdit 垂直填充 Form Layout
    QSizePolicy policy = ui->notePlainTextEd]]></description><category></category></item><item><title><![CDATA[{LeetCode} 458. Poor Pigs]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/68487884</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/68487884</guid><author>sheldon0227</author><pubDate>Thu, 30 Mar 2017 15:32:32 +0800</pubDate><description><![CDATA[There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum]]></description><category></category></item><item><title><![CDATA[{LeetCode} 1. Two Sum]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/66973435</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/66973435</guid><author>sheldon0227</author><pubDate>Mon, 27 Mar 2017 16:56:32 +0800</pubDate><description><![CDATA[Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the
same]]></description><category></category></item><item><title><![CDATA[{LeetCode} 479. Largest Palindrome Product]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/64922216</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/64922216</guid><author>sheldon0227</author><pubDate>Wed, 22 Mar 2017 17:15:14 +0800</pubDate><description><![CDATA[自己写的代码，没过AC，原因是
Submission Result: 
Time Limit Exceeded
class Solution {
public:
    int largestPalindrome(int n) {
        double max = 0;
        for (int i=0; i<n; i++)
        {
            max]]></description><category></category></item><item><title><![CDATA[{LeetCode} 457. Circular Array Loop]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/64906157</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/64906157</guid><author>sheldon0227</author><pubDate>Wed, 22 Mar 2017 11:01:59 +0800</pubDate><description><![CDATA[##此问题 Test Case并不完全，暂时AC。



You are given an array of positive and negative integers. If a number n at an index is positive, then move forward n steps. Conversely, if it's negative (-n), move bac]]></description><category></category></item><item><title><![CDATA[{LeetCode} 540. Single Element in a Sorted Array]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/64439920</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/64439920</guid><author>sheldon0227</author><pubDate>Tue, 21 Mar 2017 11:51:17 +0800</pubDate><description><![CDATA[Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element that appears only once.

Example 1:

Input: []]></description><category></category></item><item><title><![CDATA[{LeetCode} 518. CoinChange2]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/62422972</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/62422972</guid><author>sheldon0227</author><pubDate>Thu, 16 Mar 2017 14:50:26 +0800</pubDate><description><![CDATA[问题：

You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may assume that you have infinit]]></description><category></category></item><item><title><![CDATA[Xmos驱动win10无法使用的问题]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/50440515</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/50440515</guid><author>sheldon0227</author><pubDate>Thu, 31 Dec 2015 11:21:00 +0800</pubDate><description><![CDATA[刚刚将系统更新至Win10，一切如初就是Xmos的驱动无法使用和识别器材。
首先把之前的Xmos驱动卸载，
然后点击电脑开始菜单，设置，更新和安全，恢复，高级启动下的立即重启，然后重启完了到一个设置界面。（没进系统）

疑难解答，高级选项，启动设置，重启，重启以后按数字7（不用一直按，等list出现），禁用驱动程序强制签名，然后以管理员身份运行官网官网驱动安装程序就可以了。
ASIO和D]]></description><category></category></item><item><title><![CDATA[QT使用默认浏览器打开网页]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/50380764</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/50380764</guid><author>sheldon0227</author><pubDate>Tue, 22 Dec 2015 16:23:13 +0800</pubDate><description><![CDATA[并不是使用Qt来开发浏览器，而是用Qt来打开默认的浏览器
代码很简单：
#include 
QString URL = "www.baidu.com";
QDesktopServices::openUrl(QUrl(URL.toLatin1()));
只需要在需要地方加入代码就可以]]></description><category></category></item><item><title><![CDATA[JAVA开发微信企业号的一些代码片]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/50206465</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/50206465</guid><author>sheldon0227</author><pubDate>Mon, 07 Dec 2015 15:44:04 +0800</pubDate><description><![CDATA[因为已经改用用C++写了，java的实现也比较简单，贴下来：package com;import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import net.s]]></description><category></category></item><item><title><![CDATA[QNetworkAccessManager不使用信号/槽机制来获得QNetworkReply的解决办法]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/50170437</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/50170437</guid><author>sheldon0227</author><pubDate>Fri, 04 Dec 2015 09:25:36 +0800</pubDate><description><![CDATA[正在做一个第三方微信企业要接口的项目，JAVA的实现方法比较简单，网上资料也很多。
但是我需要在C++下实现，微信企业号接口大多都是https的GET/POST方法实现的。
Qt提供了一个封装好的类QNetworkAccessManager，就不需要使用windows的套接字来编程了，也脱离的平台限制。

上图是我从http://blog.youkuaiyun.com/chenlong12580/ar]]></description><category></category></item><item><title><![CDATA[QTableWidget为一列数据排序，整形数据排序 #Qt Creator]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49682533</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49682533</guid><author>sheldon0227</author><pubDate>Fri, 06 Nov 2015 14:23:48 +0800</pubDate><description><![CDATA[问题：
TableWidget有自己的Sort函数，setSortingEnabled()
可以让表头被点击的时候自动sort当前的列的数据，但是如果数据是以QString储存的话
在Sort数字时就出现了问题，比如说100会出现在20之前，因为它的第一位是1比2小
==============================================================]]></description><category></category></item><item><title><![CDATA[QListWidget动态刷新的问题和解决 #Qt Creator]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49682147</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49682147</guid><author>sheldon0227</author><pubDate>Fri, 06 Nov 2015 14:06:02 +0800</pubDate><description><![CDATA[问题：

我想做一个ListWidget，放置一些ListWidgetItem为ip地址和端口号，然后点击一个按键去开始检查每个item的地址能否连接。
在检查的同时，给能连接的Item的字体颜色设为绿色，将不能连接的设红色。
但是这一系列的操作都是封在一个槽函数当中的，导致点击的结果是等待一段时间，然后整个ListWidget的颜色一起发生变化。
而不是随着检查一点一点动态的发生变化。]]></description><category></category></item><item><title><![CDATA[QProgressDialog使用时不显示的可能问题 #Qt #C++]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49513461</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49513461</guid><author>sheldon0227</author><pubDate>Fri, 30 Oct 2015 16:24:45 +0800</pubDate><description><![CDATA[QProgressDialong是Qt提供的用于显示各类耗时较长的操作进度，
而不至于让程序看上去假死了一样，他继承自QDialog。
example：http://doc.qt.io/qt-4.8/qprogressdialog.html#labelText-prop
但是在测试中会出现Dialog不显示，程序依旧进入假死状态，在网上也查阅不到问题所在。
不显示的原因是QProgress]]></description><category></category></item><item><title><![CDATA[Qt4.8 使用SLOT/SIGNAL函数传递变量进Dialog #Qt]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49387123</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49387123</guid><author>sheldon0227</author><pubDate>Sat, 24 Oct 2015 18:47:42 +0800</pubDate><description><![CDATA[一般情况下都是使用dialog后，结果用信号传回父窗口。
这次是将数据传递近dialog操作，考虑模态和非模态情况，原理是一样的。
SIGNAL部分：header 先声明一个信号

signals:
    void info_sender(QString,QString,QString);
SLOT部分：也是先声明一个槽函数
private slots:
    void info_]]></description><category></category></item><item><title><![CDATA[简单的Modbus/TCP客户端，包含写寄存器函数#C++]]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49303459</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49303459</guid><author>sheldon0227</author><pubDate>Wed, 21 Oct 2015 13:53:08 +0800</pubDate><description><![CDATA[modbus-TCP 协议文档：http://wenku.baidu.com/link?url=ImagoC3DE1p0D55S7qbzXrSaQ4wbaY93gB3kEmPiHx_CnnNsrdkz1vYA93uTBtvmbzxhRrcBoPc8YNl9UqJqlRAV1r3Tm2tYoOfdTU1zcVG

简单来说就是吧modbus RTU的报文做修改后使用TCP协议传输，通常modbu]]></description><category></category></item><item><title><![CDATA[初次使用Qt Creater网络编程，出现error: undefined reference to `_imp__WSAStartup@8']]></title><link>https://blog.youkuaiyun.com/sheldon0227/article/details/49277859</link><guid>https://blog.youkuaiyun.com/sheldon0227/article/details/49277859</guid><author>sheldon0227</author><pubDate>Tue, 20 Oct 2015 15:27:37 +0800</pubDate><description><![CDATA[在VS中测试完好的modbusTCP发报端/客户端，拿到Qt当中做UI，
build时出现

error: undefined reference to `_imp__WSAStartup@8'
等大约10条error，原因是socket库的编译链接问题。
网上的解决办法：
错误原因：因为没有联接socket库ws2_32.lib。
解决办法：对于VC6.0要在porject/set]]></description><category></category></item></channel></rss>