A few java questions

im not sure if this is the right forum or not so i apologize in advance if its not
first off if you store some table(like a 2 demensional array) of data in some file type (not sure what type to use for this)
is there a way to pull a single piece or a row of data out of the file withought loading the entire file to memory
for example if i have the file
1.5.8.3.9.12
7,4,8,9,2,4
3,10,3,4,1,7
is it possible for me to say take out just thee 10 withought dumping the entire file to memory or the row that 10 is on
second question
is it possible to make a database using only java like replicate mysql just using java

aphxps wrote:
im not sure if this is the right forum or not so i apologize in advance if its not
first off if you store some table(like a 2 demensional array) of data in some file type (not sure what type to use for this)
is there a way to pull a single piece or a row of data out of the file withought loading the entire file to memoryNot really. You don't have to retain the entire file in memory, but you'll probably have to scan through it to find what you want. RandomAccessFiles might come in handy, possibly.
for example if i have the file
1.5.8.3.9.12
7,4,8,9,2,4
3,10,3,4,1,7
is it possible for me to say take out just thee 10 withought dumping the entire file to memory or the row that 10 is on
second question
is it possible to make a database using only java like replicate mysql just using javaReplicate MySQL exactly? Or just write pure Java databases?
If the two questions are, as I suspect, related, I strongly suggest you give up on this endeavour for the time being. It's about 50 squillion times more complicated than simply pulling some data out of a file efficiently.

