Search Results

Search found 40999 results on 1640 pages for 'duplicate files'.

Page 223/1640 | < Previous Page | 219 220 221 222 223 224 225 226 227 228 229 230  | Next Page >

  • 'Good' programming form in maintaining / updating / accessing files by entry

    - by zhermes
    Basic Question: If I'm storying/modifying data, should I access elements of a file by index hard-coded index, i.e. targetFile.getElement(5); via a hardcoded identifier (internally translated into index), i.e. target.getElementWithID("Desired Element"), or with some intermediate DESIRED_ELEMENT = 5; ... target.getElement(DESIRED_ELEMENT), etc. Background: My program (c++) stores data in lots of different 'dataFile's. I also keep a list of all of the data-files in another file---a 'listFile'---which also stores some of each one's properties (see below, but i.e. what it's name is, how many lines of information it has etc.). There is an object which manages the data files and the list file, call it a 'fileKeeper'. The entries of a listFile look something like: filename , contents name , number of lines , some more numbers ... Its definitely possible that I may add / remove fields from this list --- but in general, they'll stay static. Right now, I have a constant string array which holds the identification of each element in each entry, something like: const string fileKeeper::idKeys[] = { "FileName" , "Contents" , "NumLines" ... }; const int fileKeeper::idKeysNum = 6; // 6 - for example I'm trying to manage this stuff in 'good' programatic form. Thus, when I want to retrieve the number of lines in a file (for example), instead of having a method which just retrieves the '3'rd element... Instead I do something like: string desiredID = "NumLines"; int desiredIndex = indexForID(desiredID); string desiredElement = elementForIndex(desiredIndex); where the function indexForID() goes through the entries of idKeys until it finds desiredID then returns the index it corresponds to. And elementForIndex(index) actually goes into the listFile to retrieve the index'th element of the comma-delimited string. Problem: This still seems pretty ugly / poor-form. Is there a way I should be doing this? If not, what are some general ways in which this is usually done? Thanks!

    Read the article

  • Same object in different nib files?

    - by Michael
    View1 object, which is UIViewController subclass is the same object as File's Owner of View1 nib. So I should manually set the class in both places, one in MainWindow and another in View1 nib files? This sound artificial to me... Either I'm doing something wrong or there has to be better way.

    Read the article

  • Workflow for reading and writing files

    - by AIR_PhillipSenn
    In Workflow for reading and writing files the authors use these two lines of code: var file = air.File.documentsDirectory; file = file.resolvePath("AIR Test/testFile.txt"); But I think that it's using one variable for two different meanings, isn't it? Wouldn't it be better to write them as: var myDocumentsDirectory = air.File.documentsDirectory; var myTestFile = myDocumentsDirectory.resolvePath("AIR Test/testFile.txt");

    Read the article

  • how to compare dll files

    - by queandans
    I have a post-build script after building my c# project that will place one of the dll files in a specific directory. This dll is saved in SVN. My question is, is there a way that when building my project, it knows that this dll has not changed and would know not to be copied over to the directory so the there will not be a modified copy for the SVN?

    Read the article

  • Drupal 7: Rename files on upload (via filefield)

    - by Eugene
    Looking for a way to rename files that are uploaded by users through a filefield. For example, rename user profile photos using uniqid. I found a good solution for D6 here: http://www.wesjones.net/home/2011/03/drupal-6-how-to-change-filename-on-upload but can't find anything for D7. Another option is to use File (Field) Paths, but (1) the module causes warnings on my setup and (2) seems to be a bit of an overkill to install a general module for a very specific purpose.

    Read the article

  • Java 1.7ea: Files.probeContentType(path) returns null

    - by Cybertizzen
    Hi, I'm having a bit of a strange problem with an application using the Files.probeContentType(path)-method to test for file type: On both my Ubuntu and Fedora systems, it works fine, but when moved to a RedHat Enterprise server (2.6.18-194.el5 #1 x86_64 x86_64 x86_64 GNU/Linux), it only returns null. I'm using java 7 early access (1.7.0-ea-b84). I have to use this version due to functionality that isn't included in 1.6. Does anyone have an idea of what might be the problem here?

    Read the article

  • Search within HTML files

    - by SKk
    Hi Forum, In my iPhone project,I have number of HTML files having different textual and image contents within each file. I need to implement search facility which would return results (HTML file names) having matched keyword. Can anybody have any clue, how can I achieve this? Thanks

    Read the article

  • include files in a method?

    - by fayer
    i want to have a class that includes all files for me. eg. Loader::loadZend // loads all zend libraries Loader::loadSymfony // loads all symfony components if i include a file in a method, does this become globally available? it seems that it doesnt work. maybe i have done something wrong, or is there a workaround for this? thanks

    Read the article

  • Putting methods in separate files

    - by Garry
    I have a class (MyClass) with a lot of methods. Consequently, the .m file has become quite difficult to read. I'm relatively new to Objective-C (having come from REALbasic) and I was wondering if it's possible to put some of the methods in MyClass into different files and then include them in the class. How would I go about this in Xcode?

    Read the article

  • Hadoop: Mapping binary files

    - by restrictedinfinity
    Typically in a the input file is capable of being partially read and processed by Mapper function (as in text files). Is there anything that can be done to handle binaries (say images, serialized objects) which would require all the blocks to be on same host, before the processing can start.

    Read the article

< Previous Page | 219 220 221 222 223 224 225 226 227 228 229 230  | Next Page >