I have been using Process.Start to launch executables (.exe) files. Now I need to execute a .pl file with some arguments. can I still use Process.Start or I need a different approach?
this is a telecom based query.
we receive TAP files from the clearing house.
i want see on unix which version of TAP does it belong.
how can i do it.Isthere any tool to find the TAP file version?
Hi
I have an inputStream and i want to write it to a file.
I saw NIO and the FileChannel which has the method "transferTo" ou "transferFrom" and i know how to create the WriteableChannel, but i don't know to transform my inputStream to a ReadableChannel.
Thanks.
In the View page, code is below:
<% =Html.BeginForm("About", "Home", FormMethod.Post, new {enctype="multipart/form-data "})%>
<input type ="file" name ="postedFile" />
<input type ="submit" name ="upload" value ="Upload" />
<% Html.EndForm(); %>
In the Controller, something like this:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult About(HttpPostedFile postedFile)
{
//but postedFile is null
View();
}
But postedFile is null, how to do it?
I was wondering what the best option for generating doc for rails, its plugin and the app in one single file that I can navigate.
I've been using rdoc but that creates multiple files, yard is too slow and hanna gets stuck at random places.
Any help?
I have big file with utf16le (BOM) encoding.
Is it possible to convert it to usual UTF8 by python?
Something like
file_old = open('old.txt', mode='r', encoding='utf_16_le')
file_new = open('new.txt', mode='w', encoding='utf-8')
text = file_old.read()
file_new.write(text.encode('utf-8'))
http://docs.python.org/release/2.3/lib/node126.html (-- utf_16_le UTF-16LE)
Not working. Can't understand "TypeError: must be str, not bytes" error.
python 3
I need to write a string (URL) to the file system in the install override method in my Setup project custom action, and be able to read it at Uninstall. How can achieve this?
Thanks.
I'm trying to decide the best way to include an image that is required for a script I've written.
I discovered this site and it made me think about trying this method to include the image as a data URI since it was so small - it's a 1x1 pixel 50% opacity png file (used for a background) - it ends up at 2,792 bytes as an image versus 3,746 bytes as text in the CSS.
So would this be considered good practice, or would it just clutter up the CSS unnecessarily?
Is it possible to combine multiple PHP files via the command line and create an HTML file?
For example, this will save the rendered version of a single PHP file as HTML:
php /path/to/my/file/filename.php > /path/to/my/file/test.html
I need it to combine multiple files, but I can't seem to get it it to work. Ideally, it would be something like this:
php /path/to/my/file/filename.php + /path/to/my/file/filename2.php + /path/to/my/file/filename3.php > /path/to/my/file/test.html
Is this possible? If so, how?
How to retrieve rows from a file from #SOF to #EOF
in source.sh
#SOF
"Lorem ipsum dolor sit amet"
"Vivamus pretium enim"
"Est accumsan enim magnis"
#EOF
#SOF
"Eleifend tincidunt id justo"
"Tellus ut tincidunt vel ac a orci"
"Sapien Nullam Sed nunc"
"Vestibulum est accumsan enim"
#EOF
#SOF
"Consequat mauris mollis montes"
#EOF
I need to get 3 files
in target_1.sh
"Lorem ipsum dolor sit amet"
"Vivamus pretium enim"
"Est accumsan enim magnis"
in target_2.sh
"Eleifend tincidunt id justo"
"Tellus ut tincidunt vel ac a orci"
"Sapien Nullam Sed nunc"
"Vestibulum est accumsan enim"
in target_3.sh
"Consequat mauris mollis montes"
Tell someone how to do it? thank you for your help
Hi all,
I am just trying to count the number of white spaces to the LEFT of a line from a text file.
I have been using
count( line.begin(), line.end(), ' ' );
but obviously that includes ALL white spaces to the left, in between words and to the right.
So basically what I'm wanting it to do is once it hits a non-space character stop it from counting the white spaces.
Thanks everyone.
I got a bunch of Pictures and Videos in a directory and needs to be displayed in the WPF application, I am thinking about displaying the Win7 Large Icon itself as the preview image. Because that will save me the work of grabbing an appropriate frame from the video file since Windows is doing that job pretty well already.
Any code snippet to access this Shell Icon image data?
I am using Apache Common Logging in Desktop Application.
private static final Log log = LogFactory.getLog(Utils.class);
How can I direct, Apache Common Logging to write to disc log file, when I perform
log.error(null, exp);
Thanks.
My SSIS package has logging configured with a SSIS log provider for text files, which works fine, but each time the package is run the log appends to the end of the log file. I want it to truncate the file and only keep the log from the most recent execution of the package, but I don't see an option anywhere to do that.
I've tried both file usage types (Existing file and New file) in the File Connection manager with the same results.
int main ( )
{
char C[] = "Hello World";
write(0,C,sizeof(C));
return 0;
}
In the above program, I am writing to File descriptor ZERO which I suppose by default is STDIN.. Then why I am I getting output at STDOUT?
shadyabhi@shadyabhi-desktop:~$ ./a.out
Hello Worldshadyabhi@shadyabhi-desktop:~$
I am being asked to make a "download" button that downloads the contents of a textarea on the same page as a file, with the browser's "Save As" dialog showing up. Copy/paste would do the job just fine, but it is a "requirement".
Right now, I am just posting the contents of the textarea to the server, which echos them back with "Content-disposition: attachment" slapped on. Is there a way to do this with just client-side Javascript?
Is it possible to write objects in Java to a binary file? The objects I want to write would be 2 arrays of String objects. The reason I want to do this is to save persistent data. If there is some easier way to do this let me know.
Thanks in advance!
Sometimes when I enter a non-existent file match in ido, by mistake, it freezes.... is there an option I can turn off.... it works really well the rest of the time.
I have a web deployment project that does a web.config section replacement using an external file. (this is to change the connection strings section).
The web.config section replacement works fine when built manually, but when built as part of a TFS build the section is not replaced. I cannot find any errors or warnings in the build log.
What are the likely causes, or how can I 'debug' this?
I've been getting an error recently while debugging an ASP.NET application in Visual Studio 2008:
'Error connecting to undo manager of source file XYZ'
Any idea how I can get rid of the error?
I have a pdf copy of a file for creating a report and basing from this form we will generate a report on it...
is there any way that i can fill out the needed fields on the pdf form through python?? and how to do it if there is any way to do it??
thanks in advance :)