Perl, how to avoid diagnostic messages from not-directly included modules?

五迷三道 提交于 2020-01-25 08:28:05
问题 I'm getting this warning (after "use diagnostics;"); Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/lib/perl5/HTML/PullParser.pm line 81. My program is like this: ... use diagnostics; use WWW::Mechanize; use WWW::Mechanize::Gzip; ... $m = WWW::Mechanize::GZip->new( agent => $self->{_agent}, timeout => $self->{_timeout}, ); if (!$m->get($url)) { die("Impossibile scaricare l'url [$url]"); } if (!$m->form_number(1)) { die("Impossibile trovare il form 1"); } <WARNING

Where can I find the IIS logs?

一曲冷凌霜 提交于 2020-01-18 03:48:49
问题 I'm trying to set up an application from a third party, which requires a supporting website hosted in my local IIS. I've created a website exactly as explained in their install guide, but am having some problems, and would like to see what the IIS log has to say. Embarrassingly enough, the problem is I can't find the log files! So my question is: Where does IIS7 store logs by default? 回答1: I think the default place for access logs is %SystemDrive%\inetpub\logs\LogFiles Otherwise, check under

Is it possible to ensure copy elision?

大城市里の小女人 提交于 2020-01-11 08:33:09
问题 Copy elision is a neat optimization technique and in some cases relying on copy elision can actually be faster than passing around references "by hand". So, let's assume you have identified a critical code path where you rely on the fact that the copy elision is performed by your compiler for the code path for maximum performance. But now you are relying on a compiler optimization. Is there any (compiler specific, obviously) way to ensure that the copy elision is actually performed and have

Getting from ProcessThread to a managed thread

穿精又带淫゛_ 提交于 2020-01-10 01:40:27
问题 Periodically we get a hang on shut down of a Windows service in a production environment that we just cannot reproduce. It can be months before it happens again. I'm putting in some diagnostics to try and help with the issue, one thing I'm looking at is adding an event to the system thread pool for 60 seconds after we initiate shut down of the application. Our application should shutdown cleanly within 10 seconds maximium. In this event I would like to trace out the remaining running threads

Method to dump classes on the classpath from inside JVM?

[亡魂溺海] 提交于 2020-01-01 06:26:35
问题 My code is failing with a ClassNotFoundException . I can see that the jar file containing the class is definitely on the classpath from the command prompt execution. Is there a way to dump the list of classes on the classpath from the JVM? (Ideally some Java code). (I don't want to see the classes in a directory, I want to see a list of what is loaded into the JVM). 回答1: That's actually not what you want to see if you're getting a CNFE , since it's not found. Plus not all available classes

What diagnostic tools are available for Node.js applications?

我怕爱的太早我们不能终老 提交于 2019-12-24 03:14:10
问题 There are many tools out there, which diagnostics tools are good for diagnostic memory leak issues for node.js applications? 回答1: Yes, IDDE is a powerful tool not only for memory leak detection, but for a wide variety of problem determination of Node.js misbehaviors, including crashes and hangs. Here is the link for overview, installation, and what is new information: https://www.ibm.com/developerworks/java/jdk/tools/idde I would start with nodeoverview command. Note that every command starts

Async TCP System.Net.Socket send (Begin/End Send) not actually sending anything

拟墨画扇 提交于 2019-12-21 05:48:52
问题 Background: I am running a TCP server on one machine with multiple clients on separate machines connecting over TCP, and I am monitoring network traffic with Wireshark, as well as with logging from within my server application, and through the System.Diagnostics tracelistener on System.Net.Sockets in verbose mode. Problem: Prompted to examine my logs due to some unexpected disconnects, I see some very strange behavior. According to the server application logs, and the System.Diagnostic output

Can you get a list of variables on the stack in C#?

给你一囗甜甜゛ 提交于 2019-12-21 02:56:08
问题 All, just wondering if it's possible in .NET/C# to get a list of variables on the stack and their values? I am creating an exception handler for my app and beyond a standard stack trace I'd also like to see the names and values for any variables that are on the stack. Any idea if this can be done? 回答1: Yes, the StackFrame class can help you with that. Linkage Something along these lines var currentStackFrame = new StackFrame(1); var props = currentStackFrame.GetMethod().GetParameters(); 来源:

Getting process information in .NET

泪湿孤枕 提交于 2019-12-11 16:42:11
问题 Duplicate of this question. update - This is not an exact duplicate. See my solution. I see a java.exe process in process explorer, and double clicking it gives me its working directory & starting command line arguments. From .NET, I run the following code and get a process with the same PID but the above fields are empty. Apparently, this is documented. foreach (Process process in Process.GetProcessesByName("java")) { ... } So how do I get the correct startinfo field values, without peeking

Convince Webpack to explain its `Can't resolve 'foo'` error

蓝咒 提交于 2019-12-11 06:22:40
问题 How can I convince Webpack to, when it is going to emit Can't resolve 'foo' , also emit information about where it tried to find that library? The error message Can't resolve 'foo' is unhelpful because it is a dead end. The reader has no clue which paths Webpack tried and failed; so there's no information to distinguish: The file is in a known location, Webpack found it there, but for some reason didn't use it. (Implies the need for diagnostic information about why it didn't use it.) The file