Questions on JarEntry and File

Hi,
I am wondering what a JarEntry represents? All files and directories inside a JarFile?
I can get the number of JarEntries using the following:
int numOfEntries = jarFile.size();Then if I extract this jar and use a small program to recursively visit all files and directories,
I get a different number than that of total JarEntries.
I have to check the total number of files and directories after a jar file is programmatically extracted
so that I can make sure all contents are extracted.
Here is a function I used to visit all files and directories once a jar is extracted:
void traverseAllDirsAndFiles(File dir, int[] retval )
          if (dir.isDirectory())
               String[] children = dir.list();
               retval[0] = retval[0] + children.length;
               for (int i = 0; i < children.length; i++)
                    traverseAllDirsAndFiles(new File(dir, children), retval);
I am just confused.
thanks in advance                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

This line is suspect:
traverseAllDirsAndFiles(new File(dir, children), retval);I don't see anywhere that you are setting a new value for dir, which means it can handle only one level.
Here is a working recursive file list program. I suggest that you modify it to your needs and use it instead.import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class RecursiveFileList
public static void main(String[] args)
File rootDir = new File(args[0]);
List fileList = new ArrayList();
RecursiveFileList run = new RecursiveFileList();
run.recursiveScan(rootDir, fileList);
Collections.sort(fileList);
System.out.println(fileList);
void recursiveScan(File directory, List list)
File[] fileArr = directory.listFiles();
for (int i = 0; i < fileArr.length; i++)
if (fileArr[i].isFile())
// only files
list.add(fileArr[i].toString());
else
// only directories
recursiveScan(fileArr[i], list);

