<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xhfbx的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/xhfbx</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; xhfbx]]></copyright><item><title><![CDATA[省略零值判断]]></title><link>https://blog.csdn.net/xhfbx/article/details/143961005</link><guid>https://blog.csdn.net/xhfbx/article/details/143961005</guid><author>xhfbx</author><pubDate>Fri, 22 Nov 2024 09:32:28 +0800</pubDate><description><![CDATA[布尔值为假：None, 0, False, [], (), {}, set(), frozenset() 等等。以前要直接取 List[0] 的值，但List可能为None 或只是空列表 , 所以我以前是这样写的。布尔值为真：非0的数值， True, 非空的序列， 元组， 字典， 用户定义的类和实例 等等。功能是没问题，但我看了朱雷老师的《Python工匠》后，才知道这样写是的判断是又臭又长的。3、时刻注意， 不要因为过度追求简写而引入其它逻辑问题。其实直接用 if List 就可以了。]]></description><category></category></item><item><title><![CDATA[Python 使用paramiko连接时 Oops, unhandled type 3 (‘unimplemented‘) 报错处理]]></title><link>https://blog.csdn.net/xhfbx/article/details/143313514</link><guid>https://blog.csdn.net/xhfbx/article/details/143313514</guid><author>xhfbx</author><pubDate>Mon, 28 Oct 2024 21:09:45 +0800</pubDate><description><![CDATA[下面的代码在连接一台 Dell iDRAC 时，会有 Oops, unhandled type 3 的报错，但连接其它服务器的BMC时正常的。后面才知道可能设备需要模拟输入认证，改成下面的就可以了， 主要是使用了 Transport 来进行模拟。]]></description><category></category></item><item><title><![CDATA[go 对于同一目录下编译报错处理]]></title><link>https://blog.csdn.net/xhfbx/article/details/129973498</link><guid>https://blog.csdn.net/xhfbx/article/details/129973498</guid><author>xhfbx</author><pubDate>Wed, 05 Apr 2023 17:15:35 +0800</pubDate><description><![CDATA[goland run时，对于非main包，系统引用同名包中的相关文件；对于main包，系统不会引用的同一包的相关文件，所以run 时会报 变量未定义。2、在 vscode 中，将 program 对应的值更改为 ${fileDirname}1、cd到对应的文件夹，使用命令go run *.go，运行当前文件夹下的所有go文件。]]></description><category></category></item><item><title><![CDATA[Servlet(5)]]></title><link>https://blog.csdn.net/xhfbx/article/details/119422606</link><guid>https://blog.csdn.net/xhfbx/article/details/119422606</guid><author>xhfbx</author><pubDate>Thu, 05 Aug 2021 17:10:59 +0800</pubDate><description><![CDATA[HttpSession 对象

HttpSession对象进行会话跟踪，一个用户可以有且最多有一个HttpSession，并且不会被其他用户访问到。

HttpSession对象在用户第一次访问网站时自动被创建，可以通过调用HttpServletRequest的getSession方法获取对象。

getSession有两个重载方法：

HttpSession getSession() 

//返回当前的HttpSession,若没有，则创建一个返回

HttpSession getSession(bool]]></description><category></category></item><item><title><![CDATA[Servlet(3)]]></title><link>https://blog.csdn.net/xhfbx/article/details/119329708</link><guid>https://blog.csdn.net/xhfbx/article/details/119329708</guid><author>xhfbx</author><pubDate>Mon, 02 Aug 2021 17:14:35 +0800</pubDate><description><![CDATA[Cookies

Cookies的问题在于用户可以通过改变其浏览器设置来拒绝接受cookies.

要使用cookies，需熟悉javax.servlet.http.Cookie类

通过传递name和value两个参数给Cookie类的构造函数来创建一个cookies

Cookie cookie = new Cookie(name,value);

创建完一个Cookie对象后，可以设置domain,path和maxAge属性,(maxAge决定cookie何时过期)。

要将cookie发送到浏览器，]]></description><category></category></item><item><title><![CDATA[Servlets(2)]]></title><link>https://blog.csdn.net/xhfbx/article/details/119250739</link><guid>https://blog.csdn.net/xhfbx/article/details/119250739</guid><author>xhfbx</author><pubDate>Fri, 30 Jul 2021 16:27:44 +0800</pubDate><description><![CDATA[ServletContext

ServletContext 表示Servlet应用程序。每个Web应用程序只有一个上下文。

通过在ServletConfig中调用getServletContext方法，可以获得ServletContext.







GenericServlet

GenericServlet抽象类实现了Servlet和ServletConfig接口，可以使代码简洁。



示例：


package cn.tzsk;

