Search Results

Search found 89549 results on 3582 pages for 'large file support'.

Page 70/3582 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Create unique file name and fetching it to commandline argument

    - by user343934
    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 files and save it on the working directory. After that i can execute commandline argument and pass same saved filename name. For this problem i have to generate unique file first and save the values passed from textarea in it. Can anybody give me some tips to solve my problem. Any algorithms, suggestions and lines of code are appreciated. Thanks for your concern

    Read the article

  • Read from file into pointer to struct

    - by cla barzu
    I need help with pointers in C. I have to read from a file, and fill an array with pointers to struct rcftp_msg . Since now I did the next things: struct rcftp_msg { uint8_t version; uint8_t flags; uint16_t len; uint8_t buffer[512]; }; struct rcftp_msg *windows [10]; pfile = fopen(file,"r"); // Open the file I have to read from the file into the buffer, but I don't know how to do it. I tried the next: for (i = 0; i <10; i++){ leng=fread (**windows[i]->buffer**,sizeof(uint8_t),512,pfile); } I think windows[i]-buffer is bad, cuz that don't work. Sorry for my bad English :(

    Read the article

  • Display only file name in FileUpload control

    - by Jagd
    I have a webpage in asp.net 3.5 that uses the FileUpload control. When a user clicks on the "Browse" button (which is part of the control) the control displays a file select popup (dialog box). When the user selects the file which they wish to upload, by default the full path to the file is shown in the textbox (which is also part of the control); however, I wish for it to only display the file name and not the full path. Anyone know of a slick and easy way to do this?

    Read the article

  • Set registry to control working dir when associating file-type with application

    - by John
    I'm using Inno for an installer, and I want to associate a file type with my app: Root: HKCR; Subkey: ".rpl"; ValueType: string; ValueName: ""; ValueData: "MyReplay"; Flags: uninsdeletevalue; Root: HKCR; Subkey: "MyReplay"; ValueType: string; ValueName: ""; ValueData: "Replay File"; Flags: uninsdeletekey; Root: HKCR; Subkey: "MyReplay\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\bin\MyApp.ico,0"; Flags: uninsdeletekey; Root: HKCR; Subkey: "MyReplay\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\bin\MyApp.exe"" ""%1"""; Flags: uninsdeletekey; Right now, double-clicking a .rpl file launches the app, but the working dir appears to be where the .rpl file is located, so the app crashes as it can't load any data. Is it posible to set the registry to control the start/working dir for file associations as well as the app that is launched? Or does my app itself need to be able to work around this?

    Read the article

  • change file descriptor for socket in python

    - by Dani
    Hello everybody I'm trying to manually create the file descriptor associated with a socket in python and then loaded directly into memory with mmap. Create a file into memory with mmap is simple, but I can not find a way to associate the file with a socket. Anyone know how? thank you very much.

    Read the article

  • What tool to use to draw file tree diagram

    - by Michael
    Given a file tree - a directory with directories in it etc, what software would you recommend to create a diagram of the file-tree as a graphic file that I can embed in a word processor document I prefer vector (SVG, EPS, EMF...) files. The tool must run on Windows, but preferably cross-platform. The tool may be commercial but preferably free.

    Read the article

  • Save PHP variables to a text file

    - by Ajith
    I was wondering how to save PHP variables to a txt file and then retrieve them again. Example: There is an input box, after submitted the stuff that was written in the input box will be saved to a text file. Later on the results need to be brought back as a variable. So lets say the variable is $text I need that to be saved to a text file and be able to retrieve it back again. Hope it makes sense, Thanks in advance!!!

    Read the article

  • Write file in sub-directory in Android

    - by Davide Vosti
    I'm trying to save a file in a subdirectory in Android 1.5. I can successfully create a directory using _context.GetFileStreamPath("foo").mkdir(); (_context is the Activity where I start the execution of saving the file) but then if I try to create a file in foo/ by _context.GetFileStreamPath("foo/bar.txt"); I get a exception saying I can't have directory separator in a file name ("/"). I'm missing something of working with files in Android... I thought I could use the standard Java classes but they don't seem to work... I searched the Android documentation but I couldn't fine example and google is not helping me too... I'm asking the wrong question (to google)... Can you help me out with this? Thank you!

    Read the article

  • Reading parameters from External file - C#

    - by mouthpiec
    I am writing an application using C# and I would like to read some parameters from an external file like for example a text file. The parameters will be saved in the file in the form of parA = 5 parB = hello etc Can you pleas suggest a way how I can do this?

    Read the article

  • Reading line by line from a file in C

    - by mh234
    What I am trying to do is print out the contents of a file line by line. I run the program in terminal by doing: ./test testText.txt. When I do this, random characters are printed out but not what is in the file. The text file is located in the same folder as the makefile. What's wrong? #include <stdio.h> FILE *fp; int main(int argc, char *argv[]) { char line[15]; fp = fopen(*argv, "r"); while((fgets(line, 15, fp)) != NULL) { printf(line); printf("\n"); } }

    Read the article

  • DIR $file "File Not Found" vs DIR $filedir shows it....not permissions, not USB

    - by Kev
    I was having this problem before on a USB drive, but now it's happening on my main RAID5-backed hard disk: 2013-10-17 9:37 C:\>dir "C:\Shares\Shared\Reference\Safety Management System\Vid eo CD\AutoPlay\Docs\Manuel*" Volume in drive C has no label. Volume Serial Number is 3C18-E114 Directory of C:\Shares\Shared\Reference\Safety Management System\Video CD\AutoP lay\Docs 2003-09-09 11:29 PM 1,056,768 Manuel d'intervention d'urgence MFC.doc 2004-06-20 10:36 PM 139,849 Manuel d'intervention d'urgence MFC.pdf 2 File(s) 1,196,617 bytes 0 Dir(s) 196,068,691,968 bytes free 2013-10-17 9:38 C:\>dir "C:\Shares\Shared\Reference\Safety Management System\Vid eo CD\AutoPlay\Docs\Manuel d'intervention d'urgence MFC.doc" Volume in drive C has no label. Volume Serial Number is 3C18-E114 Directory of C:\Shares\Shared\Reference\Safety Management System\Video CD\AutoP lay\Docs File Not Found 2013-10-17 9:38 C:\> This is from a Command Prompt window where I went to Properties and told it I wanted to modify who it ran as. I opened it, had it run as me with the "restricted access" unchecked, then ran the above. The file in question has the following ACLs: Administrators, SYSTEM, and OurCompanyUsers. All three have full control of everything. Nobody has any Deny bits set. I am a member of Administrators. So I don't believe it's a permissions issue. It's not a USB drive, so this time there is no question of USB hardware. Windows Server 2003 Standard Edition SP2. What does this mean? Is this more likely a hardware or software problem?

    Read the article

  • I can't open a Word file because it's too large

    - by Jane
    I was creating a file with MS Word 2007 where I included a number of images. I didn't compress them as I was putting them into the file. I managed to save the file, but have not been able to reopen it ever since, as it says that I have exceeded the 32 MB limit. I am working on an old Macbook (OS X 10.4.11). I have tried to open the file in both OpenOffice and LibreOffice, but it just causes those programs to crash. Is there any way of reducing the file size without opening the document?

    Read the article

  • Is there such a thing as a file hosted container which deduplicates data held within?

    - by Mallow
    Background I have backups of a website which stores all of it's data into a single file. This file is several gigs large and I have many different backups of this file. Most of the data within is mostly the same plus whatever was added or changed to it. I want to keep all the concurrent backups I've made through the years in case I find a horrible surprise of data corruption along the line. However storing a 10gig file every month gets expensive. Seeking Solution I've often thought about different ways of alleviating this problem. One thought that comes up very often combines the idea of a duplicating file system which doesn't require it's own partitioned volume on a hard drive. Something like what truecrypt does, what it calls, "file hosted containers" which when using the truecrypt program allows you to mount and dismount that volume as a regular hard drive. Question Is there a virtual hard drive mounter which uses file-based container which uses data deduplicaiton file system? (This question is a little awkward to put into words, if you have a better idea on how to ask this question please feel free to help out.)

    Read the article

  • Split a Large File In C++

    - by wdow88
    Hey all, I'm trying to write a program that takes a large file (of any time) and splits it into many smaller "chunks". I think I have the basic idea down, but for some reason I cannot create a chunk size over 12,000 bites. I know there are a few solutions on google, etc. but I am more interested in learning what the origin of this limitation is then actually using the program to split files. //This file splits are larger into smaller files of a user inputted size. #include<iostream> #include<fstream> #include<string> #include<sstream> #include <direct.h> #include <stdlib.h> using namespace std; void GetCurrentPath(char* buffer) { _getcwd(buffer, _MAX_PATH); } int main() { // use the function to get the path char CurrentPath[_MAX_PATH]; GetCurrentPath(CurrentPath);//Get the current directory (used for displaying output) fstream bigFile; string filename; int partsize; cout << "Enter a file name: "; cin >> filename; //Recieve target file cout << "Enter the number of bites in each smaller file: "; cin >> partsize; //Recieve volume size bigFile.open(filename.c_str(),ios::in | ios::binary); bigFile.seekg(0, ios::end); // position get-ptr 0 bytes from end int size = bigFile.tellg(); // get-ptr position is now same as file size bigFile.seekg(0, ios::beg); // position get-ptr 0 bytes from beginning for (int i = 0; i <= (size / partsize); i++) { //Build File Name string partname = filename; //The original filename string charnum; //archive number stringstream out; //stringstream object out, used to build the archive name out << "." << i; charnum = out.str(); partname.append(charnum); //put the part name together //Write new file part fstream filePart; filePart.open(partname.c_str(),ios::out | ios::binary); //Open new file with the name built above //Check if near the end of file if (bigFile.tellg() < (size - (size%partsize))) { filePart.write(reinterpret_cast<char *>(&bigFile),partsize); //Write the selected amount to the file filePart.close(); //close file bigFile.seekg(partsize, ios::cur); //move pointer to next position to be written } //Changes the size of the last volume because it is the end of the file else { filePart.write(reinterpret_cast<char *>(&bigFile),(size%partsize)); //Write the selected amount to the file filePart.close(); //close file } cout << "File " << CurrentPath << partname << " produced" << endl; //display the progress of the split } bigFile.close(); cout << "Split Complete." << endl; return 0; } Any ideas? Thanks!

    Read the article

  • How to Upload a file from client to server using OFBIZ?

    - by SIVAKUMAR.J
    Hi all, Im new to ofbiz.So is my question is have any mistake forgive me for my mistakes.Im new to ofbiz so i did not know some terminologies in ofbiz.Sometimes my question is not clear because of lack of knowledge in ofbiz.So try to understand my question and give me a good solution with respect to my level.Because some solutions are in very high level cannot able to understand for me.So please give the solution with good examples. My problem is i created a project inside the ofbiz/hot-deploy folder namely "productionmgntSystem".Inside the folder "ofbiz\hot-deploy\productionmgntSystem\webapp\productionmgntSystem" i created a .ftl file namely "app_details_1.ftl" .The following are the coding of this file <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <script TYPE="TEXT/JAVASCRIPT" language=""JAVASCRIPT"> function uploadFile() { //alert("Before calling upload.jsp"); window.location='<@ofbizUrl>testing_service1</@ofbizUrl>' } </script> </head> <!-- <form action="<@ofbizUrl>testing_service1</@ofbizUrl>" enctype="multipart/form-data" name="app_details_frm"> --> <form action="<@ofbizUrl>logout1</@ofbizUrl>" enctype="multipart/form-data" name="app_details_frm"> <center style="height: 299px; "> <table border="0" style="height: 177px; width: 788px"> <tr style="height: 115px; "> <td style="width: 103px; "> <td style="width: 413px; "><h1>APPLICATION DETAILS</h1> <td style="width: 55px; "> </tr> <tr> <td style="width: 125px; ">Application name : </td> <td> <input name="app_name_txt" id="txt_1" value=" " /> </td> </tr> <tr> <td style="width: 125px; ">Excell sheet &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </td> <td> <input type="file" name="filename"/> </td> </tr> <tr> <td> <!-- <input type="button" name="logout1_cmd" value="Logout" onclick="logout1()"/> --> <input type="submit" name="logout_cmd" value="logout"/> </td> <td> <!-- <input type="submit" name="upload_cmd" value="Submit" /> --> <input type="button" name="upload1_cmd" value="Upload" onclick="uploadFile()"/> </td> </tr> </table> </center> </form> </html> the following coding is present in the file "ofbiz\hot-deploy\productionmgntSystem\webapp\productionmgntSystem\WEB-INF\controller.xml" ...... ....... ........ <request-map uri="testing_service1"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.productionmgntSystem.web_app_req.WebServices1" invoke="testingService"/> <response name="ok" type="view" value="ok_view"/> <response name="exception" type="view" value="exception_view"/> </request-map> .......... ............ .......... <view-map name="ok_view" type="ftl" page="ok_view.ftl"/> <view-map name="exception_view" type="ftl" page="exception_view.ftl"/> ................ ............. ............. The following are the coding present in the file "ofbiz\hot-deploy\productionmgntSystem\src\org\ofbiz\productionmgntSystem\web_app_req\WebServices1.java" package org.ofbiz.productionmgntSystem.web_app_req; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; public class WebServices1 { public static String testingService(HttpServletRequest request, HttpServletResponse response) { //int i=0; String result="ok"; System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- Start"); String contentType=request.getContentType(); System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- contentType : "+contentType); String str=new String(); // response.setContentType("text/html"); //PrintWriter writer; if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) after if (contentType != null)"); try { // writer=response.getWriter(); System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - try Start"); DataInputStream in = new DataInputStream(request.getInputStream()); int formDataLength = request.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int byteRead = 0; int totalBytesRead = 0; //this loop converting the uploaded file into byte code while (totalBytesRead < formDataLength) { byteRead = in.read(dataBytes, totalBytesRead,formDataLength); totalBytesRead += byteRead; } String file = new String(dataBytes); //for saving the file name String saveFile = file.substring(file.indexOf("filename=\"") + 10); saveFile = saveFile.substring(0, saveFile.indexOf("\n")); saveFile = saveFile.substring(saveFile.lastIndexOf("\\")+ 1,saveFile.indexOf("\"")); int lastIndex = contentType.lastIndexOf("="); String boundary = contentType.substring(lastIndex + 1,contentType.length()); int pos; //extracting the index of file pos = file.indexOf("filename=\""); pos = file.indexOf("\n", pos) + 1; pos = file.indexOf("\n", pos) + 1; pos = file.indexOf("\n", pos) + 1; int boundaryLocation = file.indexOf(boundary, pos) - 4; int startPos = ((file.substring(0, pos)).getBytes()).length; int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length; //creating a new file with the same name and writing the content in new file FileOutputStream fileOut = new FileOutputStream("/"+saveFile); fileOut.write(dataBytes, startPos, (endPos - startPos)); fileOut.flush(); fileOut.close(); System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - try End"); } catch(IOException ioe) { System.out.println("\n\n\t*********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - Catch IOException"); //ioe.printStackTrace(); return("exception"); } catch(Exception ex) { System.out.println("\n\n\t*********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - Catch Exception"); return("exception"); } } else { System.out.println("\n\n\t********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) else part"); result="exception"; } System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- End"); return(result); } } I want to upload a file to the server.The file is get from user "<input type="file"..> tag in the "app_details_1.ftl" file & it is updated into the server by using the method "testingService(HttpServletRequest request, HttpServletResponse response)" in the class "WebServices1".But the file is not uploaded. Give me a good solution for uploading a file to the server. Thanks & Regards, Sivakumar.J

    Read the article

  • Java compiler error: "cannot find symbol" when trying to access local variable

    - by HH
    $ javac GetAllDirs.java GetAllDirs.java:16: cannot find symbol symbol : variable checkFile location: class GetAllDirs System.out.println(checkFile.getName()); ^ 1 error $ cat GetAllDirs.java import java.util.*; import java.io.*; public class GetAllDirs { public void getAllDirs(File file) { if(file.isDirectory()){ System.out.println(file.getName()); File checkFile = new File(file.getCanonicalPath()); }else if(file.isFile()){ System.out.println(file.getName()); File checkFile = new File(file.getParent()); }else{ // checkFile should get Initialized at least HERE! File checkFile = file; } System.out.println(file.getName()); // WHY ERROR HERE: checkfile not found System.out.println(checkFile.getName()); } public static void main(String[] args) { GetAllDirs dirs = new GetAllDirs(); File current = new File("."); dirs.getAllDirs(current); } }

    Read the article

  • Visual Studio 2008 project file does not load because of an unexpected encoding change.

    - by Xenan
    In our team we have a database project in visual Studio 2008 which is under source control by Team Foundation Server. Every two weeks or so, after one co-worker checks in, the project file won't load on the other developers machines. The error message is: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1. When I look at the project file in Notepad++, the file looks like this: ??<NUL?NULxNULmNULlNUL NULvNULeNULrNULsNULiNULoNULnNUL ... and so on (you can see <?xml version in this) whereas an normal project file looks like: <?xml version="1.0" encoding="utf-16"?> ... So probably something is wrong with the encoding of the file. This is a problem for us because it turns out to be impossible to get the file encoding correct again. The 'solution' is to throw away the project file an get the last know working version from source control. According to the file, the encoding should be UTF-16. According to Notepad++, the corrupted file is actually UTF-8. My questions are: Why is Visual Studio messing up the encoding of the project file, apparently at random times and at random machines? What should we do to prevent this? When it has happened, is there a possibility to restore the current file in the correct encoding instead of pulling an older version from source control? As a last note: the problem is with one single project file, all other project files don't expose this problem.

    Read the article

  • File.Move does not inherit permissions from target directory?

    - by Joseph Kingry
    In case something goes wrong in creating a file, I've been writing to a temporary file and then moving to the destination. Something like: var destination = @"C:\foo\bar.txt"; var tempFile = Path.GetTempFileName(); using (var stream = File.OpenWrite(tempFile)) { // write to file here here } string backupFile = null; try { var dir = Path.GetDirectoryName(destination); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); Util.SetPermissions(dir); } if (File.Exists(destination)) { backupFile = Path.Combine(Path.GetTempPath(), new Guid().ToString()); File.Move(destination, backupFile); } File.Move(tempFile, destination); if (backupFile != null) { File.Delete(backupFile); } } catch(IOException) { if(backupFile != null && !File.Exists(destination) && File.Exists(backupFile)) { File.Move(backupFile, destination); } } The problem is that the new "bar.txt" in this case does not inherit permissions from the "C:\foo" directory. Yet if I create a file via explorer/notepad etc directly in the "C:\foo" there's no issues, so I believe the permissions are correctly set on "C:\foo". Update Found Inherited permissions are not automatically updated when you move folders, maybe it applies to folders as well. Now looking for a way to force an update of file permissions. Is there a better way overall of doing this?

    Read the article

  • Can't access my files in ASP.NET web site

    - by jumbojs
    I'm having a very difficult time. I am running windows 2008 server, I have an Able Commerce site using ASP.NET with C#. I'm writing an automated task that will ftp some xml files down into a local directory on our web server and then the program parses the xml file and saves information to our database. The problem, once I save the files to our local directory, my program has no access to the files. The NETWORK SERVICE user permissions isn't being inherited by the xml files so my program can't do anything with them. I can manually change the permissions, but this wouldn't be automated and won't work. How can I get this to work? help please, it's very frustrating.

    Read the article

  • XML File as Excel file.

    - by FrustratedWithFormsDesigner
    I have a number of reports that I run against my database that need to eventually go to the end-users as Excel spreadsheets. Initially, I was creating text reports, but the steps to convert the text to a spreadsheet were a bit cumbersome. There were too many steps to import text to the spreadsheet, and multi-line text rows were imported as individual rows in Excel (which was incorrect). Currently, I am generating simple XML saving the file with an ".xls" extension. This works better, but there is still the problem of Excel prompting the user with an XML import dialogue every time they open the file, and then having to save a new file if they add notes or change the layout to the file (which they almost certainly will be doing). Sample "xls" file: <?xml version="1.0" standalone="yes"?> <report_rows> <row> <NAME>Test Data</NAME> <COUNT>345</COUNT> </row> <!-- many more row elements... --> </report_rows> Is there any way to add markup to the file to hint to Excel how it should import and handle the file? Ideally, the end user should be able to open and save the file like any othe spreadsheet they create directly from Excel. Is this even possible? UPDATE: We are running Office 2003 here. UPDATE: The XML is generated from a sqlplus script, no option to use C#/.NET here.

    Read the article

  • General question: Filesystem or database?

    - by poeschlorn
    Hey guys, i want to create a small document management system. there are several users who store their files. each file which is uploaded contains an info which user uploaded it and the document content itself. In a view there are displayed all files of ONE specific user, ordered by date. What would be better: 1) giving the documents a name or metadata(XML) which contain the date and user (and iterate through them to get the metadata) or 2) giving the files a random/unique name and store metadata in a DB? something like this: date | user | filename What would you say and why? The used programming language is java and the DB is MySQL.

    Read the article

  • What would happen if a same file being read and appended at the same time(python programming)?

    - by Shane
    I'm writing a script using two separate thread one doing file reading operation and the other doing appending, both threads run fairly frequently. My question is, if one thread happens to read the file while the other is just in the middle of appending strings such as "This is a test" into this file, what would happen? I know if you are appending a smaller-than-buffer string, no matter how frequently you read the file in other threads, there would never be incomplete line such as "This i" appearing in your read file, I mean the os would either do: append "This is a test" - read info from the file; or: read info from the file - append "This is a test" to the file; and such would never happen: append "This i" - read info from the file - append "s a test". But if "This is a test" is big enough(assuming it's a bigger-than-buffer string), the os can't do appending job in one operation, so the appending job would be divided into two: first append "This i" to the file, then append "s a test", so in this kind of situation if I happen to read the file in the middle of the whole appending operation, would I get such result: append "This i" - read info from the file - append "s a test", which means I might read a file that includes an incomplete string?

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >