Search Results

Search found 68296 results on 2732 pages for 'utl file'.

Page 41/2732 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • Opening a file in c++ by using a string array of adress

    - by muhammad-aslam
    Hello guYz plz help me out in making it possible to open the files by the adress provided in an array of strings......... a way to open file is as given below... ifstream infile; infile.open("d:\aslam.txt"); but how can i open file providing an array of string as an adress of file..... like this infile.open(arr[i]); (but its not working) plz help me.........

    Read the article

  • Replace input type=file by an image

    - by nikospkrk
    Hi, Like a lot of people, I'd like to customize the ugly input type=file, and I know that it can't be done without some hacks and/or javascript. But, the thing is that in my case the upload file buttons are just for uploading images (jpeg|jpg|png|gif), so I was wondering if I could use a "clickable" image which would act exactly as an input type file (show the dialog box, and same $_FILE on submitted page). I found some workaround here, and this interesting one too (but does not work on Chrome =/). What do you guys do when you want to add some style to your file buttons? If you have any point of view about it, just hit the answer button ;) Cheers, Nicolas

    Read the article

  • Use stringWithFormat: as a file path in cocoa

    - by Cam
    Hello, I'm having a problem with a cocoa application that takes the value of a text field, and writes it to a file. The file path is made using stringWithFormat: to combine 2 strings. For some reason it will not create the file and the console says nothing. Here is my code: //Get the values of the text field NSString *fileName = [fileNameTextField stringValue]; NSString *username = [usernameTextField stringValue]; //Use stringWithFormat: to create the file path NSString *filePath = [NSString stringWithFormat:@"~/Library/Application Support/Test/%@.txt", fileName]; //Write the username to filePath [username writeToFile:filePath atomically:YES]; Thanks for any help

    Read the article

  • Error copying file from app bundle

    - by Michael Chen
    I used the FireFox add-on SQLite Manager, created a database, which saved to my desktop as "DB.sqlite". I copied the file into my supporting files for the project. But when I run the app, immediately I get the error "Assertion failure in -[AppDelegate copyDatabaseIfNeeded], /Users/Mac/Desktop/Note/Note/AppDelegate.m:32 2014-08-19 23:38:02.830 Note[28309:60b] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to create writable database file with message 'The operation couldn’t be completed. (Cocoa error 4.)'.' First throw call stack: "... Here is the App Delegate Code where the error takes place -(void) copyDatabaseIfNeeded { NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *error; NSString *dbPath = [self getDBPath]; BOOL success = [fileManager fileExistsAtPath:dbPath]; if (!success) { NSString *defaultDBPath = [[ [NSBundle mainBundle ] resourcePath] stringByAppendingPathComponent:@"DB.sqlite"]; success = [fileManager copyItemAtPath:defaultDBPath toPath:dbPath error:&error]; if (!success) NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]); } } I am very new to Sqlite, so I maybe I didn't create a database correctly in the FireFox Sqlite manager, or maybe I didn't "properly" copy the .sqlite file in? (I did check the target membership in the sqlite and it correctly has my project selected. Also, the .sqlite file names all match up perfectly.)

    Read the article

  • Pass arguments when using the File protocol

    - by Ando
    I found this question being asked on several places on the internet (including the File protocol MSDN page) but no clear answer. So, if I am calling my application like this: file://c:\myapp.exe is there any way to pass it some command line arguments, like /nospashscreen=true Things I've tried: file://c:\myapp.exe?/nospashscreen=true - launches the app, but with no command line arguments :( Thanks in advance.

    Read the article

  • http transfer file from server to server

    - by qualle
    Hi, with html forms we can upload a file from a client to a server with enctype="multipart/form-data", input type="file" and so on. Is there a way to have a file already ON the server and transfer it to another server the same way? Thanks for hints.

    Read the article

  • Display contents of file as binary.

    - by Eric Davidson
    Is there a good way to display the contents of a file as binary? I am creating a program that needs to save and load a 2D arrays from a files. When loading a saved file the result appears different. I need to be able to view the contents of the saved file in plain binary to tell if my problem in in my save or load function. Is there a program like octal dump but is binary dump? Thanks.

    Read the article

  • feeding input to a java process from a batch file

    - by YGL
    If I have a simple java program that processes lines of text from standard input, then I can run it with the following script: @Echo off java Test < file.txt pause exit The script redirects lines of input from a separate file. Is there a way that I can avoid having to use an extra file? Or is this the easiest way? Thanks.

    Read the article

  • Java file searching problem

    - by Infinity
    Hello guys! I need to search a file for a word and return the whole line and the line number with this word, then edit the line and write back to the file. Maybe the line number isn't necesary to edit a line in a file. I `was reading after seraching with regexp and opening the filechannel of the file, but I can't get the line number. Maybe there are other better ways to do this. Can you help me how to start this?

    Read the article

  • Perl: Asynchronous file monitoring

    - by Hussain
    I am wondering if it is possible, and if so how, one could create a perl script that constantly monitors a file/db, and then call a subroutine to perform text processing if the file is changed. I'm pretty sure this would be possible using sockets, but this needs to be used for a webchat application on a site running on a shared host, and I'm not so sure sockets would be allowed on it. The basic idea is: -create a listener for a chat file/database -when the file is updated with a new message, call a subroutine -the called subroutine will send the new message back to the browser to be displayed Thanks in advance.

    Read the article

  • who convert flat file xml in biztalk server?

    - by Anish
    Hi, I am new to BizTalk server. So if this question is so obvious, plz forgive :( I have a flat file from one application, which i have to send to a biztalk server. In that case which component in my biztalk server converts my flat file to xml. Also I heard that I have to create an input schema(.xsd file), why i need an input message schema? Thanks in advance!

    Read the article

  • Splitting 25mb .txt file into smaller files using text delimiter

    - by user574141
    Regards, SO I am new to python and Perl. I have been trying to solve a simple problem and getting tied in knots with syntax. I hope someone has the time and patience to help. I have a 25mb file in ".txt" format which contains news-wire articles going back to 1970. Each news story is concatenated to the next, with only the "Copyright" statement to delimit. Each news story starts with "Item XX of XXX DOCUMENTS". There are certain metadata that are repeated throughout, I will use these for tagging later on. I wish to split this 25mb file into separate .txt files, each containing one news story (i.e. the text between "DOCUMENTS" and "Copyright", saving each with a different name (obviously). I am trying to 1 ) open the file... 2) iterate over lines in the file checking for the eof delimiter, and if it is not present writing the line to a list 3)write that list to a seperate small file. I'm having big problems with changing filenames using the counter, and how do I make Python start from where I left off, is the "seek" function appropriate? so far I have been trying this approach, completely unsuccessfully: myfile = open ("myfile.txt", 'r') filenumber = 0 for line in myfile.readline(): filenumber += 1 w=0 while myfile.readline() != '\s+DOCUMENTS\s*\n' ### read my line into a list mysmallfile()['w'] = [myfile.readline()] w += 1 output = open('C:\\Users\\dunner7\\Documents\###how do I change the filename each iteration???', 'w') output.writelines(mysmallfile) ###go back to start. Thank you for your time and patience. RD

    Read the article

  • Running a Java program with input from a file

    - by Katy
    I am writing a program that reads the input from a file and then prints it to the screen. When I run it without taking the input from the file, it works perfectly fine. However, every time I try to run it from the file it gives me an "Exception in thread "main" java.util.NoSuchElementException: No line found at" error that occurs every place the input is suppose to be read. I have no idea what is going on.

    Read the article

  • Batch file command PAUSE does not work

    - by Samaursa
    I am creating a simple batch file to assist in a few things, and I have some instructions that it prints out as well that I want the user to see before exit. Currently, the window closes very quickly. So I added PAUSE at the end of the file, but it does not want to work. I looked at other questions on SO and have checked to make sure the line endings are CRLF and that I have CRLF at the end of the file. Any suggestions?

    Read the article

  • Java file delete on NFS drive

    - by RenegadeAndy
    Hey guys. I am trying to delete a file on a NFS drive. I have had other problems manipulating files on remote drives such as moving a file - however i got around it by not using the conventional method i.e renameFile but instead properly using input and output streams. However using the File.delete() returns false , and I have heard suggestions on using the apache commons io FileUtils class - however it just throws an IO exception. Does anybody have any suggestions on a way to delete a file on a network mounted drive using java? Thanks

    Read the article

  • Reading a text file in MATLAB line by line

    - by Hossein
    Hi, I have a CSV file, I want to read this file and do some pre-calculations on each row to see for example that row is useful for me or not and if yes I save it to a new CSV file. can someone give me an example? in more details this is how my data looks like: (string,float,float) the numbers are coordinates. ABC,51.9358183333333,4.183255 ABC,51.9353866666667,4.1841 ABC,51.9351716666667,4.184565 ABC,51.9343083333333,4.186425 ABC,51.9343083333333,4.186425 ABC,51.9340916666667,4.18688333333333 basically i want to save the rows that have for distances more than 50 or 50 in a new file.the string field should also be copied. thanks

    Read the article

  • Get license file from a folder in C# project

    - by daft
    I have a license file that I need to access at runtime in order to create pdf-files. After I have created the in memory pdf, I need to call a method on that pdf to set the license, like this: pdf.SetLicense("pathToLicenseFileHere"); The license file is located in the same project as the.cs-file that creates the pdf, but is in a separate folder. I cannot get this simple thing to behave correctly, which makes me a bit sad, since it really shouldn't be that hard. :( I try to set the path like this: string path = @"\Resources\File.lic"; But it just isn't working out for me.

    Read the article

  • Read multiple strings from a file C++

    - by user69514
    Hi I need to read different values stored in a file one by one. So I was thinking I can use ifstream to open the file, but since the file is set up in such a way that a line might contain three numbers, and the other line one number or two numbers I'm not sure how to read each number one by one. I was thinking of using stringstream but I'm not sure if that would work. The file is a format like this. 52500.00 64029.50 56000.00 65500.00 53780.00 77300.00 44000.50 80100.20 90000.00 41000.00 60500.50 72000.00 I need to read each number and store it in a vector. What is the best way to accomplish this? Reading one number at a time even though each line contains a different amount of numbers?

    Read the article

  • searching within a compressed sorted fixed width file

    - by user275455
    Assume I have a regular compressed fixed width file that is sorted on one of the fields. Given that I know the length of the records, I can use lseek to implement a binary search to records with fields that match a given value without having to read the entire file. Now the difficulty is that the file is gzipped. Is it possible to do this without completely inflating the file? If not with gzip. is there any compression that supports this kind of behavior?

    Read the article

  • Loading data from file to Vector structure

    - by owca
    I'm trying to parse through fixed-width formatted file extracting x,y values of points from it, and then storing them in int[] array inside a Vector. Text file looks as follows : 0006 0015 0125 0047 0250 0131 That's the code : Vector<int[]> vc = new Vector<int[]>(); try { BufferedReader file = new BufferedReader(new FileReader("myfile.txt")); String s; int[] vec = new int[2]; while ((s = file.readLine()) != null) { vec[0] = Integer.parseInt(s.substring(0, 4).trim()); vec[1] = Integer.parseInt(s.substring(5, 8).trim()); vc.add(vec); } file.close(); } catch (IOException e) { } for(int i=0; i<vc.size(); i++){ for(int j=0; j<2; j++){ System.out.println(vc.elementAt(i)[j]); } } But the output shows only last line. 250 131 250 131 250 131 Should I somehow use Vector.nextElement() here to get all my data ?

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >