Do my runtime make sense?

HI..me again
I just finished my code for runtime. And i am getting the runtime of the ArrayList implementation lower then the LinkedList Implementation. Does that make sense?
Shouldnt the ArrayList runtime be higher ? at least thats what I am told by all my friends
Note*= my assingnment was to create an Array and a linked list implementation of an unordered set. The interface had the following methods:
public interface MySet {
    boolean isIn(Value v);
    void add(Value v);
    void remove(Value v);
    MySet union(MySet s);
    MySet intersect(MySet s);
    MySet difference(MySet s);
    int size();
    void printSet();
}thanks for any reply:)
Note*:new to programming
Edited by: haraminoI on Mar 28, 2009 10:10 AM
Edited by: haraminoI on Mar 28, 2009 10:12 AM
Edited by: haraminoI on Mar 28, 2009 10:12 AM
Edited by: haraminoI on Mar 28, 2009 10:13 AM
Edited by: haraminoI on Mar 28, 2009 10:20 AM

Which methods run faster for ArrayList?
Which methods run faster for LinkedList?
How large are the sets that you are using to do your tests? A larger set will show the differences better than a smaller set will.
Try adding 1000 numbers to each set (add 1, 2, 3, ...,1000, in order). Which set could add them faster? [If it one isn't particularly faster or slower, try 10000 numbers or 50000 numbers.]
Then try to remove the number '1' from each set. Which set could remove it faster?
Then try to remove '500' from each set. Which set could remove it faster?
Then try to remove '1000' [or other end number] from each set. Which set could remove it faster?
Try calculating "size()" for each set. Which set gives you the answer faster (assuming you haven't kept a 'size' variable in your LinkedList, and that you calculate the size() by iterating through the list)?
If you want to test with random numbers, you should add the same numbers to both lists in the same order. You might also want to keep track of what number is first, some numbers known to be in the middle, and some numbers at the end, so you can test how fast removal of the first element is. The "set" may be unordered, but the list will still be holding the items in the order that you added them.
You should see that some operations are faster using ArrayList, and some are faster using LinkedList. Your exact implementations may cause some difference, but if the implementations are reasonable, there are certain operations that should be faster with ArrayList and certain that should be faster with LinkedList.

Similar Messages

  • OO Design--do ABAP Persistent Classes make sense for ALV reports in NW2004?

    Hello experts,
    At our company, we started using ABAP OO in the last year.
    I am on NW-2004 .  We just acquired a business that is on 4.6C.
    We have a lot of customization to bring into our system. There are a lot of reports with common queries that span multiple tables.
    I would like to follow the best practice for OO design and create global classes for the data access layer  the business logic layer and the UI layer.  For the UI layer, I will be utilizing the SALV class, since NW2004 doesn't have ABAP WebDynpro (we don't have a java stack available for development and software change management).
    For the data access layer,  I would like to use the persistent classes,  but without the query manager, it just doesn't make sense.
    Thomas Jung said in a blog that he sometimes used SQL to get the keys and then used persistent classes to retrieve the remaining data.  But for straight ALV reporting, that just seems inefficient.  But it could be that I am just not familiar enough with the technology.
    I am looking for suggestions on how to design the data access layer for these intense  and commonly used queries.
    (Ironically, we will upgrade to NW2004s after this migration -- ouch!)
    All ideas are appreciated.
    Thanks.

    Hi Kimberly,
    the main advantage of persistent objects is that their state can be saved in the database. If a persistent object changes in your program, these changes can be reflected in the corresponding database field(s). Thus, persistent objects are very useful when doing CRUD (create, read, update and delete) operations with business objects.
    However, if you just want to read data (for simple reporting) but do not plan to implement any of the other CRUD operations, I doubt if a persistency layer is necessary since this causes extra effort during design time and runtime. In that case, simple SELECT statements seem to be more appropriate.
    Regards,
    David

  • I feel Passbook should be on new iPad, because even if surfing web, and you have all information with you on the iPad and not have to get purse to look for individual information. It makes sense to provide it for the new iPad. PLEASE!

    I feel that Passbook should be on the new iPad. My reason is when surfing Internet/purchasing all your information could be on the iPad, and you wouldn't have to check your purse or somewhere else for it. It makes sense to include it. PLEASE include in next update soon. Thanks.

    This is a user to user tech support forum. Your comments are best directed here
    http://www.apple.com/feedback/

  • Which Mac Pro? More cores=slower speeds? And most of us know the speed matters or FPU for music and I don't understand the faster is for the least amount of procs. And while I get the whole rendering thing and why it makes sense.

    Which Mac Pro? More cores=slower speeds? And most of us know the speed matters or FPU for music and I don't understand the faster is for the least amount of procs. And while I get the whole rendering thing and why it makes sense.
    The above is what the bar says. It's been a while and wondered, maybe Apple changed the format for forums. Then got this nice big blank canvas to air my concerns. Went to school for Computer Science, BSEE, even worked at Analog Devices in Newton Massachusetts, where they make something for apple. 
    The bottom line is fast CPU = more FPU = more headroom and still can't figure out why the more cores= the slower it gets unless it's to get us in to a 6 core then come out with faster cores down the road or a newer Mac that uses the GPU. Also. Few. I'm the guy who said a few years ago Mac has an FCP that looks like iMovie on Steroids. Having said that I called the campus one day to ask them something and while I used to work for Apple, I think she thought I still did as she asked me, "HOW ARE THE 32 CORES/1DYE COMING ALONG? Not wanting to embarrass her I said fine, fine and then hung up.  Makes the most sense as I never quite got the 2,6,12 cores when for years everything from memory to CPU's have been, in sets of 2 to the 2nd power.  2,4,8,16,32,64,120,256,512, 1024, 2048,4196,8192, 72,768.  Wow. W-O-W and will be using whatever I get with Apollo Quad. 
    Peace to all and hope someone can point us in THE RIGHT DIRECTION.  THANK YOU

    Thanks for your reply via email/msg. He wrote:
    If you are interested in the actual design data for the Xeon processor, go to the Intel site and the actual CPU part numbers are:
    Xeon 4 core - E5.1620v2
    Xeon 6 core - E5.1650v2
    Xeon 8 core - E5.1680v2
    Xeon 12 core - E5.2697v2
    I read that the CPU is easy to swap out but am sure something goes wrong at a certain point - even if solderedon they make material to absorb the solder, making your work area VERY clean.
    My Question now is this, get an 8 core, then replace with 2 3.7 QUAD CHIPS, what would happen?
    I also noticed that the 8 core Mac Pro is 3.0 when in fact they do have a 3.4 8 core chip, so 2 =16? Or if correct, wouldn't you be able to replace a QUAD CHIP WITH THAT?  I;M SURE THEY ARE UO TO SOMETHING AS 1) WE HAVE SEEN NO AUDIO FPU OR PERHAPS I SHOULD CHECK OUT PC MAKERS WINDOWS machines for Sisoft Sandra "B-E-N-C-H-M-A-R-K-S" -
    SOMETHINGS UP AND AM SURE WE'LL ALL BE PLEASED, AS the mac pro      was announced Last year, barely made the December mark, then pushed to January, then February and now April.
    Would rather wait and have it done correct than released to early only to have it benchmarked in audio and found to be slower in a few areas- - - the logical part of my brain is wondering what else I would have to swap out as I am sure it would run, and fine for a while, then, poof....
    PEACE===AM SURE APPLE WILL BLOW US AWAY - they have to figure out how to increase the power for 150 watts or make the GPU work which in regard to FPU, I thought was NVIDIA?

  • How can I restore a single image from an aperture time machine backup, do I have to restore the entire library? that does not make sense

    I hope there has been found a more efficiant solution for this,  how can I restore a single image from an aperture time machine backup, I really hope I don't have to restore the entire library? that does not make sense
    any suggestions?

    Did you try browsing your backups in the Finder ?  That is, do not go and "Enter Time Machine".  Instead, navigate to your Time Machine backup via Finder and then manually go to the time period (by folder name) you are looking for ... when you find your Aperture library you can then "Show Package Contents" and find the Master you are looking for.

  • Hi i have the same apple id for my iPad and my mac. my iPhone has a different one. My i cloud on my mac seems to be the iCloud on my iPad, if that makes sense so its not sending my photos from my mac to the cloud. how do i change it to upload mac?

    hi i have the same apple id for my iPad and my mac. my iPhone has a different one. My i cloud on my mac seems to be the iCloud on my iPad, if that makes sense so its not sending my photos from my mac to the cloud. how do i change it to upload mac pictures instead? thanks

    Did you go into Settings > Store and then tap your old ID, sign out and then enter your new ID?

  • I've started getting pop-under ads every time I launch Firefox, and the uninstall instructions don't make sense, how can I stop these?

    In the past couple of weeks, every time I launch Firefox, a full-size pop-under ad is also launched, regardless of what site I'm browsing.
    The original ad was for a You Tube survey, and contains a link to coupondropdown.com, where there's a menu option for uninstalling. The uninstall instructions don't make sense, they don't mention what ad-on is controlling the ads, and I can't work out what's responsible for the ads from my very basic range of ad-ons.
    The reason I'm writing is that the ads have progressed from annoying but harmless, to dangerous. The ad today was designed as a warning pop-up, text reads, "Threat Detected: Immediate Action Required. Fatal Registry Error ... click "Repair All" to eliminate all possible threats and clean your PC". I have screenshots of all the above.
    I'm worried that another user, my son or mother, might take this warning seriously and install malware by accident. What can I do to prevent these ads? I expect this type of malware advertising on dodgy websites, but I'm getting them when I try to access hotmail, the news, etc, so it's not the website that's causing them.

    Found the source using Microsoft Safety Scanner on a full scan. The culprit was a Trojan:Win32/Sirefef!cfg

  • IPhoto suddenly doesn't seem to recognize my camera, and essentially freezes. The only thing that makes sense is that another person in my house imported using a different camera and that changed things somehow. Ideas?

    iPhoto suddenly doesn't seem to recognize my camera, and essentially freezes. The only thing that makes sense is that another person in my house imported using a different camera and that changed things somehow. Ideas?

    Hi There!
    The camera is a Panasonic Lumix. I don't have a USB card reader. I did try and different port although not a different cable.
    I did remember one additional thing. I plugged my camera in at work to a PC. It was after that, when I came home, that the iPhoto wasn't working when I connected my camera to our iMac/iPhoto at home. I think this may have caused the problem.
    Cheers!

  • GW2012 move: Does it make sense to move users to a new PO?

    Moving from GW8 on OES-NW to GW2012 on OES11: Does it make sense to create new post office and move users?
    We have a medium size GroupWise 8 system with a single post office holding less than 600 user accounts, 128 resources and 77 distribution lists.
    Due to politics we also have a non-GroupWise external domain that contains a non-GroupWise external post office with a large number of "users".
    The post office is on the primary domain.
    3 secondary domains hold a GWIA and two web access agents.
    I've never been real clear where the external stuff exists...
    One of the web access gateways resides on an OES11 server.
    The other webaccess agent and the GWIA are on OES-NW servers.
    All reside in NSS volumes.
    Given the lack support for NSS volumes on Linux servers by most backup applications (including mine), I've pretty much determined that it makes sense to move my GW system to EXT3 volumes.
    Even if I change backup software and stick with NSS, and even though all my data is stored on SAN arrays, from what I've read on the forums and from Danita's books, it's preferable to copy your GW system files to a new NSS volume, as opposed to just re-attaching the OES-NW LUN to the new OES11 server.
    Point being, whatever I do will involve copying the entire system via dbcopy and at some point, will also involve shutting down the existing domain and PO for the last phase of the copying process.
    So..., I'm contemplating the following scenario:
    Create a new OES11 server with EXT3 volumes sufficient for holding my GroupWise system.
    Create new GroupWise 8 domain on the server.
    Promote the new domain to primary and upgrade this new domain to GroupWise 2012.
    Once the new domain is upgraded, create new GW2012 post office on new server/primary domain and migrate the users, resources and distribution lists to the new post office.
    In the past I've had an additional post office and had migrated a about 20-25 users to that post office.
    It wasn't a terrible process, and fortunately, I didn't run into any problems with the migration of those users.
    When I re-consolidated my system, moving them back was also problem free
    On the pro side:
    No downtime of entire system
    Relatively simple
    Any issues in the migration process would be user-specific and would not effect the entire system.
    On the con side:
    Process could take far longer, since you can't move a lot of users simultaneously.
    In addition, we have a small group of users with anywhere from 40,000 to 80,000 email in their account, so I'd have to factor that into haw many users I migrate at one time.
    The chance of running into a stalled migration, for whatever reason, is probably much higher than running into a problem with moving the domain and PO via dbcopy.
    The unknown factors for me and my level of experience:
    It's been a while since I've had multiple post offices, so I don't recall what changes the users might see with regard to distribution lists, web access or external email.

    Originally Posted by gathagan
    Moving from GW8 on OES-NW to GW2012 on OES11: Does it make sense to create new post office and move users?
    Is there any reason you think that warrants to do so?
    If the system is performing normally I'd opt to stick to upgrading the current setup as is.
    I'm also curious, are you intending to upgrade to 2014 after the 2012 upgrade?
    Originally Posted by gathagan
    The post office is on the primary domain.
    3 secondary domains hold a GWIA and two web access agents.
    I've never been real clear where the external stuff exists...
    Ok, that setup makes the upgrade easier. As you will start the upgrade with the primary holding the PO's... the PO's can be upgraded right after or during the domain upgrade (depending on if the MTA and POA are running on the same server).
    That means you don't have to think about upgraded webaccess/GWIA connectivity issues with a lower PO version.
    The external stuff are simply configurations found in the existing GroupWise domain databases. Or do you mean where those connected systems actually run?
    Originally Posted by gathagan
    One of the web access gateways resides on an OES11 server.
    The other webaccess agent and the GWIA are on OES-NW servers.
    All reside in NSS volumes.
    And the primary Domain and PO are also still on NetWare (version 6.5 SP8 I presume), correct?
    Originally Posted by gathagan
    Given the lack support for NSS volumes on Linux servers by most backup applications (including mine), I've pretty much determined that it makes sense to move my GW system to EXT3 volumes.
    Which backup application is that? With GroupWise op Linux not much NSS support is needed IMO.... as long as the files get backed up properly other metadata (rights, ownerships, etc) is irrelevant.
    As for EXT3 vs NSS, when dealing with OES I always choose NSS. But that's me.
    Another option could be to use XFS instead of ext3. That does perform much better, but has to be noted that it is more prone to file corruption in unexpected power loss situations.
    With ext3, watch out for the scheduled filesystem check cycles at boot, that is one thing I really dislike about ext3 as disabling that check completely is not recommended and it means at least once a year the system will take an extensive amount of time to complete a (re)boot due to the check running on the ext3 filesystem. That usually pops up on you when you are not counting on it and "just quickly" want to reboot the server in a patching routine or other.
    Originally Posted by gathagan
    Even if I change backup software and stick with NSS, and even though all my data is stored on SAN arrays, from what I've read on the forums and from Danita's books, it's preferable to copy your GW system files to a new NSS volume, as opposed to just re-attaching the OES-NW LUN to the new OES11 server.
    Yes, it's always good if you can start with a clean volume when transitioning from NetWare to OES.
    Depending on how long you can afford to have the system down during upgrade, you can also choose the route of moving the NetWare LUN to the new OES server. Adding a second new LUN to the OES server with the needed size and initializing it with a new NSS volume and then just simply do a volume to volume copy using the cp of rsync command. As it's on the same server that can go quite quickly within an acceptable maintenance window to complete all move/upgrade steps.
    Originally Posted by gathagan
    Point being, whatever I do will involve copying the entire system via dbcopy and at some point, will also involve shutting down the existing domain and PO for the last phase of the copying process.
    Sure, though you don't necessarily have to use dbcopy... depending on what you are planning to do. An offline copy won't require it for example.
    How much data are we talking about (in GB's)?
    Originally Posted by gathagan
    So..., I'm contemplating the following scenario:
    Create a new OES11 server with EXT3 volumes sufficient for holding my GroupWise system.
    Create new GroupWise 8 domain on the server.
    Promote the new domain to primary and upgrade this new domain to GroupWise 2012.
    Once the new domain is upgraded, create new GW2012 post office on new server/primary domain and migrate the users, resources and distribution lists to the new post office.
    If you really want to move users.... sure. I'd again opt for upgrading the existing system.
    Also, it's a good rule to have the PO's running the same GroupWise version and patchlevel before commencing user moves. Moves between PO's with a different GroupWise version can lead to issues.
    Originally Posted by gathagan
    In the past I've had an additional post office and had migrated a about 20-25 users to that post office.
    It wasn't a terrible process, and fortunately, I didn't run into any problems with the migration of those users.
    When I re-consolidated my system, moving them back was also problem free
    If you would want to move users, for whatever reason, I'd opt to first upgrade to the latest version first, then move. There have been many enhancements and bugfixes made in the move procedure over these last couple of years.
    Originally Posted by gathagan
    On the pro side:
    No downtime of entire system
    Relatively simple
    Any issues in the migration process would be user-specific and would not effect the entire system.
    On the con side:
    Process could take far longer, since you can't move a lot of users simultaneously.
    In addition, we have a small group of users with anywhere from 40,000 to 80,000 email in their account, so I'd have to factor that into haw many users I migrate at one time.
    The chance of running into a stalled migration, for whatever reason, is probably much higher than running into a problem with moving the domain and PO via dbcopy.
    I prefer a system upgrade over moving users. The process of moving when dealing with 100+ users, requires more effort and there are always things that need attention for a portion of the users. Also things like mobile devices can require some extra attention after having moved an account for example.
    True, problems during a system upgrade can potentially affect all users. That is a factor. From the many upgrades I've done that's rarely really been an issue and problems encountered during an upgrade did not cause too much delay. Just make sure you always have a good full backup handy so you can reverse the upgrade if ever needed.
    Originally Posted by gathagan
    The unknown factors for me and my level of experience:
    It's been a while since I've had multiple post offices, so I don't recall what changes the users might see with regard to distribution lists, web access or external email.
    If by this you are referring to user moves and address book visibility between PO's, that should not be different to what users are seeing now. At least, the default is that within a GroupWise system all is visible throughout the system. If you have specifically set GroupWise objects to Postoffice visibility... then that would be something to check.
    Cheers,
    Willem

  • I am trying to update my apps on my 4s but says there is not enough space. It shows i have 19.3 GB of 25 GB. Also, in my itunes...it shows about a quarter of space on the bar is photos but I took all the photos out. Don't make sense.

    I am trying to update my apps on my 4s but says there is not enough space. It shows i have 19.3 GB of 25 GB. Also, in my itunes...it shows about a quarter of space on the bar is photos but I took all the photos out. Don't make sense.

    It's telling you there's not enough space *on your 4S*.  The 25GB you refer to is probably that on iCloud, that's different memory than that on your iPhone.  You need to delete video, pictures, apps, or whatever ON THE IPHONE, to make enough room for downloading updates to your apps.

  • Animation logic doesn't make sense....

    I know this probably should go to a suggestion/feature request or what not but A. I haven't been able to find the place for that and B. I felt like it'd make sense to see what others thought of this as well....
    Firstly....I'm learning flash right now and the animation in it is simply put...."backwards". Every other animation program I've touched made sense but here....its mind boggling. After effects, 3dsmax, maya, just about any other animation software you ALWAYS do the animation THEN place the keyframe.
    Why is this important? Because then if you move your object just to see how it would be placed elsewhere temporarily and don't like it, you don't have to undo...or if you moved it accidentally you don't have to try and move it back into place. It doesn't key unless you tell it to key. Unless there's some feature in flash I've not yet discovered that reverses this. The other reason is for the sake of conformity. Sure flash isn't the same as other animation programs but if ctrl+Z is undo universally why do you have to go and change it, just to be different?
    Thats not all. It doesn't make sense to have to push a button to edit multiple key frames. Why can't we just select them all and then edit, why add in a useless extra step to edit frames?
    Lastly and the most annoying part, is the fact that you need to add in 'blank' keyframes to see your animation play. How did this even make sense from inception? Every other animation program your object will always exist ad infinitum unless you make it disappear. Why force us to add keyframes just to see what we have so far...doesn't it make more sense to just push the play button and see it playing endlessly and then during output you set the amount of frames u want rendered? Even more mind boggling is the fact that if you have an element animated within its own timeline you cannot see that animation in the main stage unless you add blank keyframes? Whats the purpose of these blank keyframes? Its so far as I can see just a needless step that never should have been there.
    Well thats my rant.
    Again, I don't script, I'm still learning it, but I come from a heavy background of animation of after effects/fcp/premiere and 3d packages. They are all consistent with how animation works, but here it just seems like it wasn't very thought out.
    Maybe there are some reasons for the way its done for the sake of actionscript or some other reasons I'm not yet aware of. So forgive me if what I'm saying in actuality doesn't make sense. But if it does.....sure this would require what would most likely be a huge overhaul of flash's animation system, certainly not enough time to make it in for cs5....but at least as a future patch or in cs6 it would really make things more logical and flat out less complicated.
    Thanks for reading, comments/critiques are welcome.

    What is your problem?

  • Trying to make sense of AS2 gradient fill matrices

    This one will likely interest kglad, but I'm all ears for
    insight from
    anyone who digs math.
    I've been working with gradient fills lately in AS2, which
    means I've
    been reading through related entries in the ActionScript 2.0
    Language
    Reference. Here's a quick example right out of the docs
    (slightly revised
    to boil it down to the essentials). The Drawing API draws a
    square and
    fills it with a linear gradient that goes from red (upper
    left) to blue
    (lower right).
    this.createEmptyMovieClip("gradient_mc",this.getNextHighestDepth());
    with (gradient_mc) {
    colors = [0xFF0000, 0x0000FF];
    fillType = "linear";
    alphas = [100, 100];
    ratios = [0, 0xFF];
    matrix = {matrixType:"box", x:100, y:100, w:200, h:200,
    r:(45/180)*Math.PI};
    beginGradientFill(fillType,colors,alphas,ratios,matrix);
    moveTo(100,100);
    lineTo(100,300);
    lineTo(300,300);
    lineTo(300,100);
    lineTo(100,100);
    endFill();
    The point of interest, to me, is that generic Object
    instance, matrix,
    with properies x, y, w, h, r, and matrixType. The x and y are
    for position
    and correspond to the moveTo(100,100) call. The w and h
    represent width and
    height. The r is rotation in radians. The matrixType is
    arbitrary (I
    guess), because the same matrix can be used for a radial
    gradient -- never
    mind that for now.
    The properties shown, arbitrary or not, are the ones
    demonstrated in the
    docs. That snippet does draw a 45deg red to blue gradient.
    The docs recommend a slightly different approach for Flash
    Payer 8 and
    higher; namely, the native Matrix class. Everything in the
    above sample
    remains except that the existing matrix line changes to these
    two lines:
    matrix = new Matrix();
    matrix.createGradientBox(200, 200, (45/180)*Math.PI, 100,
    100);
    Pretty obvious to see where they overlap. The matrixType
    property is
    gone, but hey ... everything works, so I'm not going to go
    looking for
    trouble.
    Here's the punch line. The docs *also* show an alternative
    Object
    approach, one in which the properties describe a 3x3 matrix
    whose properties
    are a, b, c, d, e, f, g, h, and i. After toying with this
    a-through-i
    example, I noticed a pattern in the values: c, f, and i are
    0, 0, and 1
    respectively. That seems to correspond to the conventional
    graphics matrix
    a b u
    c d v
    tx ty w
    ... where u, v, and x are 0, 0, and 1. Seems fairly clear
    that tx and ty
    would correspond to x and y. After tracing the properties of
    the matrix
    variable (after the createGradientBox() call) it seemed
    reasonable to me to
    make the following mapping:
    a:a b:b c:0
    d:c e:d f:0
    g:tx g:ty i:1
    ... which led me to replace the original matrix declaration
    with this (back
    to a single line):
    matrix = {
    a:0.086316745750311,
    b:0.086316745750311,
    c:0,
    d:-0.086316745750311,
    e:0.086316745750311,
    f:0,
    g:200,
    h:200,
    i:1
    Those values, by the way, come from my tracing the
    properties of this
    matrix.createGradientBox(200, 200, (45/180)*Math.PI, 100,
    100);
    The weird part is, that still gives a 45deg angled gradient,
    but it's
    super-heavily banded. Not really a gradient at all, but more
    like four
    colored stripes -- red, blue, red, blue -- from upper left to
    lower right.
    Can anyone explain to me why?
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

    GWD,
    > I couldn't leave it alone. I came back to it.
    Ha! I know that feeling. :)
    > matrix = { a:200, b:-100, c:0, d:-100, e:200, f:0,
    g:200, h:200, i:1 };
    >
    > gets close, but its still not quite right. I think the
    difference here is
    > that skew is expressed differently.
    That makes sense. And yes, that comes pretty close.
    > I found a better explanation here:
    >
    http://www.flashdevils.com/tutorials.php?id=142
    Thanks, GWD! That helps a lot.
    > [I would be inclined to use the other approaches if I
    could get
    > away with it.]
    Yeah, I definitely agree. I find it odd that the docs even
    mention it,
    but since they do, I found myself elbow deep in wondering
    why. Thanks for
    input!
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Help.  Does use of .txt file make sense or code directly into an ArrayList

    I am writing my first program and I want to put a series of information in various .txt files. This is because I will have a lot of different objects that I will create that will needed to be iterated over (most of the objects are similar in many ways). It seemed to me that a .txt file would be better than writing the items directly in an arraylist (if you know what i mean). What do you think?
    There will be 7 different objects that will be iterated over (and there will be 12 other objects doing other things as well, they will not be in .txt format), and I thought instead of having to maintain it through the actual code, I would just have .txt files that I create in notepad or something so that when I need to make changes to one of the 7 objects I only have to get the .txt file instead of having to wade through the code to find that object.
    Does this make sense?
    It seems that I will now have to do a lot of I / O to make it work, so now I am thinking maybe it is better to simply use the arrylist. Is there a benefit of one over the other in this circumstance?
    Also one of the objects has jpeg files that will need to be iterated over. Actually for these I will put them in an array list, because I can't seem to figure out yet how to get an image and the information about the image to display within I/O (like CD covers and their titles).
    Thank you for any help and suggestions I feel a little overwhelmed, but hopeful, with you kind folks.
    Peace
    NB I know that I am not using the correct terminology, but I hope that you can understand what I mean.
    Message was edited by:
    peacerosetx

    I am writing my first program and I want to put a
    series of information in various .txt files. Thisis
    because I will have a lot of different objects thatI
    will create that will needed to be iterated over
    (most of the objects are similar in many ways). It
    seemed to me that a .txt file would be better than
    writing the items directly in an arraylist (if you
    know what i mean). What do you think? I think I do not know what you mean. I also think
    that ArrayLists and files shouldn't replace eachI am going to use an ArrayList. Merci
    other.
    There will be 7 different objects that will be
    iterated over (and there will be 12 other objects
    doing other things as well, they will not be in.txt
    format),Seven objects? Twelve objects? Huh? Why not use
    arrays? And how do you get an object into a text
    file?
    and I thought instead of having to maintain
    it through the actual code, I would just have .txt
    files that I create in notepad or something sothat
    when I need to make changes to one of the 7 objectsI
    only have to get the .txt file instead of havingto
    wade through the code to find that object.
    Does this make sense? Your description? Not to me.
    It seems that I will now have to do a lot of I / Oto
    make it work, so now I am thinking maybe it isbetter
    to simply use the arrylist. Is there a benefit of
    one over the other in this circumstance? Uh, ArrayList is way faster and much easier
    modifyable.
    Also one of the objects has jpeg files that willneed
    to be iterated over. Actually for these I will put
    them in an array list, because I can't seem tofigure
    out yet how to get an image and the informationabout
    the image to display within I/O (like CD coversand
    their titles). "Display within I/O"? This makes no sense.
    NB I know that I am not using the correct
    terminology, but I hope that you can understandwhat
    I mean.If you're not using the correct terminology, there's
    no chance for us to understand you. If you say
    "objects" but mean "classes", then say classes.

  • Makes sense try to combine Imac 24 inh wit G4 to work with Final Cut HD.??

    Hi. I'm editing with Final Cut Express HD in my Imac 24 inch that I purchased 6 months ago. Someone offers me a G4 ( Just the desktop, not monitor), as second unit and I was thinking to buy the G4 as second unit. First thing. It makes sense to buy a G4 The Questions is: Can I run the G4 in the screen of my Imac at the same time the Imac is rendering or doing something else?. I want to see both computers running on the same screen or maybe better, sharing files and videos mostly. The reason I ask this is because the Imac is always overwhelmed by endless QTM/WMV renders and I want to have a second unit to save time and do more editing and run other programs as well. Also I wonder what I should change on the G4 (if needed) to run with FCP Pro HD express (The latest one) or work together sharing everything. Thank you very much for your suggestions and ideas.
    Julian.

    Can I run the G4 in the screen of my Imac at the same time the Imac is rendering or doing something else?
    Not without a second monitor to set up a tool such as ScreenRecycler.
    (43071)

  • I need to work on documents in both my iMac and air book. But I have to download document and them upload it, and when I upload it I can't open it unless I open it on my phone first. Yet changes made on phone appear straight away. Does this make sense????

    I need to work on documents in both my iMac and air book. But I have to download document and them upload it, and when I upload it I can't open it unless I open it on my phone first. Yet changes made on phone appear straight away. Does this make sense????

    On your Macs open System Preferences > iCloud
    Deselect the box next to Documents & Data, then reselect that box then restart your Macs.
    On the iPhone tap Settings > iCloud. Switch Documents & Data off then back on then reset the iPhone.
    Hold the On/Off Sleep/Wake button and the Home button down at the same time for at least ten seconds, until the Apple logo appears.
    See if you can open the files now without opening on the iPhone first.

Maybe you are looking for