file

MVC Open a FileContentResult also return a json result with same action

Hi I Want to Open a File as pdf but i also want to return my resluts on web page with the same action how would i do that. here is my code. public JsonResult FindRecordings(SearchCriteria criteria) { if ( string.IsNullOrEmpty(criteria.OrderNumber) && string.IsNullOrEmpty(criteria.ReferenceId) && string.IsNullOrEmpty(...

How can I display a full designer file in c#?

So I just got a C# program from someone that compiles and gives me a fully functional application. However, when I want to see the .cs{Design] file it gives me the following error: .ErrorStyle { font-family: tahoma; font-size: 11 pt; .... How can I convert this to an actual Design file? I am working on Visual Studio C#. Thank you ve...

Extracting text from a file where date -time is the index

I have got around 800 files of maximum 55KB-100KB each where the data is in this format Date,Time,Float1,Float2,Float3,Float4,Integer Date is in DD/MM/YYYY format and Time is in the format of HH:MM Here the date ranges from say 1st May to 1June and each day, the Time varies from 09:00 to 15:30. I want to run a program so that, for ea...

Read/Write/Find/Replace huge csv file

I have a huge (4,5 GB) csv file.. I need to perform basic cut and paste, replace operations for some columns.. the data is pretty well organized.. the only problem is I cannot play with it with Excel because of the size (2000 rows, 550000 columns). here is some part of the data: ID,Affection,Sex,DRB1_1,DRB1_2,SENum,SEStatus,AntiCCP,RFU...

how to access directory from file server in java?

HI... Currently I m working in a application in which application allows to access directory (which contains some files) from file server to Application (client). I tried following code.. URL url=("http://192.168.5.555/file-server/user/images/"); URI uri=url.toURI(); File list[]; list= new File(uri).listFiles(); But its thrown jav...

How to test if a user has SELECTED a file to upload ?

Hello, on a page, i have : if (!empty($_FILES['logo']['name'])) { $dossier = 'upload/'; $fichier = basename($_FILES['logo']['name']); $taille_maxi = 100000; $taille = filesize($_FILES['logo']['tmp_name']); $extensions = array('.png', '.jpg', '.jpeg'); $extension = strrchr($_FILES['logo...

Create unique file name and fetching it to commandline argument

Hi everyone, I am working on python right now and i am little bit stuck in performing some tricks. I have web form with two options- File upload and textarea, i can easily pass file name with file upload options but have problem when it's textarea. Because when i use textarea then first i have to save values passed from textarea to some...

Can jQuery retrieve a file?

I have a django application that creates xls and txt files. I'm trying to create a button which sends a jQuery.get request to django, django then returns a freshly created file to jQuery which in turn pops open a save as dialog. My code looks like this: jQuery("#testButton").live("click",function() { jQuery.jGrowl("click"); ...

special characters in file/folder names on Linux; Rename php function not working

I am using a function Rename() (php) to move some images from one folder to another. The destination folder has special characters in them. However, when doing this on the server I get the error that the folder isn't found with the name. And in that error, the folder names special characters are replaced with Squares: Warning: rename(...

What is the difference between File.ReadAllLines() and File.ReadAllText()?

What is the difference between File.ReadAllLines() and File.ReadAllText()? Thank you very much. ...

php obtaining complex file extension like mysql-5.0.1.tar.gz

I've run into a typical problem here. Till now i was doing strstr($filename,"."); $filename is the file i got from $_FILE i.e uploaded file.It was running fine until i hit a filename of the type i mentioned. Even doing pathinfo($filename); gives me .gz I need to see whether it is EXACTLY .tar.gz ...

Stream a continously growing file over tcp/ip

Hello, I have a project I'm working on, where a piece of Hardware is producing output that is continuously being written into a textfile. What I need to do is to stream that file as it's being written over a simple tcp/ip connection. I'm currently trying to that through simple netcat, but netcat only sends the part of the file that is ...

open encrypted file

Hi, I'm looking for a way to open encrypted files that are stored on a server. I'm using mcrypt to encrypt the files. I was initially going to create a class that would open the file, decrypt it, write it to a new location, then open that. But I have convinced myself there is a better way (I just don't know what it is). It seems like ...

Modify MP3 File

Hello, I have an MP3 file uploader. I want to add an additional audio track to the file upon upload - via PHP. Is that possible? Thanks in advance! ...

MacOSX - File extension associate with application - Programatically

I'm trying to get my program to automatically associate certain file extensions to be opened by it but I'm not sure how to do that in MacOSX. I'm not asking how to associate a program with a file extension in the GUI, I want to be able to program it into my program. ...

AS3 Function to start download after clicking a button!

Hello there, I need an actionscript 3 function for my website, that lets people download a document after they have clicked on a button. Couldn't find this anywhere on the net. Thanks! Jennifer ...

how to add record in alphabetical order

A File contains (a.txt) # this is test file Data: 15th may 2010 Records : a b c d g l just consider if i want to add new record "f" - i want addit in betwen d and g ...

Is there any way to allow failed uploads to resume with a Perl CGI script?

The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times. Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in th...

Convert file: Uri to File in Android

What's the easiest way to convert from a file: android.net.Uri to a File in Android? Tried the following but it doesn't work: final File file = new File(Environment.getExternalStorageDirectory(), "read.me"); Uri uri = Uri.fromFile(file); File auxFile = new File(uri.toString()); assertEquals(file.getAbsolutePath(), auxFile.getAbsolu...

Fastest way in C# to read block of bytes from file and converting to float[]

Hi! I need a fast way in C# leanguage of converting/casting array of bytes encoding one short (int16) value for 2bytes into float representation, as fast as possible. Performance bottleneck was method: samples[sample] = (float)binraryReader.readInt16(); (huge ammount of IO calls so i had to convert to block read) Basically i have fil...