草庐IT

value-type

全部标签

windows - Python py2exe "IOError...unknown url type: https"问题

所以我的WebScrapper在使用IDLE/Python运行时工作正常,但是当我将它编译成单个.exe文件(使用py2exe)时,它引发了一个IOError.使用urllib模块时:IOError:[Errnourlerror]unknownurltype:'https'当使用requests模块时:requests.exceptions.SSLError:Can'tconnecttoHTTPSURLbecausetheSSLmoduleisnotavailable.我确实注意到,在使用py2exe进行编译时,它在最后说有几个“模块似乎丢失”,包括一个OpenSSL.SSL和几个引用

C++ 中间函数 Hook : get register values and jump back [x86 assembly on windows]

在寄存器EBP中有一个int值,在EBX中有一个字符串。我需要在我自己的函数中从这些寄存器中获取值,对它们进行一些操作,最后跳回下面的一些代码。我在0x46AA17处对名为JmpHook的函数执行了一个JMP。voidJmpHook(){char*mystring;_asmmovmystring,ebxprintf("value:%s",mystring);_asm{jmp[0x46AA87]}}如您所见,我正在尝试将EBX处的字符串移动到mystring中,最后跳回0x46AA87,这是位于我的JMPJmpHook下方的几行。printf被调用并且mystring被输出,但所有这些在

windows - Powershell 脚本 : Can't read return value of executed program

我正在使用PowerShell运行一个脚本,该脚本执行wget以获取网页(一个简单的数据库导入脚本)并分析其输出(错误消息或“OK”)。我正在使用thispreviousquestion的答案中的代码我的。$a=c:\path_to_wget\wget.exe--quiet-O-"http://www.example.com/import_db"$rc=$a.CompareTo("OK")exit$rc当wget操作的结果是404-并且wget可能返回错误级别1或127-我从PowerShell收到以下错误消息:Youcannotcallamethodonanull-valuedexp

windows - msys2:尽管 (MSYS2_PATH_TYPE = inherit) 仍未找到 Windows 程序

在Windows10上使用MSYS264位版本20161025...我无法让msys2识别windows路径中的程序。例如,在使用Windows安装程序安装Go版本1.8.3后:(1)Cygwin找到go.exe(2)Windows命令提示符找到go.exe但(3)MSYS2没有。请引用附图。提前致谢。 最佳答案 运行msys2_shell.cmd-use-full-path或取消注释MSYS2_PATH_TYPE=inheritinmsys2.ini(可以在MSYS2的安装目录下找到)。RelatedGitHubissue关于in

c# - IList<Type> 到 IList<BaseType>

我有几个类:classVehicle{}classCar:Vehicle{}我有一个派生类的列表:IListcars;我想将列表转换为其基类,并尝试过:IListbaseList=carsasIList;但我总是得到null.还有carsisIListevaluatestobefalse.当然,如果我执行以下操作,我可以将项目添加到列表中:Listtest=newList();foreach(Carcarincars){test.Add(car);}我得到了我的list,但我知道必须有更好的方法。有什么想法吗? 最佳答案 使用IEn

C#,正则表达式 : how to parse comma-separated values,,其中一些值可能是引号本身包含逗号的字符串

在C#中,使用Regex类,如何解析以逗号分隔的值,其中一些值可能是引号本身包含逗号的字符串?usingSystem;usingSystem.Text.RegularExpressions;classExample{publicstaticvoidMain(){stringmyString="cat,dog,\"0=OFF,1=ON\",lion,tiger,'R=red,G=green,B=blue',bear";Console.WriteLine("\nmyStringis...\n\t"+myString+"\n");Regexregex=newRegex("(?输出(部分)如下

c# - 将空参数传递给 SignalR 客户端代理时为 "Value cannot be null"

使用SignalR(v2.0.2)我遇到了这个异常:Valuecannotbenull.Parametername:oatNewtonsoft.Json.Utilities.ValidationUtils.ArgumentNotNull(Objectvalue,StringparameterName)atNewtonsoft.Json.Linq.JToken.FromObjectInternal(Objecto,JsonSerializerjsonSerializer)atNewtonsoft.Json.Linq.JToken.FromObject(Objecto,JsonSerial

c# - "Predefined type ' System.* ' is not defined or imported"错误,visual studio 代码,omnisharp

我在几个.net核心应用程序中遇到上述错误的问题。我正在使用vscode版本1.18.0,但错误已经开始出现在以前的版本中。错误出现在每个.cs文件中的每种数据类型(如字符串、整数、void等)以及类导入。所有项目仍然可以正常编译和运行。同样在另一个工作站上,我没有在同一个项目中遇到问题,所以它似乎是本地omnisharp/vscode或windows?问题。有没有人遇到过类似的问题并设法修复它或对我可以尝试的方法有任何建议?我已经重新安装了vscode和omnisharp,但我仍然遇到问题。示例错误:未定义或导入预定义类型“System.Object”[GG]

c# - 如何保证 Array 中 "reference type"项目的更新对其他线程可见?

privateInstrumentInfo[]instrumentInfos=newInstrumentInfo[Constants.MAX_INSTRUMENTS_NUMBER_IN_SYSTEM];publicvoidSetInstrumentInfo(Instrumentinstrument,InstrumentInfoinfo){if(instrument==null||info==null){return;}instrumentInfos[instrument.Id]=info;//needtomakeitvisibletootherthreads!}publicInstru

c# - Code First 迁移种子错误 : The binary operator Equal is not defined for the types 'System.Nullable` 1[System. Int32 ]' and ' System.Int32'

在我的数据库中播种时,我的更新标识符出现以下问题:context.ClientPromos.AddOrUpdate(cp=>new{cp.ClientID,cp.Recommendation_ID,cp.PromoCode_ID},newClientPromo{ClientID=0,Recommendation_ID=Rec30Off.RecommendationID,PromoCode_ID=pc30PerOffProd.PromoCodeID},newClientPromo{ClientID=0,Recommendation_ID=RecKnow.RecommendationID,