file

How do I "kick-start" a jcl stream on the mainframe using FTP inside vb.net 2008

The following is the code that uploades a bytearray into a file DSN on our mainframe. It works very well. What I want to do is upload the jcl which should then start to execute. That's the part I am stuck on. I used to be able to do it through WININET, but I want to get away from that and use the better FTP commands in vb.net Pub...

How to eliminate last digit from each of the top lines

Hi all. I have a file. >Sequence 1.1.1 ATGCGCGCGATAAGGCGCTA ATATTATAGCGCGCGCGCGGATATATATATATATATATATT >Sequence 1.2.2 ATATGCGCGCGCGCGCGGCG ACCCCGCGCGCGCGCGGCGCGATATATATATATATATATATT >Sequence 2.1.1 ATTCGCGCGAGTATAGCGGCG NOW,I would like to remove the last digit from each of the line that starts with '>'. Fo...

Vista Reverts My Code On Me

For some strange reason, when I move a PHP file from one folder to another, Vista copies an old version of the file instead of the current version. This really screws up the web application I'm working on and causes me to waste time in figuring out the problem. What the hell is going on here and how do I prevent Vista from copying or m...

Remove last digit from file

Hi all. I have a file. Sequence 1.1.1 ATGCGCGCGATAAGGCGCTA ATATTATAGCGCGCGCGCGGATATATATATATATATATATT Sequence 1.2.2 ATATGCGCGCGCGCGCGGCG ACCCCGCGCGCGCGCGGCGCGATATATATATATATATATATT Sequence 2.1.1 ATTCGCGCGAGTATAGCGGCG NOW,I would like to remove the last digit from each of the line that starts with '>'. For example, in thi...

Download a file over HTTP into a byte array in C#?

Hi, I'm trying to read a file that I have a web address for into a byte array. I've been using File.ReadAllBytes to read files locally and I've been unable to figure out the cleanest way to do this for a file on the web. I imagine this is just a quick snippet of code, but everything I can find through search is only for local files....

generic way to detect file corruption using C#?

I'm looking for a way to detect file corruption using C#. Maybe this is too vague, but I'm not looking for specific types of corruption, just wondering if there's a way to detect that a file has been corrupted in general. Anyone know if this is possible and if so how you'd do it in C#? Thanks. ...

Replacing keywords in a PHP script file using PHP

I have a PHP file with a mix of html, text and php includes name areaname-house.php. The text/html parts of the file contain the String "areaname" in various places. On the other hand I have an array of Strings with city names. I need a PHP script which can take each string (from strings array), copy the areaname-house.php and create a ...

How to store an image using NSData in Objective C

How do I take a UIImage and store it preferably as NSData (to write to a file)? Is there some obvious method out there, or could someone provide a code snippet? Thanks in advance! PS. My next question will probably be for a code snippet to capture the current screen image. The snippets I've seen so far appear to be serious overkill f...

Can I do this in powershell? Read the Registry, write out binary contents to file.

This is the C# code. Can you help me translate this to powershell? private static void Main(string[] args) { byte[] buffer = (byte[]) Registry.LocalMachine.OpenSubKey(@"HARDWARE\ACPI\DSDT\HP____\8510x\00010000").GetValue("00000000"); if (File.Exists("8510x.orig")) { Console.WriteLine("File 8510x.orig already exists...

move_uploaded_file help

<?php if (count($_POST)) { $userfile = $_FILES['userfile']['name']; $file_size = $_FILES['userfile']['size']; $file_temp = $_FILES['userfile']['tmp_name']; $path = 'uploads/'; $randomizer = rand(0000, 9999); $file_name = $randomizer.$userfile; if($file_size > 25600) { echo 'FILE SIZE TO LARGE<BR />'; exit(); }...

Playing a .WAV file in .NET

I'm trying to write a SAMPLER program, where each key has a different sound (a WAV file). Can someone explain to me or give me a link to an explanation where i can learn how to play the WAV files? If it matters, I'm working with Microsoft Visual C# and using WinForms. ...

How to copy text file to string in C?

I need to copy the contents of a text file to a dinamically-allocated character array. My problem is getting the size of the contents of the file; Google reveals that I need to use fseek and ftell, but for that the file apparently needs to be opened in binary mode, and that gives only garbage. EDIT: I tried opening in text mode, but I g...

How do I read or write GTK TreeStores from/to files?

Hi! I'm new to this. How do I store a TreeStore to a file? I can store specific values from the underlaying TreeStore through the TreeModel interface, but is there any way of "grabbing" the whole underlaying TreeStore as a value, or do I have to traverse the TreeStore, storing a row at a time? /J ...

Is there anyway to compress jpeg using any technology to decrease upload time?

I have an online tool through which another user upload photos. The user is having issues when using slower bandwidth. I found this http://en.wikipedia.org/wiki/Lossless%5Fdata%5Fcompression 1) Is there any tool or API that utilizes this algorithm? 2) Will it slow the upload process for being able to compress locally? ...

iPhone file extension app association

Hello everybody! On my iPhone, I'm running an app called Caissa Chess. After registering the app with the manufacturer (this is optional) I received an email, containing a chess puzzle. The crucial part of the mail message, showing a chess diagram looks like this: <a href="chess://puzzle/8/p1R3p1/4p1kn/3p3N/3Pr2P/6P1/PP3K2/8 w ?term=w2...

upload SLD file to geoserver

Hi all, i want to upload SLD file to geoserver by REST. I use geoserver version 1.7.6 in Ubuntu. I have upload file: names:chool_point.sld using Poster. url:http://localhost:8080/geoserver/rest/styles?name=school%5Fpoint content-type:application/vnd.ogc.sld+xml method:Post this is my sld content: xsi:schemaLocation="htt...

Any efficient way to read datas from large binary file?

Hi, I need to handle tens of Gigabytes data in one binary file. Each record in the data file is variable length. So the file is like: <len1><data1><len2><data2>..........<lenN><dataN> The data contains integer, pointer, double value and so on. I found python can not even handle this situation. There is no problem if I read the wh...

Find line in text file, check for text in between?

Question about Batch/Windows/CMD: I would like that my batch file can search for a line (which I already achieved, but what comes next not), it looks like this: <name>MyName</name> It needs to find the text in between <name> and </name>. After that it needs to set that as a variable (%name%). Does anyone have any idea? EDIT: if som...

nicer way to do this? (reading files in php)

Hi there, I just figured out how to read some files but I really don't like it. I have some files named 1.txt, 2.txt, 3.txt and so on. I need to read and print just the last 2 files. I found a way to do it but I would like to see some other ways to do it. My way: <?php $i = 1; $x = 1; while (file_exists('news/'.$i.'.txt')){ ...

Beginner Java (Help with class assignment)

This is a lab I am working for for a CSE 201. The program is supposed to read information about students and their scores from a file, and output the name of each student with all his/her scores and the total score, plus the average score of the class, and the name and total score of the students with the highest and lowest total score. ...