Back to basics blush

Ok, as a veteran programmer of almost 10 years now it pains me to ask this questions because it serves as proof that I should have paid more attention in school. However, sometimes you have to swallow your pride for the sake of education, right? <crickets>
My question is in regards to breaking my poor habit of importing full datasets into Vector types before performing analysis where I only need to possibly reference a small fraction of iterations into the past. I'm googling linked lists like mad but as its such a low level topic I want to save some time and panel the gurus. Basically I want a queue type that I can keep pumping my iterations onto and always look a XMAX number of iterations into the past. Anything >xMAX can be purged thus my interest in avoiding the Vector type and a waste of memory. I may want to look at other values between the XMAX and the current iteration so random access is needed hence I quickly look past the Stack type. I also am wondering if there is a type that's capacity doesn't grow with the my dataset. Thus a FILO type queue were the fact that I add values over XMAX causes the older values to get squeezed out into the digital nothingness.
So is there a specific class Type for my needs or will I have to use an array type with capacity manipulation?
I look forward to your suggestions and thanks in advance for your reply.

Well something that implements the Queue interface I suppose.
But I would recommend reading the Collections tutorial (available here [http://java.sun.com/docs/books/tutorial/collections/index.html] ) and the Generics tutorial (available here [http://java.sun.com/docs/books/tutorial/extra/generics/index.html] ) both of which are relevant to your problem.
And you shouldn't really ever be using Vector anyway but it's most modern replacement ArrayList (which is faster). And you should be using interface types (List or Queue) as well.
Last but not least it seems to me that you may want to find or implement your own circular list (or perhaps circular queue). I think that is what you really want here.

Similar Messages

  • Converted to Dynamic disc in error - how can I get it back to basic?

    I have created a system image onto a external HDD
    I have not yet created a system repair disc as I understand this can only be done once and I didn't want to do it at the wrong time
    Can I format the HDD back to basic then copy the disc image, or won't this work as the disc image is of a dynamic disc?
    If I create a system repair disc of the dynamic HDD will I be able to use it if I take the HDD back to basic?
    Thanks
    (kicking myself for clicking on the wrong box to convert to dynamic!!)

    See this article, be sure your data is backed up First. See #2 if is still bootable, #3 if it is Not bootable
    http://mypkb.wordpress.com/2007/03/28/how-to-non-d​estructively-convert-dynamic-disks-to-basic-disks/

  • I was checking email & noticed a choice: You're in "Basic". Want to go to "Standard"? I chose "Standard" but want to go back to "Basic"? How?

    I was under the impression that "Standard" was faster than "Basic" and had no idea I was in "Basic" so, when I saw the choice, I picked "Standard", but it has changed my email format so much that I'm not comfortable with it. I don't know how to get back to "Basic".

    The Apple iPhone uses a different voicemail system then the rest of the Verizon Wireless network. The only option is a visual voicemail. You can pick a standard greeting. Although I don't know if you are able to choose a standard greetings after creating a personal greeting.

  • Reverting from advanced audit policies back to basic

    Hey,
    I'm trying to revert back to basic audit policies after using advanced polies. The policy is set locally on the DC server 2012. I've tried doing this:
    http://support.microsoft.com/kb/921468. There are no advanced polices set. When I set the basic policies they are good until the next gupdate, then they revert "no configured"
    So what ever reason my firewall can only pull signed on users from the basic audit policies and not advanced. Any idea how to revert this?

    Ok, so I got it figured out.
    For anyone else to reference:
    http://technet.microsoft.com/en-us/library/ff182311(v=ws.10).aspx
    In this document they mention:
    How can I roll back security audit policy from Advanced Audit Policy to basic audit policy?
    Applying advanced audit policy settings replaces any comparable basic security audit policy settings. If you subsequently change the advanced audit policy setting to Not configured, you will need to complete the following steps to restore the original
    basic security audit policy settings:
    Set all Advanced Audit Policy sub-categories to Not configured.
    Delete all audit.csv files from the %SYSVOL% folder on the domain controller.
    Reconfigure and apply the basic audit policy settings.
    Unless you complete all of these steps, the basic audit policy settings will not be restored.
    But my issue was a local policy and not in sysvol. I found 2 file locations.
    C:\Windows\security\audit\audit.csv
    C:\Windows\System32\GroupPolicy\Machine\Microsoft\Windows NT\Audit\audit.csv
    Once I renamed those files. Then I could use basic audit policies again.

  • I downloaded Macfee security and parental control.  The settings have gone back to basic settings but if I try to customise the toolbar by add the "home" icon or adding "contact" to bookmarks until I close and when I open they are gone. Any ideas

    I downloaded Macfee security and parental control.  The settings have gone back to basic settings but if I try to customise the toolbar by add the "home" icon or adding "contact" to bookmarks until I close and when I open they are gone. Any ideas

    Make that four.
    If you have any commercially advertised/available antivirus software installed on your Mac, completely uninstall this per the instructions on the AV developer's website.
    Antivirus software can slow down the normal operation of OS X and can negatively affect OS X performance and operation.
    Do you have apps like MacKeeper or any other maintenance apps like CleanMyMac 1 or 2, TuneUpMyMac or anything like these apps, installed on your Mac? These types of apps, while they appear to be helpful, can do too good a job of data "cleanup" causing the potential to do serious data corruption or data deletion and render a perfectly running OS completely dead and useless leaving you with a frozen, non-functional Mac.
    Plus, these type of apps aren't really necessary. They really aren't.
    There are manual methods to clear off unnecessary data off of your Mac that are safer and you have complete control over your Mac and not just leave a piece of auto cleaning software in charge of clearing off data off of your Mac.
    Their potential of causing OS X issues outweighs the implied good and benefits these types of hard drive or memory "cleaning" apps are written to do.
    Plus, the software companies that write these apps make it hard to easily uninstall these apps if something DOES go wrong and these apps work in a way where you have no recovery or revert function to return your Mac back to its former, working state in the event something does go wrong.
    It is best to never, EVER download and install these types of apps.
    The risk to your system and data is too great a risk!
    Search the web to learn how to correctly and properly uninstall these kinds of apps.
    They all uninstall differently.

  • Post Moved Back-to-basics

    Moved http://community.bt.com/t5/BT-Infinity/Back-to-basics/td-p/695936
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    Hi Sri,
    Before Release 4.0A, ABAP stored the content of internal tables in a combination of main memory and file space. This means that the maximum size of all internal tables of all programs running on such an application server at one time is about 2 GB. With Release 4.0A or greater, this size decreases to about 500 MB. (Note that those values aren't fixed, but this is a good guide. This minimum of 500 MB is the lowest limit of the real value, which varies among different operating systems and even among different releases of the same operating system.)
    It may sound strange that a newer release has a higher restriction on capacity. But it's a consequence of the fact that the contents of internal tables move from a reserved file to shared memory. When you process internal tables this way in Release 4.0A or greater, you pay for much better performance with a smaller potential size.
    Captured in the 2-GB trap of a 32-bit operating system, you have to redesign your program in a way that the complete data is split into different logical parts that each, on its own, can be processed by ABAP.
    http://www.sapinsideronline.com/archive/volume_01_(2000)/issue_01_(june)/v1i1a12.cfm?session=
    Regards,
    Vinay

  • Switching to iphone.. then switching back to basic phone

    Ive had an LG enV for years.  Im thinking about getting an iphone.  Obviously I would need a data plan for my new iphone.  Lets say 3 months from now, I dont want to use the iphone and switch back to my basic LG phone.. Can i cancel my data plan i  had to get for the iphone?  Will I be breaking my 2year agreement contract when I switch back to my LG?

    Your two year agreement is for the line of service, not the specific phone or plan you have on the line. You can swap phones (go back to your basic LG) and remove the data plan at any time, as long as the line of service remains active.

  • Bring back Visual Basic 6.0 ! We all need it.

    Please reconsider introducing VB6 to the market. It is needed by many.

    Hi Reed,
    Thanks for your two posts. Let me try to reply.
    Discussion or Argument ?
    You say "these forums are for discussions not arguments", and suggest that I want an "argument" or I am "trolling".
    Yes they are for discussions and no it isn't the case that I want an argument (or that I am trolling). I am trying to have a reasoned discussion following the opening poster's genuine request to "Please reconsider introducing VB6 to the market. It is needed
    by many."
    I don't consider you treated him fairly. You have some sort of administrative status on this forum, implicit in that is that you should treat all posters equally and fairly. Yet your first post was "Bring back Windows 3.11, we need it. ......VB6 should
    be retired and forgotten."  That post alone was unfair to the OP and it set the tone for other posts that followed.
    In other posts you refer to "VB6 zealots" but never criticize those who oppose the return of VB6 even when they accuse posters of being someone else. (I'm not making a plea for more banning and more censorship, I'm asking that everyone be treated
    equally).
    You also say "At the end of the day it is a fool's errand to argue with fools, so there's little sense to continuing the 'discussion'". Hardly fair and equal treatment, and certainly not an encouragement of discussion rather than argument.
    You also state "If this thread were meant to take itself seriously, it would have a title which was not so obviously false, and it would contain some content with a reasonable argument."  Again, the opening post was clearly a genuine call. You may
    not agree with it but that is no reason to call it 'obviously false'.
    Also the opening post doesn't even refer to VB.NET, it certainly doesn't suggest that VB6 should replace VB.NET - it is others who bring VB.NET into the argument. (And yet you move it to 'Off-topic posts' on the grounds it is not VB.Net related).
    Let me state I am putting this forward as my genuine opinion of your actions, I am not attempting to 'troll', 'flame' or to attack you personally.
    Valid arguments for VB6
    You say Cor has clearly demonstrated there are no valid arguments for keeping VB6 around. Not so.
    First of all the OP says "it is needed by many". Why should your and Cor's opinion be any more important than the OP's ?
    Here are some reasons it is needed (I limit myself to just 5 otherwise this post will be huge):
    1) VB6 is still widely used.  According to the TIOBE index it is the #7 most popular programming language - an amazing feat for a language last updated 16 years ago.  Particularly as Microsoft (& others) have spent 12 years trying to kill
    it off. You may not like it, but there it is.
    2) There are still a huge number of legacy VB6 applications in use, especially in corporates and government. Microsoft have (to their credit) recognized this and offer "it just works" support for the VB6 runtime until at least 2023 (soon to be extended).
    But this support is for the runtime, not the IDE.
     Microsoft effectively offer 2 options for these VB6 applications
       a) If no modifications are required, continue running the VB6 application (presumably Cor disagrees with Microsoft).
       b) If modifications are needed, migrate to VB.NET. 
    But in real life the most likely scenario is that the VB6 application will require a minor modification.
    So what do you do ? According to Microsoft you migrate. But if the modification is just to change (for example) some text on a form that would be nonsense.  I saw a suggestion a while ago that it cost $1 for every 3 lines of code migrated.  So
    a medium sized VB6 application could cost say $20,000 to migrate.  Clearly that is not an acceptable cost for the minor modification I suggested. (Don't get hung up on actual cost figures, I am just pointing out there are potentially significant
    costs involved).
    The obvious answer for this scenario is to use VB6 (at a cost of say $20 not $20,000). Yet Microsoft don't offer this, stating that the VB6 IDE is not supported on Windows 7 or 8. 
    Does anyone disagree that doing minor modifications in VB6 is the only acceptable solution in this scenario? Or are some going to suggest it is better to spend $20,000 than $20 ?
    Microsoft have painted themselves into a bit of a corner here, stating that they support unmodified VB6 applications until 2023, but you can't (theoretically) modify them.
    For completeness on this point I'll cover some other typical scenarios too:-
    One is that the VB6 program needs to become a web application - effectively this is then a re-write not a migrate, so you can decide what language is best to use. It may be, for example, that JavaScript/HTML5 is the way to go. (I've followed this route myself
    for some old VB6 apps).
    Another is that the VB6 application needs a mobile version. A few years ago that may have been VB.NET for Windows Mobile. (I've done that myself too, great for Windows CE/Windows Mobile 6.x). But doing this today you are really looking at iPhone,iPad
    and Android - again you can choose the best approach (native or web app ?) and language.
    The final scenario I'll mention is the one Microsoft do cover - migrate your desktop VB6 app to desktop VB.NET.  I can't think of any occasion in the last few years where I have found a genuine need to do this.  I have certainly seen cases where
    IT (or whoever) have decided that VB6 apps must be migrated because VB6 is 'obsolete' (I guess a view not too dissimilar from many in this forum). I've even done a few of these myself (though I had the sense to only do smaller migrations, not wanting
    to tie myself up with large scale migrations). I don't think of any of  these new applications (done by myself or others) were any better than the ones they replaced, but at least the customers were happy (and paid well).
    3) VB6 is the same language as VBA. VBA is a current, Microsoft supported language. It is in Microsoft's flagship product Office 2013. And it is the same language as VB6. You can cut and paste code between VB6 and VBA (and vice-versa). It is the same
    language.
    Both VB6 and VBA use the Visual Basic Runtime Library. In fact it is more than that, VB6 actually uses VBA to define it's language. In effect the VB6 IDE is a host for VBA in the same way that Word or Excel are hosts.
    It is strange that Microsoft support (and sell and extend) the language when it is named VBA but not when it is named VB6.
    Microsoft say VBA will be supported for the foreseeable future stating "This means that if you have an existing VBA project that you are satisfied with, you can be confident your investment is safe". Where is the logic in having this for VBA but not VB6
    They assure you your VBA investment is safe but won't give the same assurance for your VB6 investment.
    (OK, for the more pedantic posters VB6 is the same as VBA6.  VBA7 is the latest release and includes a handful of modifications to support 64 bit Windows. Prior to VBA7 the languages were kept identical, it is these same modifications that many
    of us now would like to have incorporated into an updated VB6).
    4) A suggestion to bring back an improved version of VB6 is the fifth most popular (out of almost 8,000) on the Visual Studio UserVoice site. Vote
    for VB6
    5) Microsoft's program manager for Visual Studio stated (Channel 9) "It isn't cost effective to keep rewriting code to get back to functional equivalence".  Quite so. So why re-write existing VB6 applications ?  (Again, Cor presumably disagrees).
    General Points
    You mention LightSwitch and SmallBasic. A good point.  But I'm sure you know neither support VB6 code so it doesn't address the concerns of the OP.  But it is nice to see that you aren't opposed to all languages that aren't called 'VB.NET'.
    So why the opposition to an updated VB6 ?  If you prefer, it could be named LightSwitch 6.1 rather than VB6.1 ? Or maybe SmallBasic 7.0 ? Or if you see VB6 as a threat to VB.NET you could name it VB Junior. As long as it can open and compile VB6
    code that's fine by me. Incidentally, there is certainly no call for VB6.1 to be part of "the .Net family".
    You say "you want these hard working people to DO MORE WORK so that you can continue to generate income from your ancient endeavors."   I'm not sure I see your point here.  How is asking for Microsoft to bring back VB6 (together with the modifications
    they have already done for VBA7) doing that? I suspect Microsoft could do this for a fraction of the money they have wasted on LightSwitch or SmallBasic. And if it is going to be more work than Microsoft can handle (as if) they should open source
    VB6.
    You mention that your 8 year old website is 'crap'. Well, that's what happens with websites. But the analogy doesn't really hold for a typical VB6 desktop program. A desktop CRUD program written in VB.NET doesn't really look (or behave) any different
    to the same program in VB6.
    You ask what I will be doing in 5 years when nobody uses PCs anymore ?  Well who knows what the future will bring, but it is likely to be VB6 for those (mainly corporate) users still using desktops and laptops or Windows tablets, JavaScript for
    Web apps - including iOS and Android - (I note Microsoft are recommending JavaScript/HTML5), and something (maybe Basic4Android ?)  for native Android apps if Android phones and tablets become more acceptable for corporate users. I'll probably
    also be migrating my VB.NET apps to JavaScript too.
    As things stand, Microsoft have sent a clear message: 'If you are planning to make a substantial investment in developing your software, if your application is mission-critical, if you expect to use it for years to come - don't use Microsoft languages.'
    Have Microsoft learnt from this ? The killing of Silverlight would suggest not.

  • I just updated my Apple TV software and now I can't get to iTunes and the menu keeps going back to basic menu.  Software update fail!

    Updated my software when prompted three days ago and as soon as the update was finished the basic screen came up with main menu.  However, when I selected "Podcasts", "TV" or "Movies" the screen goes black and the same home screen comes up again.  The only things that work are HuluPlus and Netflix and all non-iTunes icons.  I can't buy anything from the iStore so if Apple wants me to keep iShopping at the iStore and take my iMoney you might want to make a patch available quickly.

    I just did the update to version 5.2 on our ATV2 and now I'm having the exact same problem as the OP- all attempts to access any iTunes services i.e. Movies or TV result in dropping back to the ATV Main menu.   Per Winston's suggestion, I logged out of iTunes and then tried to log back in.  I am getting a message "the server is not responding- please try again later".
    FWIW- all my non-iTunes services on the ATV are working fine- i.e. Netflix and YouTube.
    Sounds like the update has overwhelmed the Apple servers.
    Dave

  • How do I set a noise print for the entire track? (Back to Basics)

    Ok. I've only worked in STP with single audio clips. Now, I'm trying to adjust audio inside a Multi-Track project sent from FCP... and it's a little different. At least to a guy like me.
    I'm struggling with the most basic issue, and that's possibly why I can't find an answer to it.
    Simply, "How do I go about setting a noise print for an entire track?" I've done this for a single audio clip, but now that I'm in a slightly different environment my old ways don't work. I've looked through video tutorials hoping to find something but no luck.
    Any help is greatly appreciated!
    JS

    With the audio opened in SoundTrack Pro, select (highlight) a small portion that only contains the noise that you want to reduce.  Sample that section. then select the entire audio clip and use the Noise Reduction tools to reduce the noise that you sampled earlier.
    -DH

  • Lost the 'file, edit' etc'task bar on the left side of my mail menu.  my upper left screen reads 'welcome to lightroom moblie.  I never had nor can use these.  how do i back to basic LR and upper left task bar?

    I have lost my 'file,edit, ...' task bar from the upper left side of my LR screen.  My upper left corner now reads something about welcome to Lightroom mobile. ( I have never had or used the mobile version and I can't use it anyway. )  When I push my mouse pointer up again the top of the screen the 'file, edit,...' does not reappear and stay as it has been doing for the last 3 years.  How can I get it back?  And, maybe what did I do so I can avoid this from happening again?  Thank you.  (I am not PC knowledgeable, please bear with me.)

    Does the menu bar appear when you move your mouse pointer to the top of your display. If so then you could change the behavior of Lightroom via the menu Window->Screen Mode
    Hope that helps
    Guido

  • InDesign reverting back to basic colour scheme after crash

    I am new at this software, how do I get my orignal colours on my design back - also the printers come up with different colours

    Which version of InDesign are you working with, and which platform? I cannot reproduce the behavior you describe (I tried with Image Sequence in CC 2014 Mac) even after saving, closing the doc, and reopening.

  • How do I get general back to basics help?

    Had an I Pad and I Touch and didn't use a lot.  Now I have another I Pad and I Phone...I really need to understand it all.  The Apple Store is far from me and I do'nt have time to go to mulitple sessions.  I just want to pay an expert to sit down and show me everything for an hour or two.  Any ideas?

    Hey Westmad,
    Thanks for the question. Our support website has a great deal of information. To get you started, you might want to check out these resources:
    Learn more about iOS 7 and iPhone - Apple Support
    http://support.apple.com/basics/iphone
    iPhone User Guide
    http://help.apple.com/iphone/7/
    iPad User Guide
    http://help.apple.com/ipad/7/
    Apple - Support - Videos
    http://support.apple.com/videos/
    Thanks,
    Matt M.

  • How I can find my original manu bar permanently?I want the forward and back tab included window.now I have a window which only shows latest headlines,most visited,customize links etc.help to get back the basic firefox window.

    I made some changes to have a bigger web page display.but now my window shows only a bar providing some tabs such as newest headlines,most visited,customized links,free hotmail,getting started,windows,windows marketplace and windows media.I want to get back my old window with tabs of back,forward etc. and main menu bar.

    In addition to '''''the-edmeister's''''' reply, for other toolbars, also see:
    *https://support.mozilla.com/en-US/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Back to basics on Exporting to AVI or MOV - HD

    Hello all!
    I can't believe I'm asking this because I have exported from Premiere for years.   (But not to MOV and AVI when dealing with HD -- it was always to some compressed format such as FLV or MP4, etc.))
    And I asked a similar question just a few days ago.  But now I need to be very specific about this specific project.
    I need to export from premiere CS5 to a file I can use in After Effects. CS5
    Yes, I've been trying dynamic link -- and have had nothing but problems, so for now, for this project I need to export from premiere to a old fashioned AVI or MOV file and then import into After Effects.
    My sequence settings are 1920 x 1080. 29.97 FPS   (FYI My orignal MOV  video file sizes are Image Size: 1920 x 1080
    The only AVI and MOV files export options I see will not give me the above sizes, or will give me sizes with black bars above and below.
    I don't want to lose quality during the export for many reasons, including I will export out of After Effects back into Premiere when I am finished in After Effects.
    Thanks
    Rowby

    OK some screenshot. Dont look at the source as i am on pal and HDV.
    This is what you see after selecting Lagarith via the Preset DV AVI
    The Preset turns to Custom
    Uncheck the chain or lock or whatever it is called (Maintain aspect ratio while resizing)
    and set every thing manually.

Maybe you are looking for

  • Itunes won't open anymore. I get a runtime error now.

    I uninstalled and reinstalled and still get the error. It looks like this: Runtime error!  Program C:\Program Files\iTunes\iTunesHelper.exe  R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the applic

  • Sprite sheet from PhotoShop CC 2014 layers to Edge Animate?

    Hi The Photoshop CC 2014 script that takes layers and generates a sprite sheet to the latest Edge Animate does not appear to work correctly. Unless I"m missing something very obvious (that isn't in the instructions below provided by Adobe), it doesn'

  • Drop down menu in error

    This is a strange one.  I don't even know if I can explain it properly, so please bear with me I have a form that I have made fillable, a very simple form, nothing out of the ordinary.  When I sent it to my client, the fillable portions worked perfec

  • Query weblgoic runtime JVM and thread that carry the user credential

    Hi there, So far as I know, weblogic keeps track of user credentials from different JVM and different thread. However, for the same thread within same JVM, weblogic only keep on user credential in the EJBContext. So, is there any way or any API for m

  • Help with my nested loop...

    this application allows a user to enter two int values, rows(height) and columns(length), that are used to create a box of asterisks. my createBox() does not work correctly, only prints first line, loops infinitely, or doesnt loop. can someone help m