In ASP.NET MVC application I have an action Page() which renders a page (like a wiki page).
Now, I have another action RenderPdf() which should collect the HTML output of Page() and use HTML2PDF component to create PDF version of that page.
How do I collect the HTML output of one action within another action. Note: not in the view, bu...
I have a base page class where i set client target with
protected override void FrameworkInitialize()
{
base.FrameworkInitialize();
ClientTarget = "ie5";
}
for standart rendering for all browser. I now i need to change it to it's original state (auto?) for a single page that inherits my base page class.
How can i do it?
...
Is there a way in Visual Studio (2008 if it matters) that I can, in debug/break mode, write the contents of a variable to a text/XML file?
The scenario is that I have a long process running in debug and I have realised too late that I haven't logged enough detail about the events that the process has been monitoring, but fortunately a ...
Hi all,
If I'm only WRITING to a socket on an output stream, will it ever block? Only reads can block, right? I am asking because someone told me writes can block but I only see a timeout feature for the read method of a socket - socket.setSOTimeout(). It doesn't make sense to me that a write could block but I'd like to hear for sure...
When trying to debug a program on Windows I can't seem to find where the output I push to stderr is going. How do I get a hold of my stderr output? Is there a debugger-level setting (MSVC 9) I can change to redirect stderr to some part of the UI?
Update: I have not looked into TRACE or OutputDebugString, but the code base is cross-platf...
I'm interested in clearing the output of a C program produced with printf statements, multiple lines long.
My initial guess was to use
printf("output1\n");
printf("output2\n");
rewind(stdout);
printf("output3\n");
printf("output4\n");
but this produces
output1
output2
output3
output4
I was hoping it would produce
outpu...
First off let me apologize to the SO community for coming to you with something that ought to be so trivial. But I've been at this all day and I'm at the end of my rope.
There is a section of my program that needs pull text from an input stream and an error stream from a process that is launched using Runtime.getrunTime().exec() and pa...
When I run this code, the number at the top of the output window is 99701. Why don't I get to see all the way through 1? I actually see all the numbers getting outputted, but on the console window, I can only SCROLL high enough to see 99701 (I'm guessing). I'm using Visual C# express on Vista Home. :D
using System;
using System.Collecti...
Whenever I choose a custom output folder in a WCF Service or Web project in VS .NET 2008, running the project always gives me errors or inconsistencies as far as finding the right referenced assemblies.
For example, if the output folder is < solution root >\bin instead of < solution root >\Project\bin, the project will still attempt to ...
I'm seeking C++ help in writing HTML code to a new tab in Firefox within an extension.
Our C++ code has been partially wrapped by an XPCOM wrapper and embedded within a Firefox extension thanks to the work of a consultant we have lost contact with, and still partially implemented by calling out to a standalone executable.
To get our ou...
Is there any easy way to tell perl "now ignore everything that is printed"?
I have to call a procedure in an external Perl module, but the procedure prints a lot of unnecessary information (all through standard print).
I know select can be used to redirect it somehow, but I am not too wise from reading perldoc on it.
edit: I found th...
What would be the absolute fastest possible way to write a string to the standard/console output on Windows? I'm interested in the solution for both null- and non-null-terminated strings.
...
here is the code
ob_start(array(&$dispatcher, 'outputCallback'));
include($file);
ob_end_flush();
function outputCallback($string) {
if(ob_get_level() == 1) {
$static =& ParserStatic::getInstance();
return $static->insertToppings($string);
}
return false;
}
the problem is when i return $string it b...
Hey guys
I'm trying to build an XML feed from a database with a ginormous table, almost 4k records. I want to use output buffering to get it to spit out the XML but the script still keeps on timing out.
ob_start();
$what = 'j.*, (select description from tb_job_type as jt WHERE jt.jobtype_id = j.job_type_id) as job_type,';
$what .= '(s...
I have a small script, which is called daily by crontab using the following command:
/homedir/MyScript &> some_log.log
The problem with this method is that some_log.log is only created after MyScript finishes. I would like to flush the output of the program into the file while it's running so I could do things like
tail -f some_log....
I'm making a script that handles a predefined set of data, outputting to a file. I want to pop up a warning when one datum (which is always "Regular" in every set that I've had access to) is different stating that this value is unhandled (since I don't know how it affects the data). Should I output this warning to stderr or stdout?
...
Hey guys,
i want to parse an xml file with jquery. This works so far, only the output confuses me:)
probably you can help me.
$(function(){
$.get("images.xml",{},function(xml){
var output = "<ul>";
$(xml).each(function() {
smallImage = $(this).find("small").text();
//bigImage = $(this).find("big").text();
...
Question is simple:
How can I color java output?
For example in C and other languages I can use ansi-escape like \033[0m to do this. But in java it doesn't work.
public static void main(String[] x) {
System.out.println("\033[0m BLABLA \033[0m\n");
}
...
Background: Here the goal is to do some basic commands in powershell using select-string. For some reason, there are certain things that are not working as expected.
Assume the following:
$vfilter = 'c:/foo/bar/files/*.htm';
Select-String -path $vfilter -pattern ".*DOCTY.*" |
sort LineNumber |
where-object { $_...
Is it possible for PHP file to print itself, for example <?php some code; ?> that I get output in HTML as <?php some code; ?>(I know its possible in c++), if not is it possible to actually print html version of php code with nice formatting and colors such as from this url inside code container http://woork.blogspot.com/2009/07/twitter-a...