Similar Messages

  • DW:101 Question - Site folder and file naming - best practices

    OK - My 1st post! I’m new to DW and fairly new to developing websites (have done a couple in FrontPage and a couple in SiteGrinder), Although not new at all to technical concepts building PCs, figuring out etc.
    For websites, I know I have a lot to learn and I'll do my best to look for answers, RTFM and all that before I post. I even purchased a few months of access to lynda.com for technical reference.
    So no more introduction. I did some research (and I kind of already knew) that for file names and folder names: no spaces, just dashes or underscores, don’t start with a number, keep the names short, so special characters.
    I’ve noticed in some of the example sites in the training I’m looking at that some folders start with an underscore and some don’t. And some start with a capital letter and some don’t.
    So the question is - what is the best practice for naming files – and especially folders. And that’s the best way to organize the files in the folders? For example, all the .css files in a folder called ‘css’ or ‘_css’.
    While I’m asking, are there any other things along the lines of just starting out I should be looking at? (If this is way to general a question, I understand).
    Thanks…
    \Dave
    www.beacondigitalvideo.com
    By the way I built this site from a template – (modified quite a bit) in 2004 with FrontPage. I know it needs a re-design but I have to say, we get about 80% of our video conversion business from this site.

    So the question is - what is the best practice for naming files – and especially folders. And that’s the best way to organize the files in the folders? For example, all the .css files in a folder called ‘css’ or ‘_css’.
    For me, best practice is always the nomenclature and structure that makes most sense to you, your way of thinking and your workflow.
    Logical and hierarchical always helps me.
    Beyond that:
    Some seem to use _css rather than css because (I guess) those file/folder names rise to the top in an alphabetical sort. Or perhaos they're used to that from a programming environment.
    Some use CamelCase, some use all lowercase or special_characters to separate words.
    Some work with CMSes or in team environments which have agreed schemes.

  • A Few SEO Questions: Alt="" text and file/folder names.

    I've been reading about the Dark Art of SEO and frankly, a lot of it is more confusing than I anticipated.  Anyway, I'll summarise a bit here.I have read that:
    File/folder names are better with meaningful words and hyphenated words.  so DCM000123.jpg in a folder called galimg would be better as: /gallery-images/painting-title-here.jpg
    Alt="" text can add to the content of your pages.
    My thinking underneath this relates to a gallery site I built with around 200 individual paintings in it.  So the site has a lot of content but not a lot of text.  I wonder if I should start trawling through all of this to change the file names and folders and add alt="" text more meaningfully to help with SEO?
    So if my thinking is OK, here are the questions.
    How would you put the alt="" text on individual images?  I imagine that it should just be a straight-forward, what-you-see description?  But there are a few other options.  Suppose I have an image that the artist has titled, "Cattle on a Hill" and it's an oil on canvas.  I could make that into,
    alt="Oil on Canvas: Cattle on a Hill" or
    alt="Cattle on a Hill" or
    alt="A group of cows grazing in pasture under moonlight." or
    Suppose I have 20 images in a portrait gallery:
    alt="Portrait.  Oil on canvas: Joe Bloggs" or
    alt="Portrait.  Joe Bloggs" or
    alt="Man with grey hair wearing a blue shirt sitting on a bench" or
    alt="Portrait painting.  Oil on canvas. Joe Bloggs: Man with gray hair wearing a blue shirt sitting on a bench"
    The second part of the question also includes the problem that if I have 20 images in a single gallery page and I put "Portrait painting" in each alt="" text is that going to look like key word stuffing?
    Now on to the file name thing.  Should the file names be portrait-painting-01 and so on or should they be Cattle-on-hill or what?
    Final question: am I making too much of all this?
    Thanks
    Martin

    First of all, stay away from spaces in file names AT ALL COST.
    The examples you cited would look like:
    alt="Oil%20on%20Canvas:%20Cattle%20on%20a%20Hill" or
    alt="Cattle%20on%20a%20Hill" or
    alt="A%20group%20of%20cows%20grazing%20in%20pasture%20under%20moonlight."
    to an SE crawler.
    If you really want effective picutres, use Photoshop or Fireworks to embed metadata and THEN add them to your site.
    Alt tags means the text that would appear if the image didn't for some reason. It also helps with accessibility for visually impaired viewers who use plug-ins to allow their browser to "speak" the images to them when the page loads.
    <img src="img/example-1.jpg" width="128" height="160" alt="example-1.jpg" />
    Above is an example of how to add alt text. Dreamweaver actually loads the alt tag automatically unless you've turned it off somehow.
    Either put the info in the Alt box in the properties panel, or in code view, add it between the quotes.
    To the second part of your question, Alt tags are meant for SEO with the images only (Like when you search for images of a certain name or containing certain tags)
    and really have little effect on the page SEO itself. For that type of optimization you want Keywords, and Descriptors in the <head> portion of the
    individual page:
    <meta name="google-site-verification" content="Optimizer code would go here" />
    <meta name="Description" content="Page name, site name, business name, location, phone number, etc. goes here"/>
    <meta name="Keywords" content="Restaurant, Sports bar, Catering, Hotel, Gallery, Car Dealer, Exterminator or whatever describes the site and page as well as content of the pages"/>
    <meta name="author" content="your name here"/>
    <meta name="robots" content="index, follow"/> (This tells search engine crawlers to index this page and each one you add it to,  and follow them site wide)
    <meta name="revisit-after" content="7 days"/> (This tells the crawler when to revisit for updates after it has indexed the site)
    To your last question. No, you're not making too big a deal out of it, if you're talking about exposure for a business. If it's a personal gallery of your favorite vacation pictures? You just might be.

  • My complaints and Questions MP4 M4V video files and other complaints

    My complaints and Questions MP4 M4V video files and other complaints
    I have been scratching my head as to how to fix my problem and I found some answers and some questions along the way. First of all, I have a video that should be correctly formatted for my iPod. Its specs are:
    Kind: MPEG-4 video file
    Size: 19.4 MB
    Bit Rate: 125 kbps
    Date Modified: 8/18/2009 2:15 PM
    Play Count: 1
    Last played: 8/21/2009 12:25 PM
    Profile: Low Complexity
    Channels: Stereo
    Total Bit Rate: 360 kbps
    Video Dimensions: 352x264
    Video Codec: H.264
    F:\File\AnotherFile\A3rdFile\TheMovieFileInQuestion.mp4
    Wow that was a chore. Apple! Let us drag copy and paste our info tabs information so we don’t have to type all this stuff when we are having trouble. **another problem and suggestion** right there.
    Ok, back to the problem of the forum.
    From what I can see from http://www.apple.com/ipodclassic/specs.html this file falls in line of everything required in order to be able to play on my iPod. It plays in iTunes fine but will NOT sync with my iPod. I get an annoying message that states, “Some of the Songs and videos in your iTunes library, including “BlaBlaBlaiPondFixYourJunkBlaBlaBla”, were not copied to the iPod “My iPod” because they cannot be played on this iPod.” Why oh why can iTunes play this video file but my iPod cant. Especially when the specs on Apple’s website say it can.
    So that was bugging me for a LONG time until I found my “Create iPod or iPhone version” option in the “Advanced” heading. Thank goodness this made my files playable on my iPod. Extremely LONG wait though. I know that other programs convert it in ½ the time. But times not to important as long as it gets done, (would be very convenient if it was faster though **Problem and suggestion**)
    Ok, now that I have used the “Create iPod or iPhone version” option it has slowly but surly converted my video. Ok, here is my main problem, the new file which is the result of the conversions information is as follows:
    Kind: MPEG-4 video file
    Size: 35.4 MB
    Bit Rate: 125 kbps
    Date Modified: 8/18/2009 2:15 PM
    Play Count: 1
    Last played: 8/21/2009 1:28 PM
    Profile: Low Complexity
    Channels: Stereo
    Total Bit Rate: 658 kbps
    Video Dimensions: 352x264
    Video Codec: H.264
    C:\File\WhyIsThisNewFileInMyMusicFolder\TheMovieFileInQuestion.m4v
    So basically it has made my file bigger *not a bonus in my book* greatly increased my Bit Rate *another interesting feature*, and I think the biggest change it has changed it from an .mp4 to an m4v.
    Why does it need to be an .m4v I could have sworn some of my videos were or are in mp4 which shouldn’t matter anyway because I was under the impression that iPods could play mp4 files. So that’s my biggest complaint and question. Why can my 80GB classic iPod not play my MP4 files and why am I forced to convert them??
    This conversion also creates 2 files in iTunes when I am done which is annoying because I have to go into my files info and look to see what file is the mp3 in order to remove it. Very annoying I can open my iPod options and see the files and some are faded (the ones it can not play) why can’t I remove them from that area.Suggestion Apple please make files that cannot be played on my iPod stand out some how for easier cleaning Suggestion. Thank you.
    Speaking of cleaning iPods, when I moved my entire library to an external drive I was faced with a terrible problem. “This file could not be found, would you like to locate file”, I was faced with this annoying message at least 600 times. Now I am glad that iTunes has a little “!” mark to show dead links so that you do some minor cleaning, Good Job iTunes No compliant there. However iTunes has no way of selecting all the broken files for major cleaning (like in my case). Going through and deleting over 600 files 1 by 1 is extremely time consuming and annoying. **Suggestion Apple please add more cleaning features for organizing iTunes**.
    Ok, speaking of organization now, another problem that appeared when converting my video files was that it put my new videos into the location where I have all my songs (my external hard drive) why can’t it put the new files in the locations of the original file? I have my computer highly organized and my original files were in that drive in that folder for a reason. If I could open my original file and skip the conversion, my iTunes would go to that specific folder to access the file which is fine. But now these new conversion files are elsewhere taking up space and disorganizing my computer. True I can go into the new location and move the files to where I want them (original location) but I don’t think I should have to hunt them down, copy, move, delete ect etc for all these files over and over. Very annoying, time consuming and should be unnecessary. **Suggestion Make file creation and location more customizable, and user friendly, your customers will love you for it**.
    Well since I have gotten into Apples iTunes and iPod problems that I have had to face I might as well bring up one or two more problems and suggestions. About a month after purchasing my iPod a sibling bought one as well. His however is way more convenient then mine. I suppose he has a 5th gen. so here is my question: why does he have a search option and I don’t!!!! Why does he get more features every so often and I don’t?! Why can’t Apple write some software for us classic guys which got the iPods going! It’s very annoying when I have to spend more time looking for the song then I spend actually listening to it, when he can pull his up in like 3-6 seconds? I highly doubt the hardware between our iPods is that dissimilar and even if they are why cant software be written for us. **Suggestion treat all your customers good not just the newer ones, and make some more features for the classics like me and my iPod.” We will be grateful for it I promise.
    Ok, I am almost done. Let me just recap my questions, I know my post is kind of lengthy.
    #1. Why can’t my iPod play MP3 video files? And why do I have to convert to almost all the same settings except changing it from an mp4 to an m4v. according to Apples own site I should be able to play .m4v .mp4 and .mov files!! Note: remember iTunes plays them fine but my iPod will not.
    #2. Would be much more convenient to be able to copy the information from the windows in iTunes so that problems and trouble shooting would be much easier. A little check on off options in iTunes advanced settings would be terrific.
    #3. Why is the conversion so slow? Please speed it, you have the power. Convenience is the thing that sells products.
    #4. Files that cannot be played on the current iPod need to be easier recognized for simpler cleaning.
    #5. Also make an easier way to select all dead link files for faster cleaning, deleting, etc. This one is important.
    #6. Make a user friendly way to change where my files are going to end up once I convert them for iPod more options and better customizable settings are need.
    #7. One of the most important is ADD A SEARCH OPTION. I and we classics will LOVE Apple for it.
    For you readers, I apologize for the long post, and any grammatical errors you might find throughout it. These are problems that I have faced with these programs and hardware and I wanted to make sure they got acknowledged and hopefully addressed. Any information about why I cannot play MP4 Video files on my iPod would be the best. If anything in my post gets answered that’s the one I want most. Will save me a lot of hassle.
    Thank you all and I look forward to your suggestions and comments. All are welcome and appreciated.
    Sincerely,
    Bond, James

    Was playing with iTunes and thought of another suggestion! Let us play files in iTunes from an iPod! A friend or sibling should be able to plug his iPod into my computer open iTunes and play any of the files there. Many times I have wanted to show a movie clip or video to a friend, and I have the dock so I can do it on my T.V. but play it on their computer in their iTunes forget it. That would be a very nice feature as well so we can watch our movies at maximum size or listen to music on a better sound system, just another suggestion that would be nice. Thanks

  • Time Machine and File Vault question

    I just completed a clean install of OS x mavericks and then used my time machine back up to restore the mac.
    The whole process was confusing for many reasons and I just want to get some clarification/verification on my next actions.
    When I enter time machine preferences and click select disk. It gives me two choices. One in the group Back Up Disks and One in available disks. The confusing I have is that it is the same external hd. So which should I pick if I want to keep my original time machine backups?
    The other question I have is, this whole journey started with me wanting to turn on file vault. I am using a late 2012 Mac Mini updated to Mavericks came with Mountain Lion.
    Should I be able to use both an encrypted time machine (external hd) and file vault?
    Thanks for the help.

    The difference is that do yo want to combine the backus you made before with the previous backups (group Back Up Disks) or start a whole new backup (available disks). Either option will retain the previous backups unless you overtly delete them. I would select that later to start a new set of backups.
    See the following for using FileaFault with Time Machine
    http://apple.stackexchange.com/questions/46833/with-file-vault-on-are-time-machi ne-backups-encrypted
    http://kb.mit.edu/confluence/display/istcontrib/Enable+FileVault+(whole+disk+enc ryption)+on+Time+Machine+backup+drives+on+OS+X+10.9

  • Question around UTL_FILE and writing unicode data to a file.

    Database version : 11.2.0.3.0
    NLS_CHARACTERSET : AL32UTF8
    OS : Red Hat Enterprise Linux Server release 6.3 (Santiago)
    I did not work with multiple language characters and manipulating them. So, the basic idea is to write UTF8 data as Unicode file using UTL_FILE. This is fairly an empty database and does not have any rows in at least the tables I am working on. First I inserted a row with English characters in the columns.
    I used utl_file.fopen_nchar to open and used utl_file.put_line_nchar to write it to the file on the Linux box. I open the file and I still see English characters (say "02CANMLKR001".
    Now, I updated the row with some columns having Chinese characters and ran the same script. It wrote the file. Now when I "vi" the file, I see "02CANè¹æ001" (some Unicode symbols in place of the Chinese characters and the regular English.
    When I FTP the file to windows and open it using notepad/notepad++ it still shows the Chinese characters. Using textpad, it shows ? in place of Chinese characters and the file properties say that the file is of type UNIX/UTF-8.
    My question : "Is my code working and writing the file in unicode? If not what are the required changes?" -- I know the question is little vague, but any questions/suggestions towards answering my question would really help.
    sample code:
    {pre}
    DECLARE
       l_file_handle   UTL_FILE.file_type;
       l_file_name     VARCHAR2 (50) := 'test.dat';
       l_rec           VARCHAR2 (250);
    BEGIN
       l_file_handle := UTL_FILE.fopen_nchar ('OUTPUT_DIR', l_file_name, 'W');
       SELECT col1 || col2 || col3 INTO l_rec FROM table_name;
       UTL_FILE.put_line_nchar (l_file_handle, l_rec);
       UTL_FILE.fclose (l_file_handle);
    END;
    {/pre}

    Regardless of what you think of my reply I'm trying to help you.
    I think you need to reread my reply because I can't find ANY relation at all between what I said and what you responded with.
    I wish things are the way you mentioned and followed text books.
    Nothing in my reply is related to 'text books' or some 'academic' approach to development. Strictly based on real-world experience of 25+ years.
    Unfortunately lot of real world projects kick off without complete information.
    No disagreement here - but totally irrevelant to anything I said.
    Till we get the complete information, it's better to work on the idea rather than wasting project hours. I don't think it can work that way. All we do is to lay a ground preparation, toy around multiple options for the actual coding even when we do not have the exact requirements.
    No disagreement here - but totally irrevelant to anything I said.
    And I think it's a good practice rather than waiting for complete information and pushing others.
    You can't just wait. But you also can't just go ahead on your own. You have to IMMEDIATELY 'push others' as soon as you discover any issues affecting your team's (or your) ability to meet the requirements. As I said above:
    Your problems are likely:
    1. lack of adequate requirements as to what the vendor really requires in terms of format and content
    2. lack of appropriate sample data - either you don't have the skill set to create it yourself or you haven't gotten any from someone else.
    3. lack of knowledge of the character sets involved to be able to create/conduct the proper tests
    If you discover something missing with the requirements (what character sets need to be used, what file format to use, whether BOMs are required in the file, etc) you simply MUST bring that to your manager's attention as soon as you suspect it might be an issue.
    It is your manager's job, not yours, to make sure you have the tools needed to do the job. One of those tools is the proper requirements. If there is ANYTHING wrong, or if you even THINK something is wrong with those requirements it is YOUR responsibility to notify your manager ASAP.
    Send them an email, leave a yellow-sticky on their desk but notify them. Nothing in what I just said says, or implies, that you should then just sit back and WAIT until that issue is resolved.
    If you know you will need sample data you MUST make sure the project plan includes SOME means to obtain sample data witihin the timeline needed by your project. As I repeated above if you don't have the skill set to create it yourself someone else will need to do it.
    I did not work with multiple language characters and manipulating them.
    Does your manager know that? If the project requires 'work with multiple language characters and manipulating them' someone on the project needs to have experience doing that. If your manager knows you don't have that experience but wants you to proceed anyway and/or won't provide any other resource that does have that experience that is ok. But that is the manager's responsibility and that needs to be documented. At a minimum you need to advise your manager (I prefer to do it with an email) along the following lines:
    Hey - manager person - As you know I have little or no experience to 'work with multiple language characters and manipulating them' and those skills are needed to properly implement and test that the requirements are met. Please let me know if such a resource can be made available.
    And I'm serious about that. Sometimes you have to make you manager do their job. That means you ALWAYS need to keep them advised of ANY issue that might affect the project. Once your manager is made aware of an issue it is then THEIR responsibility to deal with it. They may choose to ignore it, pretend they never heard about it or actually deal with it. But you will always be able to show that you notified them about it.
    Now, I updated the row with some columns having Chinese characters and ran the same script.
    Great - as long as you actually know Chinese that is; and how to work with Chinese characters in the context of a database character set, querying, creating files, etc.
    If you don't know Chinese or haven't actually worked with Chinese characters in that context then the project still needs a resource that does know it.
    You can't just try to bluff your way through something like character sets and code conversions. You either know what a BOM (byte order mark) is or you don't. You have either learned when BOMs are needed or you haven't.
    That said, we are in process of getting the information and sample data that we require.
    Good!
    Now make sure you have notified your manager of any 'holes' in the requirements and keep them up to date with any other issues that arise.
    NONE of the above suggests, or implies, that you should just sit back and wait until that is done. But any advice offered on the forums about specifics of your issue (such as whether you need to even worry about BOMs) is premature until the vendor or the requirements actually document the precise character set and file format needed.

  • Flashing question mark and file

    My mac book is showing a question mark with a file and it is flashing when I turn the computer on, what has happened and what should I do?

    There are four general causes of this issue:
    1. The computer's PRAM no longer contains a valid startup disk setting when there aren't any problems with the disk itself. This can be checked for by pressing the Option key and seeing if the drive appears.
    2. The internal drive's directory structure has become damaged. This requires usage of an alternate bootable system to perform the repair.
    3. Critical system files have been deleted. This requires usage of an alternate bootable system to reinstall them.
    4. The internal drive has died or become unplugged. This is the most likely case if the computer took a sharp impact or there are unusual sounds coming from its location.
    (105838)

  • Question from renaming a file and copy a file

    Hi
    Like I tell in subject I have a question about those 2 functions.
    Well I have a program that will copy files to an other directory for backup. Those files can have so to 1GB. Well I wrote a my code on using FileChannel and that takes some good time to copy it to the other place.
    But then I tried just for fun something different like renaming the file to that path. For example:
    Orignal File: file.db <-- +- 1GB same directory as the jar file
    to renamed file: ../../../test/file.db
    That goes very fast and I can open the file without lost of data.
    But what is the difference between both function because they do the same just that rename is much faster.
    Thx in adavance for your help

    But what is the difference between both function
    because they do the same just that rename is much
    faster.Copying a file involves copying all the data of the file from one physical location on the disk to another. That involves a good deal of IO.
    Renaming/moving a file is usually implemented on platforms in such a way that the data remains at the same location and file table entry is modified.

  • Questions on reading a file...

    Hi All,
    I have a few questions on reading a file...
    1st of all ... if I have
    BufferedReader inFile = new BufferedReader (new FileReader("tickets.txt"));and I do inFile.readLine(); will it read the next line everytime I do that? ... say I had a file that had 5 lines of text and I did inFile.readLine(); 5 times will I get the first line 5 times or will I get each line?
    If the is a blank line in the file will it return null?
    how can I feed the file name to args[0] and what is that for?
    Thanks,
    Mike

        public static void main(String args[]) {       
            BufferedReader inFile = null;   
            try {
                inFile = new BufferedReader (new FileReader(args[0]));   
                for (int i = 0; i < reservation.length; i++) {
                    readFile(reservation, inFile, arrayCounter, numberOfReadItems);*/
                    inFile.close();
            catch (ArrayIndexOutOfBoundsException aioobe) {
                System.out.println("Parameter required");
                System.exit(0);
            catch (FileNotFoundException fnfe) {
                System.out.println("File not found");
                System.exit(0);
            catch (IOException ioe) {
                System.out.println("Failed to close file");
                System.exit(0);

  • Questions on init.ora file

    Hi,
    I have some questions on init.ora file. While checking the init file in my system i found that it defines a spfile in a non default location.
    The parameter names are like
    1) db1.__db_cache_size
    2) *._kgl_large_heap_warning_threshold
    3) *.sga_target
    what do they indicate? I mean what does 'db1.__' , '*._' and '*.' indicate? There are multiple database in the Windows 2003 server and the db version is 10g R1
    Regards,
    SID
    Edited by: SID3 on Jun 29, 2010 5:55 AM
    Edited by: SID3 on Jun 29, 2010 5:56 AM

    SID3 wrote:
    From the discussion i guess the following points
    1) db1._ means they are specific to databases.
    2) *._ and * means they are used accross databases and chaging it in any of the initfile might affect all? I seriously doubt this.You are mistaken when speaking about database. Bear in mind, a database is not an instance.
    * here means this parameter will apply to any instance of that database (if it is in RAC), or to the only one instance of that database (if it is in non-RAC).
    Find out more :
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#i2146449
    Nicolas.

  • Some questions on whitespace and &

    Dear all,
    I have some questions on whitespace and & that need you kind help:
    1. Except /n /t /r and space, is there any characters that are whiteSpace characters?
    2. When parsing XML document, when the ignorableWhitespace() method is called? Will it be called from characters() ?
    e.g. Where the white space after <a> is called, and where is the white space between test1 and test 2 indied <b> is called?
    <a>
       <b>test1 test2</b>
    </a>  3. When the & should be escaped in a well-formed (or validated) XML file by replacing &?
    It should be excaped in any element content, such as <b>test1 & test2< /b> - except for <![CDATA[ section?
    It should NOT always be used in attributes? e.g. <a b="test1 & test2"/>  - has to do escaped by entity & - am I right?
    Thanks!
    Thanks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks DrClap.
    >
    2. When parsing XML document, when the
    ignorableWhitespace() method is called? Will it be
    called from characters() ?It will be called when the document has a DTD and the
    parser is a validating one that is actually
    validating, when the parser sees whitespace that is
    not part of a DTD element. It will not be called from
    characters() because that is a method that you write.I wrote a contentHandler and using Xerces parser to parse an XML document. When I set validating feature to false, I found that for:
    <a>
       <b>test1 test2</b></a>The white space between <a> and <b> (including newline) is actually called from characters(), not in ignorableWhitespace(). So does this mean that if validating - white space is always called from ignorableWhitespace(), and if not validating, if it is always called from characters()?
    >
    3. When the & should be escaped in a well-formed(or
    validated) XML file by replacing &? The XML Recommendation says "The ampersand character
    (&) and the left angle bracket (<) may appear
    in their literal form only when used as markup
    delimiters, or within a comment, a processing
    instruction, or a CDATA section. If they are needed
    elsewhere, they must be escaped using either numeric
    character references or the strings "&" and
    "<" respectively."So in this sense, both & in <b>test1 & test2< /b> and <a b="test1 & test2"/> is illegal unless replacing them by & - right? What does the markup delimiters mena in above XML Recommendation ? Example?
    Thanks!

  • Questions on photos and storage

    I have a few questions about photos and storage... If you can just answer one of these, that's fine and thanks for the help!
    How do I see how much space my iPhoto photos are taking on my hardrive?
    I have Time machine which backs up, but concerned that I'm getting too many pictures.  When I do "Get Info" on the hardrive it says 640GB Capacity with 254GB used. I'm assuming that includes all my photos, and that Time machine only backs up and is not the active storage for those photos?
    What is advisable for available GB space on this size computer?
    I have my photos on the hardrive and the time machine, is it also advised to have in a cloud-based storage system to be safe? Or some other place.  Just checking what others do with this.

    1 - it is a really good idea to start new threads with new questions - threadjacking a year old solved thread on a totally different subject will not provide the best coverage and the best answers
    2 - Do NOT uncheck the option to copy imported items to the iPhoto library - it is a really, really bad idea that will create many problems for yo and has no advantages of any sort - see the user tip on file management in iPhoto for more details - iPhoto and File Management
    3 - take the time to learn how to use iPhoto and the concept of using a database for management photos rather than a file based system like you are used to - it is much different and much more powerful - but there is a learning curve and a different thought process
    4 - yes you can always export anything or everything from iPhoto for use on any other system - see the user tip on exporting for details - Exporting From iPhoto
    5 - always remember that you never access your photos directly - iPhoto totally replaces the finder for managing your photos - see the user tip on accessing photos for more details - How to Access Files in iPhoto
    LN

  • I have 2 computers (1 Pc and 1 MAC) and 1 Iphone.The I phone is synchronised with the PC. I want to synchronised it also with my MAC, without erasing all my music and files. Someone can help me to find the answer ?

    I have 2 computers (1 Pc and 1 MAC) and 1 Iphone.The I phone is synchronised with the PC. I want to synchronised it also with my MAC, without erasing all my music and files. Someone can help me to find the answer ?
    i have already try the copy/paste thing with the ID of the file "iTunes Music Library.xml" it didn't change a thing. each time I relaunched Itunes, the ID is the first I have in the MAC.
    I have more than 5 000 files of music. I don't want to recreate one by one all my playlits.
    Many thnaks for your answers.
    Constance

    You can sync iphone with one and only one computer at a time.  If you sync to another, it will erase the current content and replace with content form the new computer.  There is no way around this.
    Put everything on one computer and sync from there.
    BTW, you posted in the Home Share forum.  Your question seems to have nothing to do with home share.

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • I have a mid year 2007 24 inch iMac and will be purchasing a new 27 inch Retina iMac, what is the easiest way to transfer the data and files from my old machine to the new one?

    I have a mid year 2007 24 inch iMac and will be purchasing a new 27 inch Retina iMac, what is the easiest way to transfer the data and files from my old machine to the new one?

    Following up on this thread,
    I have a new iMac on the way and my current is from 2008, never had a problem but I am sure there are internal issues that I would prefer not to transfer.
    I have no issues other then the slowness in certain programs and that is the main reason to buy a new one.
    Programs like numbers and pages seem to take a longer time to open after I update to Yosemite.
    I only use 272GB of 500 GB, my memory is 4GB and I am upgrading to 8Gb and bought the 4.0 processor.
    Question:
    Is there a way to manually transfer items or would that be a waste of time in that if there are issues they could be anywhere and would transfer anyway?

Maybe you are looking for

  • How to call a set method from within a constructor

    Hello, I want to be able to call a set method from within a Scanner, to be used as the argument to pass to the Scanner (from a source file). Here's what i tried: private void openFiles()         input = new Scanner( setSource );                   and

  • I am unable to open my ipad , 2 icloud updates on screen and can't open or shutdown?

    I am unable to open my ipad. I have not used it for a while, it has 2 icloud backup windows on the screen and nothing happens whem I ok the update. Unable to open or shutdown as well.

  • Is there a way to Proof Colour within Elements

    Our Camera Club  and all those within South Africa project images for judging Salon Entries using IrfanView which is not colour proofed. Entries edited in CS are able to Proof Colour but I have not found a way to do this within Elements. Any informat

  • Address/Location bar, forward-back buttons are not shown

    Address/Location bar, forward-back buttons are not shown in my browser. How can I make them visible?

  • Apple ProRes dans Media Encoder

    Bonjour, Je me permet de vous envoyer ma problèmatique car cela fait maintenant plusieurs heures que je cherche et je ne trouve pas de solution ? Je viens d'installer Prelude et Media Encoder sur mon Mac Pro afin de préparer mes productions audiovisu