import jakarta.servlet.*;
impo]]></description><category></category></item><item><title><![CDATA[Servlets(1)]]></title><link>https://blog.csdn.net/xhfbx/article/details/119214994</link><guid>https://blog.csdn.net/xhfbx/article/details/119214994</guid><author>xhfbx</author><pubDate>Thu, 29 Jul 2021 16:44:52 +0800</pubDate><description><![CDATA[Servlet API 有以下４个Java包

１、javax.servlet 定义Servlet和Servlet容器之间契约的类和接口。

２、javax.servlet.http 定义HTTPServlet 与 Servlet 容器之间契约的类和接口

3、javax.servlet.annotation 包含标注Servlet Fileter Listener的标注。还为被标注元件定义元数据。

4、javax.servlet.descriptor 包含提供程序化登录web应用程序的配置信息的类型。
]]></description><category></category></item><item><title><![CDATA[Servlet 初始参数获取]]></title><link>https://blog.csdn.net/xhfbx/article/details/119104020</link><guid>https://blog.csdn.net/xhfbx/article/details/119104020</guid><author>xhfbx</author><pubDate>Mon, 26 Jul 2021 10:29:43 +0800</pubDate><description><![CDATA[在web.xml中配置servlet参数


&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http:/]]></description><category></category></item><item><title><![CDATA[使用 finally 使程式更健壮]]></title><link>https://blog.csdn.net/xhfbx/article/details/119083590</link><guid>https://blog.csdn.net/xhfbx/article/details/119083590</guid><author>xhfbx</author><pubDate>Sun, 25 Jul 2021 16:28:02 +0800</pubDate><description><![CDATA[看Java编程思想，第十二章　通过异常处理错误

当Java中的异常不允许我们回到异常抛出的地点时，那么该如何应对叫？如果把 try　块放在循环里，就建立了一个“程序继续执行之前必须要达到”的条件。还可以加入一个static类型的计数器或者别的装置，使循环在放弃以前能尝试一定的次数。这将使程序的健壮性更上一个台阶。
...]]></description><category></category></item><item><title><![CDATA[Delphi 动态创建类]]></title><link>https://blog.csdn.net/xhfbx/article/details/119059074</link><guid>https://blog.csdn.net/xhfbx/article/details/119059074</guid><author>xhfbx</author><pubDate>Sat, 24 Jul 2021 15:44:45 +0800</pubDate><description><![CDATA[昨天在看 Java Web 开发时有看到servlet 通过反射动态创建类，想到Delphi中能否实现。



环境 Win10 x64 , Delphi 10.4 需引用System.Rtti ；

发现 private 下的function GetXY:Integer 没有获取到，why? Rtti设计就这样？


unit untTest;

interface

uses
  Classes,SysUtils,Dialogs;

type
  TTestClass = class(TPer...]]></description><category></category></item><item><title><![CDATA[TFDConnection 动态创建连接MySQL]]></title><link>https://blog.csdn.net/xhfbx/article/details/118608693</link><guid>https://blog.csdn.net/xhfbx/article/details/118608693</guid><author>xhfbx</author><pubDate>Fri, 09 Jul 2021 16:00:14 +0800</pubDate><description><![CDATA[myConn := TFDConnection.Create(nil);
 myConn.Params.Add('Database=myDB');
 myConn.Params.Add('User_Name=root');
 myConn.Params.Add('Password=xxxxxx');
 myConn.Params.Add('Server=localhost');
 myConn.Params.Add('DriverID=MySQL');
 myConn.Params.Add...]]></description><category></category></item><item><title><![CDATA[TFDQuery 字段名为大写]]></title><link>https://blog.csdn.net/xhfbx/article/details/118608236</link><guid>https://blog.csdn.net/xhfbx/article/details/118608236</guid><author>xhfbx</author><pubDate>Fri, 09 Jul 2021 15:48:58 +0800</pubDate><description><![CDATA[今天用 TFDQuery,发现字段名的值输出全是大写的，要做判断时还需将字符全部大写，以前记得 dbExpress 中 TSQLQuery大小写不限的，要注意了。
myQry  := TFDQuery.Create(nil);
myQry.Connection := myConn;
myQry.SQL.Add('Insert into jj_HoldStock(symbol,Hold_Date,indexNO,stock_ID,stock_Name,percentage_equity, hold_stock]]></description><category></category></item><item><title><![CDATA[调试时出现 网络访问被访问控制列表 (ACL) 拒绝]]></title><link>https://blog.csdn.net/xhfbx/article/details/93780818</link><guid>https://blog.csdn.net/xhfbx/article/details/93780818</guid><author>xhfbx</author><pubDate>Wed, 26 Jun 2019 21:13:38 +0800</pubDate><description><![CDATA[以前都是用10g ,今天因为要准备做个分析使用18c Express Edition ,对程式包调试时出现如下错误，


连接到数据库 XE。
执行 PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', '56281' )
ORA-24247: 网络访问被访问控制列表 (ACL) 拒绝
ORA-06512: 在 "SYS.DBMS_DEBUG...]]></description><category></category></item><item><title><![CDATA[COUNT(ROWID), COUNT(1)，COUNT(*),COUNT(主键),COUNT(非索引字段) 区别]]></title><link>https://blog.csdn.net/xhfbx/article/details/88713192</link><guid>https://blog.csdn.net/xhfbx/article/details/88713192</guid><author>xhfbx</author><pubDate>Thu, 21 Mar 2019 13:44:05 +0800</pubDate><description><![CDATA[COUNT(ROWID), COUNT(1)，COUNT(*),COUNT(主键),COUNT(非索引字段) 区别

COUNT() 用于返回括号中非NULL值的累计数，在书中或网上经常看到些提示,建议不要使用 count(*)而应使用 count(1)或count(rowid)忧化性能，因为count(*)会全表扫描 （我自己手上就有这样一本, 《Oracle Database 11g SQL ...]]></description><category></category></item><item><title><![CDATA[遍历目录读取CSV]]></title><link>https://blog.csdn.net/xhfbx/article/details/84227663</link><guid>https://blog.csdn.net/xhfbx/article/details/84227663</guid><author>xhfbx</author><pubDate>Mon, 19 Nov 2018 09:19:59 +0800</pubDate><description><![CDATA[
unit U_QRCodeToDB;

interface

uses
  Classes,IniFiles,SysUtils,StrUtils,ADODB,activex;

type
  TQRCodeToDB = class(TThread)
  private
    { Private declarations }

    Function GetSetDirectory(): st...]]></description><category></category></item><item><title><![CDATA[Oracle 周的第一天]]></title><link>https://blog.csdn.net/xhfbx/article/details/83379259</link><guid>https://blog.csdn.net/xhfbx/article/details/83379259</guid><author>xhfbx</author><pubDate>Thu, 25 Oct 2018 14:37:15 +0800</pubDate><description><![CDATA[因用户需求，需计算出每周的每一天  找到如下资料

（引用网址 : http://www.zhiweinet.com/jiaocheng/2009-04/7009.htm）

 

——日期计算，算第n周的第一天及最后一天是几号。     ================================================

    —— ww的算法为每年1月1日为第一周开始，date...]]></description><category></category></item><item><title><![CDATA[Oracle 日历]]></title><link>https://blog.csdn.net/xhfbx/article/details/83379090</link><guid>https://blog.csdn.net/xhfbx/article/details/83379090</guid><author>xhfbx</author><pubDate>Thu, 25 Oct 2018 14:30:43 +0800</pubDate><description><![CDATA[此方法只是用于Oracle数据库。

直接看例子吧：


select ceil((cdate+(to_char(to_date('20100101','yyyymmdd'),'d'))-2)/7) as week,


sum(decode(to_char(everyday,'d'),'2',to_char(everyday,'dd'))) as 星期一,

sum(decode(to_char...]]></description><category></category></item><item><title><![CDATA[Delphi 修改文本框中内容]]></title><link>https://blog.csdn.net/xhfbx/article/details/83379022</link><guid>https://blog.csdn.net/xhfbx/article/details/83379022</guid><author>xhfbx</author><pubDate>Thu, 25 Oct 2018 14:26:06 +0800</pubDate><description><![CDATA[Delphi 修改Excel 中文本框内容

 

首先看一下Excel中录制的宏代码吧

 

Sub Macro1()

'

' Macro1 Macro

' 宏由 HFBiao 录制，时间: 2010-5-15

'

    ActiveSheet.Shapes(&quot;Text Box 1&quot;).Select    

    Selection.Characters.Text = &quot;555...]]></description><category></category></item><item><title><![CDATA[Oracle 集合使用]]></title><link>https://blog.csdn.net/xhfbx/article/details/83378895</link><guid>https://blog.csdn.net/xhfbx/article/details/83378895</guid><author>xhfbx</author><pubDate>Thu, 25 Oct 2018 14:21:16 +0800</pubDate><description><![CDATA[*------IFS系统-
这是用户需要将半成品的需求情况计算出来，根据下达所车间订单状况，取剩余未完成数量，根据制造BOM逐层分解出半成品计算
其中对于半成品的库存使用嵌套表类型，使用字符型索引可以使用物品代码直接查询其中的储存的值
用 .exists() 可以查找是否含有此项的值
select * from table(V_MANUF_STRUCTURE) where STRUCTURE_ID...]]></description><category></category></item></channel></rss>