Similar Messages

  • Interesting Java Questions. Need answers Pls

    Hi All,
    I have come accross few java question, could any one please provide best answers please?
    1. Why the wait() method is there in the Object class? Not in the Threads?
    2. Why JDBC has all interfaces & not classes?
    3. Which type of collection do u prefer to make the incoming objects in sort order?
    4. Why the hasCode() method should be implemented if we are overiding the equals(0 method?
    Please provide me best answers ASAP.
    Girish.K

    do u prefer tohttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Few simple questions from newbie

    I'm new to Java, but i've worked a lot with action script... it didn't help a lot :) Here are my few beginner questions:
    What does: public, static, abstract, void... and other things mean in front of the class name?
    How can i call variables from another classes: if i have one class that does one thing and stores the result in a variable, how can i use that variable from a different class?
    How can i call the input window to enter the value for variable? I've tried with importing "io.inputstream" library, and used the "extend" thing, but i still cant call the input window?

    I came to Java from ActionScript too, and I must say having ActionScript as your first programming language does NOT make it easy to learn other languages. I was incredibly lost when starting with Java.
    What does: public, static, abstract, void... and
    other things mean in front of the class name?You'll find all that in the Java Tutorial
    How can i call variables from another classes: if i
    have one class that does one thing and stores the
    result in a variable, how can i use that variable
    from a different class?To use the variable from another class, you need to make a call to the class. Let's say you're in ClassB; you would make a call to a ClassA variable by doing something such as:
    ClassA.myVar.myMethod();
    How can i call the input window to enter the value
    for variable? I've tried with importing
    "io.inputstream" library, and used the "extend"
    thing, but i still cant call the input window?I recommend reading the tutorial before you try anything like that.

  • Few problems/questions! (cover flow, album art...etc)

    Ok I finally added my songs to my new IPOD (replaced my old one) and this is my first Ipod with video, color...etc. Its the IPOD Classic 80 GIG.
    Well I am having a few problems/questions:
    ---Why when I hit "Get album art" does it ONLY get art for my videos? It doesn't get any for all 1,500+ songs! Is it because they aren't downloaded from Itunes? If so then why does it do it for the movies then? They aren't from ITunes either!
    ---With Cover Flow I updated the Album Art myself and have about 700 songs with art now. But I have two problems.
    1. It won't display all 700 songs under Cover Flow!
    2. It won't show them in order by song name! Can I change that?!? If not then how is it showing them by? What do I need to change?
    ---Are there any other video types supported besides that on Mpeg4 and that other weird type? If not why not? Its a pain to have to convert everything. Its almost not worth having this video IPOD if you have to go through sop much effort just to watch 1 stupid video. I mean I spent more money on extra programs now for music and videos then I did on the IPOD almost.
    ---Is there any way to transfer your music from one IPOD to another? I know some people say you can't but why? What about people like me who have music ripped from our own cds and NOTHING from ITunes? Its a REAL pain having to rerip all the cds, put them back on, rename all the songs, fix all the info...etc. Its taken me 4 days now. Apple needs to think about a "IPOD TO IPOD" music transfer kinda program.
    ---How do you get pics on the IPOD without having to keep them on your PC? I notice it has to SYNC them every time I have it plugged into the PC! But if I tell it NOT to sync pics anymore then they won't stay on the IPOD if turn that option off and unplug the IPOD. Theres got to be another way to add them.

    Assassin X wrote:
    ---With Cover Flow I updated the Album Art myself and have about 700 songs with art now. But I have two problems.
    1. It won't display all 700 songs under Cover Flow!
    2. It won't show them in order by song name! Can I change that?!? If not then how is it showing them by? What do I need to change?
    Cover flow on the ipod can only be done (as far as I know) on Album by Artist Name. On iTunes you can change it around
    Assassin X wrote:
    ---Are there any other video types supported besides that on Mpeg4 and that other weird type? If not why not? Its a pain to have to convert everything. Its almost not worth having this video IPOD if you have to go through sop much effort just to watch 1 stupid video. I mean I spent more money on extra programs now for music and videos then I did on the IPOD almost.
    Try using freeware, heres an excellent video converter for iPods:
    http://www.videora.com/en-us/Converter/iPod/

  • A few simple questions from a new Iphone user

    Hi a few simple questions, just got an iphone 2g - 2nd hand so not really sure what to expect. Anyway I guess my first question is about mine sometimes being a little slow - when I look at contacts and sometimes when sending a txt it slows down/freezes a little - normal?
    Secondly Edge - I havent used it much but when I have its been painfully slow, is this normal - is it always really slow - cause I had read despite not being 3g Edge was actually pretty fast - what exactly is data roaming by the way? I mean I have been switched off as basically I dont wanna use the internet till next month when they change my contract to one I get unlimited access on - is that right?
    Im having a problems syncing videos to it - it just wont sync some but will others and Im not sure why - theyre same file type and they used to sync to my ipod touch but now they wont for some reason
    Cheers

    I have the origina iPhone.
    Downloaded 2.0, synced phone with everything UNchecked. Installed 2.0. Synced with all the options checked to reload my data. The iPhone has been great. Noticed a little lag when I opened contacts. Installed the new upgrade, and everything is back, no lag.
    Edge is Edge and nothing more. It is slow compared to a strong 3g signal. But is liveable most of the time. Heavy traffic can slow it down to barely usable.
    My four wheel drive club has a web site with a large photo section. I was standing out in the middle of parking lot in San Jose, Ca and showing a friend some photos. It opens up a page of small picts to choose from. Select a print and it enlarges, He was amazed at how fast they appeard. Especially given the quantity of photos.

  • Few fundamental Question- Project IMG and BBPs

    Dear All
    I have few basic question and will appreciate answers ,. points will be awarded as well.
    1. Is there any difference between Enterprise IMG and Project IMG ( or is there any thing such as Enterprise IMG exists in Solman).
    2. Can scope of project IMG be changed once it has been creted and saved. ( if yes then Steps plz)
    3.How to create BBP nodes in Solar02 based on Project IMG.
    Regards

    Hi Nayab,
    1. In simple terms, Project IMG is a sub-set of Enterprise IMG, based on what you scope in. It can also be a mirror image of Enterprise IMG (meaning - all entries can be included in Project IMG). If you go to SPRO transaction in the given satellite system (R/3, CRM ...), you'll find different icons in front of each IMG node, under Project IMG - that is to let you 'document' your activities. Enterprise IMG is the core or reference IMG that SAP provides out of the box.
    2. Yes. it can be changed. But, I am unable to list steps here
    3. By BBP nodes in SOLAR02, what did you mean ? I have heard the term BPP (Business Process Procedure) or BB (Business Blueprint). Can you elaborate please.
    Also, the whole topic of Project IMG Vs. Enterprise IMG is about the satellite system involved  and not on SolMan's own configuration.
    Regards,
    Srini

  • Just a few small questions :)

    hi guys, just had a few small questions incase any of u can shed some light on the subject
    1 - i have removed my Sound Blaster Audigy and i am now able to reach 2.5GHz easily, when the audigy was installed, i could never get over 2.4Ghz, why?
    2 - i have increased my vcore to 1.7 yet am experience lower idle temps with c'n'q enabled eg...2.4GHz @ 1.55v would idle at 29c.....2.5GHz @ 1.7vcore idles at 23c, how?
    3 - moving my ballistix ram into dimm slot 3 i am now able to go 1:1 to 228 htt at timings 2.5,2,2,10 easily...when the ram was in dimm slot 1 i couldnt go 1:1 over 200 htt, why?
    if anyone can comment or provide answers i would be most greatful
    thanks guys
    mike XxX

    NetStream.send() should usually be faster than NetGroup.post(), especially when using 1:1 NetStreams (vs Group NetStreams).
    when groups are large, there's no passive way to tell when members join or leave.  however, for small groups (less than about 15 members), they will be "fully meshed", meaning every member has a direct connection to every other member.  when that's the case, you can see the NetGroup.Neighbor.Connect/Disconnect events on a NetGroup.  to receive those, you must create a NetGroup with the same groupspec as your NetStream and listen for NetStatusEvent.NET_STATUS events.
    your function "msg" must be a method on the subscribing NetStream's "client" object to receive NetStream.send()s from the publisher.
    this is all generic ActionScript stuff.  i don't know how to use Flash CS5 but this stuff should all be the same in Flash and Flash Builder.
    -mike

  • Few basic questions about database administration

    Hello,
    I have a few basic questions about database administration.
    1. I switched one of my oracle instances to archivelog mode. I just cannot locate the archive log files on my windows system. The %ora_home%/ora92/database/archive directory is desperately empty...
    2.What is the tools01.dbf datafile used for?
    3.What is the undotbso1.dbf datafile used for?
    Thanks in advance,
    Julien.

    1. The archive log location needs to be specified in your init.ora file. By default, Oracle will place the archive files in either ORACLE_HOME/dbs or ORACLE_HOME/database.
    2. The tools01.dbf file belongs to the tools tablespace which should be set as the default tablespace for system. It primary purpose is to hold Oracle Forms and Reports database objects, however, it should also be used for holding other non sys database objects such as the perfstat (statspack) or other third party database schemas e.g. quests sqllab.
    3. undotbs01.dbf file belongs to the undo tablespace.

  • Java Question... please help

    I am running  Snow Leopard  (mac os x version 10.6.8)
    For the past couple of years I've played gin in yahoo games.  
    Yesterday when I entered the gin lobby ...the font was so tiny
    I wasn't able to read it.   I checked Java on my computer and
    it is enabled, however I just realized when I go into the gin
    lobby... there is no java icon on the dock.   Since the font size
    is fine in all other applications, I am presuming this is a Java
    issue.  
    Help if you are able.. please and thanks

    Huh? Is this a Java question? Where's the Java? I just see a little JavaScript. Do you know how to use servlets and JSPs?
    Jesper

  • What kind of Java questions can I ask?

    Here's a change:
    I want to interview some good java people. I have lots of Java questions in mind which I could ask them, however fellow JavaGuru's
    I would like some potential questions from you which I could ask someone who claims he/she is a good java programmer??
    I am asking because I want to be as fair as possible to the applicant and not ask them questions which I think are tough etc...

    Touchy subject.
    The language is not as important, as understanding programming concepts.
    So fine, when the programmer's horizont involves some abstraction levels.
    If a programmer can write an UML class diagram for a linked list.
    If a programmer knows a design pattern Singleton.
    If a programmer can write his/her own single linked list class with sorted insertion.
    Language concepts:
    - Why:
    import java.util.*;
    Map map = new HashMap();
    - Answer:
    Hiding the choice of implementation (HashMap) by using the more general
    interface Map.
    Don't expect much on an interview though. The situation might not be
    adequate to distinghuish between the good and the bad apples.
    Talking code is a good starting point, code of your making unfortunately.
    A good programmer will hesitate to show really useful code.
    A bad programmer might have stolen his/her code.
    The problem you might have, that you are in search of an expert, not
    having the expertise in-house. In that case you might get a better
    picture, talking about which IDE would be opportune, whether he/she
    has experience with the source version system CVS, what would his/her
    ideas be about coming projects.
    That would establish a common line of communication.

  • Before upgrading iPhone to 3.0 beta a few basic questions!

    We have a few apps up in the store, and I want to upgrade them, so I suppose I need to upgrade my iPhone now to the beta 3.0 firmware.
    Before doing so, I'd like to ask those who have gone before me a few simple questions.
    (1) I don't have anything on my iPhone that is earth-shatteringly important. But if I need to, can I restore to OS 2 and get my old email settings and apps back?
    (2) What does updating to the beta 3.0 firmware really mean? Will I get to preview all the core OS 3.0 apps, including the search features, new Camera, Mail and Safari apps, etc.? If so, that sounds like fun.
    (3) What happens when I synch with iTunes while the beta 3.0 firmware is installed? Will normal synch still work?
    Thanks for any tips or advice on this. I can't afford to get another iPhone device just to maintain my current apps.
    doug

    "A user was earlier reporting that she was getting prompted for clean access login again and again"
    I recommend that you check manage subnet and vlan mapping at the CAS the problem could be located at that level.
    Regards

  • A few quick questions about publishing for iPhone/Android

    I'm currently developing an iPhone/Android game in CS5 and I just have a few quick questions.  If anyone can answer even one or two I'd really appreciate it
    1- I'm developing using a 320 x 480 resolution for the iphone.  When I tested it, the status bar on the top of the screen makes the edges disappear.  How should I turn off the status bar?  And if I can't what resolution should I use?
    2- The performance is a little slow, and the game isn't very intense at all.  What's a good way to improve performance?
    3- For Android, what should I do for the resolution?  Is there a standard resolution or do I have to have multiple resolutions for multiple devices?
    4- Finally, is it worth getting the free trial of CS5.5 before I publish?  Is there anything in there that will be a huge improvement over CS5?
    All help is appreciated

    1. Publish in fullscreen
    2. Use bitmaps, cache all bitmaps, use minimized looping structure etc.
        http://www.yeahbutisitflash.com/?p=986
    3. Android: 480 * 800
    4. Not that much, but you have GUI updates and have a GUI publishing screen for packager for iphone too.

  • Vibe Z2 Pro - Few newby questions

    Hello, as a newby, I have a few simple questions about Z2 Pro and Vibe UI:
    (a) the main issue I have with Vibe UI on this phone is that the 4-apps-per-row look very huge, can you cange it to 5 apps per row with some settings? that would be really useful, as most other big phones are 5 apps per row.
    (b) can I make a guest mode? I think I saw with some other phones, that you can make a guest mode, so that your little cousens don't see all your apps that they don't need to see. I know there is secure mode but that is sothing else.
    (c) can you use Z2 Pro to make the payments with the phone? I know it has the NTF, but don't you need a finger print scanner for that?
    (d) in the camera settings, when I tested the phone, I could not choose 1:1 for the front camera, only for the selfie camera? Is that really so? I would not see why not.
    (e) in the camera settings, I can choose between 3:4 and 16:9 but I somehow could not find the settings for image resolution. what do I do if I want low resolution photos or very high resolutio photos?
    (f) I assume, you can't charge the phone wirelessly, that would be too much to ask for
    Thanks guys.

    Hi, ileyb
    Unfortunately I don't know, what is the "Security Zone" & will be very grateful if you explain a bit about this feature or provide an appropriate link.
    In order to switch to "stock android", you have to do the next:
    1) Go to Settings > About phone > Version information, tap 7 times on "Software version number". This will unlock "Developer options" settings section.
    2) Go to Settings > Developer options > Switch System UI Style and enjoy,

  • A few beginner questions

    I installed AD7 as part of the CS2 Premium package. I have a few basic questions to help me get started.
    1. I have added a Text Field box. When I preview the form and enter text in the form, the text starts in the vertical center of the form, not at the top. I have allowed for many lines of input, but I want the text that is inputed to start on the top and work down the area as the user types, not keep the text centered vertically.
    b How do I change the text field so that the user text starts at the top left of the field?
    2. I'm not really ready to accept the data from my forms as XML. I'd have to write some sort of XML parser or use a database program to read the data. I do not get volumes of data. I would just like to receive a filled in PDF file via e-mail that is easy for me to read after the user fills in their data.
    b How do I code the form so that when the user is ready, it submits the completed form back to me via e-mail in .pdf format?

    I finally found the answer to my question #1, Use the Window<Paragraph to set the attributes for the text field paragraph.<br /><br />I'm still trying to figure out #2 though.<br /><br />I have a new question too<br /><br />b How do I add a note in my form like I can when creating a PDF document in Acrobat?<br /><br />I want to use the note as detailed instructions on how to fill out a particular field.  Perhaps, AD7 has some other way of accomplishing this that is not called a "note"?

  • A few various questions

    Can anyone help me with a few various questions about how to do certain things on the iPhone? Here's my questions:
    - Is there a way to turn off predictive text? I'd like to enter in a phone extension for a contact. I create a new field for the extension number. Then enter in "EXT" but it comes out to "ECT". Also, is there a way to delete that field? Is there a better way to do extensions?
    - How do I hide the keyboard when there isn't an option to hide it? This happens in the Mail settings area.
    - Is there a way to keep the keyboard in all caps just for a single word rather than having to switch to caps for each letter?
    - When I bookmark a website, sometimes the bookmark title is long so I can't see it all. I can click into the field but that puts the cursor at the end of the text string. Is there a way to then scroll left and see all of the words?
    Thanks,
    Brett

    Ok this should be a long one so dig in haha. Ill answer them in the order you asked.
    No, there is no way as of right now to turn off the predictive text feature. You must make sure to cancel the blue suggested word before hitting the space bar.
    There isnt an option to hide the keyboard in any of the applications on iPhone. Im not quite sure what you mean on this one either.
    There is a way to use all caps letters if you have enabled caps lock in the keyboard settings menu and then double tap the icon when typing. It will turn blue when it has been done correctly.
    If you tap and hold your finger on a piece of text, it will pop up a little magnifying glass which can be used to scroll left and right. Its a bit tricky to find the right place on the screen that will make it move though. You will get the hang of it eventually.
    Hope this helps. Enjoy your iPhone!!

Maybe you are looking for