Parse into array using JDOM! please help

hey,
i've managed to parse an xml document using JDOM
i[b] need to be able to parse it and store the text (the value of each node) into an array, and then insert into db etc.
the problem is with the recursive function listChildren which calls itself... can someone tell me where do i insert the block of code such that i can store it into an array of string.
here's the code:
public static void parse(String stock) throws SQLException
SAXBuilder builder = new SAXBuilder();
Reader r = new StringReader(stock);
Document doc = builder.build(r);
Element root = doc.getRootElement();
listChildren(root, 0);
public static void listChildren(Element current, int depth) throws Exception
String nodes = current.getName();
System.out.println(nodes + " : " + current.getText());
List children = current.getChildren();
Iterator iterator = children.iterator();
while(iterator.hasNext())
Element child = (Element) iterator.next();
listChildren(child, depth+1);
i'm looking for something like:
a=current.getText();
but i donno where to include this line of code, please help
cheers,
Shivek Sachdev

hi, I suggest you make an array of byte arrays
--> Byte[][] and use one row for each number
you can do 2 things,
take each cipher of one number and put one by one in each column of the row correspondent to that number. of course it may take too much room if the int[] is too big, but that is the easiest way I think
the other way is dividing your number into bitsets(class BitSet) with sizes of 8 bits and then you can save each bit into each column of your array. and you still have one number in each row. To put your numbers back use the same class.
Maybe someone has an easier way, I couldnt think of any.

Similar Messages

  • The file just won't load into array...Please Help!

    hi i need some help in loading a binary file into an array so that i can edit the data that was saved from previous run..
    i could save the file but after that when i try to load it back to memory...i can't...ie. all the information keyed in were lost...please help
    this is the Code for the loading process...
         public static void loadAircraft (ArrayList aircraft) {
              try {
                   FileInputStream filein = new FileInputStream(".\\Data\\Aircraft.bin");
                   ObjectInputStream objectin = new ObjectInputStream(filein);
                   Aircraft craft = (Aircraft) objectin.readObject();
                   aircraft.add(craft);
                   objectin.close();
                   filein.close();
              catch (Exception e) {}
         }the above code won't load anything into memory...is there a way for overcoming this?
    inside the Aircraft class there are four different data of which they contain two differen data types.
    one of which is String and the other three are in int.
    Awaiting for reply...thanks

    yes...its some objects of an array that i am trying to load back...
    erm...i'll show you the whole code maybe...
    //to reference the swing library
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    public class SetupAircraft {
         static ArrayList aircraft;
         public static void init () {
              aircraft = new ArrayList(5);
              loadAircraft(aircraft);
         //opens up another sub group while the user
         //entered 1 as his/her option in the SetupSystem
         //menu
         public static void Setup () {
              //this will create a string that is going to be displayed
              //in the input dialog box
              String menu = "  Please select an option:  \n"
                              +"----------------------------\n"
                              +"1) Add New Aircraft\n"
                              +"2) Edit Existing Aircraft\n"
                              +"3) List Aircraft\n"
                              +"4) Delete Existing Aircraft\n"
                              +"5) Save\n"
                              +"6) Return to Main Menu\n\n"
                              +"   Enter a number between 1-6\n";
              //declare a field named option for selection through menu
              int option = 0;
              //continue the loop until the user inputs the number 6
              do {
                   //error handling for the input from the menu
                   //if the input is not integer the error is caught and
                   //reassigning option to be 0
                   try {
                        option = Integer.parseInt(JOptionPane.showInputDialog(null, menu,
                                   "Setup Aircraft", JOptionPane.QUESTION_MESSAGE));
                   catch (NumberFormatException e) {
                        option = 0;
                   //determine which option the user has chosen
                   //and enters the respective section
                   switch (option) {
                        case 1: add(aircraft);
                                  break;
                        case 2: edit(aircraft);
                                  break;
                        case 3: list(aircraft);
                                  break;
                        case 4: //delete(aircraft);
                                  break;
                        case 5: save(aircraft);
                                  break;
                        case 6:     return;
                        default: JOptionPane.showMessageDialog(null, "Please enter a number between 1-6",
                                   "Alert", JOptionPane.ERROR_MESSAGE);
                                   option = 0;
              while (true);
         public static void add (ArrayList aircraft) {
              String type = "";
              int first = 0;
              int business = 0;
              int economy = 0;
              do {
                   try {
                        type = JOptionPane.showInputDialog(null,"Enter Aircraft Type", "Prompt for Type",
                        JOptionPane.QUESTION_MESSAGE);
                        try {
                             if(aircraft.contains(type)) {
                                  JOptionPane.showMessageDialog(null, type + " already exist!",
                                  "Error", JOptionPane.ERROR_MESSAGE);
                                  type = "-100";
                        catch (Exception e) {}
                        if (type=="-100");
                        else if (type.length()==0) {
                             JOptionPane.showMessageDialog(null, "Please enter an aircraft type",
                             "Error", JOptionPane.ERROR_MESSAGE);
                        else if (!(type.startsWith("-",3))) {
                             JOptionPane.showMessageDialog(null, "Please enter the aircraft type with XXX-XXX format where X is integer.",
                             "Error", JOptionPane.ERROR_MESSAGE);
                             type = "0";
                   //catch the input error that the user has produces.
                   catch (Exception e) {
                        return;
              while (!(type.startsWith("-",3)));
              //try to ask the user for the passenger's name and if the name field contains
              //no characters at all repeat the prompt for name field until the user presses
              //Cancel.
              try {
                   first = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter First Class Capacity",
                   "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
              catch (Exception e) {
                   String error = "For input string:";
                   if (e.getMessage() == "null") {
                        return;
                   else if (e.getMessage().startsWith(error)) {
                        JOptionPane.showMessageDialog(null, "Please enter only numbers",
                        "Error", JOptionPane.ERROR_MESSAGE);
              try {
                   business = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Business Class Capacity",
                   "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
              catch (Exception e) {
                   String error = "For input string:";
                   if (e.getMessage() == "null") {
                        return;
                   else if (e.getMessage().startsWith(error)) {
                        JOptionPane.showMessageDialog(null, "Please enter only numbers",
                        "Error", JOptionPane.ERROR_MESSAGE);
              try {
                   economy = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Economy Class Capacity",
                   "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
              catch (Exception e) {
                   String error = "For input string:";
                   if (e.getMessage() == "null") {
                        return;
                   else if (e.getMessage().startsWith(error)) {
                        JOptionPane.showMessageDialog(null, "Please enter only numbers",
                        "Error", JOptionPane.ERROR_MESSAGE);
              Aircraft newAircraft = new Aircraft (type, first, business, economy);
              aircraft.add(newAircraft);
              JOptionPane.showMessageDialog(null, "Aircraft Sucessfully Added",
              "Successful", JOptionPane.INFORMATION_MESSAGE);
         public static void edit (ArrayList aircraft) {
              String type = "";
              int first = 0;
              int business = 0;
              int economy = 0;
              do {
                   try {
                        type = JOptionPane.showInputDialog(null, "Enter Aircraft Type to Edit",
                        "Prompt for Type", JOptionPane.QUESTION_MESSAGE);
                        if (type.length()==0) {
                             JOptionPane.showMessageDialog(null,"Please enter an aircraft type",
                             "Error",JOptionPane.ERROR_MESSAGE);
                        else if (!(type.startsWith("-",3))) {
                             JOptionPane.showMessageDialog(null, "Please enter the aircraft type with XXX-XXX format where X is integer.",
                             "Error", JOptionPane.ERROR_MESSAGE);
                             type = "0";
                   catch (Exception e) {
                        return;
              while (!(type.startsWith("-",3)));
              try {
                   int edited = aircraft.indexOf(new UniqueAircraft(type));
                   Aircraft craft = (Aircraft)aircraft.get(edited);
                   try {
                        first = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter First Class Capacity",
                        "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
                   catch (Exception e) {
                        String error = "For input string:";
                        if (e.getMessage() == "null") {
                             return;
                        else if (e.getMessage().startsWith(error)) {
                             JOptionPane.showMessageDialog(null, "Please enter only numbers",
                             "Error", JOptionPane.ERROR_MESSAGE);
                   try {
                        business = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Business Class Capacity",
                        "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
                   catch (Exception e) {
                        String error = "For input string:";
                        if (e.getMessage() == "null") {
                             return;
                        else if (e.getMessage().startsWith(error)) {
                             JOptionPane.showMessageDialog(null, "Please enter only numbers",
                             "Error", JOptionPane.ERROR_MESSAGE);
                   try {
                        economy = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Economy Class Capacity",
                        "Prompt for Capacity", JOptionPane.QUESTION_MESSAGE));
                   catch (Exception e) {
                        String error = "For input string:";
                        if (e.getMessage() == "null") {
                             return;
                        else if (e.getMessage().startsWith(error)) {
                             JOptionPane.showMessageDialog(null, "Please enter only numbers",
                             "Error", JOptionPane.ERROR_MESSAGE);
                   Aircraft newAircraft = new Aircraft (type, first, business, economy);
                   aircraft.add(newAircraft);
                   aircraft.add(newAircraft);
                   JOptionPane.showMessageDialog(null, "Successfully edited aircraft\n"+type+" to capacities\n"
                   +"First: "+first+"\n"+"Business: "+business+"\n"+"Economy: "+economy,
                   "Successful", JOptionPane.INFORMATION_MESSAGE);
              catch (Exception e) {
                   JOptionPane.showMessageDialog(null,e.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);
         public static void list (ArrayList aircraft) {
              JOptionPane.showMessageDialog(null, aircraft.size()+" aircraft found", "Found",JOptionPane.INFORMATION_MESSAGE);
              Object[] aircrafts;
              aircrafts = aircraft.toArray();
              for (int i=0;i<aircraft.size();i++) {
                   Aircraft a = (Aircraft) aircrafts;
                   JOptionPane.showMessageDialog(null, a, "Aircrafts" + (i+1), JOptionPane.INFORMATION_MESSAGE);
         public static void save (ArrayList aircraft) {
              try {
                   FileOutputStream fileout = new FileOutputStream(".\\Data\\Aircraft.bin");
                   ObjectOutputStream objectout = new ObjectOutputStream(fileout);
                   Object[] aircrafts;
                   aircrafts = aircraft.toArray();
                   objectout.writeObject(aircrafts);
                   objectout.close();
                   fileout.close();
                   JOptionPane.showMessageDialog(null,aircraft.size()+" aircrafts saved", "Sucessful", JOptionPane.INFORMATION_MESSAGE);
              catch (IOException e) {
                   JOptionPane.showMessageDialog(null,e.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);
         public static void loadAircraft (ArrayList aircraft) {
              try {
                   FileInputStream filein = new FileInputStream(".\\Data\\Aircraft.bin");
                   ObjectInputStream objectin = new ObjectInputStream(filein);
                   Aircraft craft = null;
                   while ((craft=(Aircraft)objectin.readObject())!=null) {
                        aircraft.add(craft);
                   objectin.close();
                   filein.close();
              catch (Exception e) {
                   JOptionPane.showMessageDialog(null,e.toString());
                   e.printStackTrace();
    i think thats a bit too long..but it would explain what i am trying to save...its linking to the class Aircraft tho...
    thanks...i appreciate your help...

  • How to Convert array of int into array of byte - please help

    I have a 2-dim array of type int and I want to convert it to an array
    of byte. How can I do that? Also, if my 2-dim int array is one dimention
    can I use typecast as in the example below?
    private byte[] getData()
    byte []buff;
    int []data = new int[5];
    //populate data[]
    buff = (byte[]) data; <---- CAN I DO THIS??????
    return buff;

    hi, I suggest you make an array of byte arrays
    --> Byte[][] and use one row for each number
    you can do 2 things,
    take each cipher of one number and put one by one in each column of the row correspondent to that number. of course it may take too much room if the int[] is too big, but that is the easiest way I think
    the other way is dividing your number into bitsets(class BitSet) with sizes of 8 bits and then you can save each bit into each column of your array. and you still have one number in each row. To put your numbers back use the same class.
    Maybe someone has an easier way, I couldnt think of any.

  • HT4623 My ios update keeps getting stuck on the Restoring iPhone software stage. I uninstalled iTunes and reinstalled it again, but still nothing. Now I can't even use my phone as it shows the plug into iTunes screen. Please help!!!! Thanks,

    My ios update keeps getting stuck on the Restoring iPhone software stage. I uninstalled iTunes and reinstalled it again, but still nothing. Now I can't even use my phone as it shows the plug into iTunes screen. Please help!!!! Thanks,

    A Restore first downloads a new copy of iOS to your computer. On a slow Internet connection this can take a long time. How fast is your connection? How long would you expect it to take to download 900 MB?
    That's assuming nothing is interfering with the download. Some firewalls and antivirus programs will block the download or slow it down. So you should temporarily disable your security software. Security software can also block the update after the iOS download is complete.

  • Hi. Im using iTunes Match, but my iPhone storage is full of music. I haven't downloaded any songs into the device. Please help.

    Hi. Im using iTunes Match, but my iPhone storage is full of music. I haven't downloaded any songs into the device. Please help.

    Go to Settings > General > Usage and tap Music (you may need to scroll down in the list). Swipe across "all music" and tap DELETE.
    When streaming music from the cloud the Music app caches a temporary copy for later playback.

  • HT1222 I bought used iPhone and on this iPhone I'm not able to make new account  on i Cloud'.  How can I use this iCloud's on used iPhone   Please help me

    I bought used iPhone and on this iPhone I'm not able to make new account  on i Cloud'.  How can I use this iCloud's on used iPhone   Please help me
    When I logging there it told me that maximum no of iCloud's Account already activated on this iPhone.
    Please help me how can I open new iCloud's account on this iPhone
    Regard
    Faiz khan

    Set up the account using a desktop or laptop, then sign
    into that account on your iPhone.
    I am not aware of any method around the restriction once
    the maximum has been created on any individual iPhne.

  • How can i access to iCloud to my iphone because it appear to the screen of my iPhone when i try to access my iCloud that the maximum number of free account have been use already please help me

    how can i access to iCloud to my iphone because it appear to the screen of my iPhone when i try to access my iCloud that the maximum number of free account have been use already please help me

    Welcome to the Apple community.
    Once three iCloud accounts have been created on any iOS device, it can you no longer be used to create any more accounts, regardless of what you do to it. You will need to use a computer or another iOS device to create your account and then use the details to log into your account on your phone.

  • HEY, i have some issue i am using macbook air i5...the problem is that without doing anything 1.5gb of ram out of 2gb always in use ..please help me how to make it normal.

    HEY, i have some issue i am using macbook air i5...the problem is that without doing anything 1.5gb of ram out of 2gb always in use ..please help me how to make it normal....
    and my battery back up is max 3 to 3.5 hours in normal use with web ....is this normal or need some betterment!!!!

    ADEEL UR REHMAN wrote:
    ...the problem is that without doing anything 1.5gb of ram out of 2gb always in use
    No computer can do a thing without using memory. 1.5 GB is very little. It's normal.
    3 or so hours from a full charge may also be normal, for what you are doing. As batteries age, they don't last as long on a full charge as they did when they were new. All batteries eventually wear out, and are easily replaceable.

  • In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks

    In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks
    And please help me can type Laos font in it like andrio phone.

    Hi Cozumel,
    Thanks for posting. I'm sorry you're having problems with your bills. I can take a look at this for you. Drop me an email with your account details and a link to this thread for reference. You'll find the address in my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • An app counting minutes and data use. Please help!!!

    An app counting minutes and data use. Please help!!!

    Here's one, there are others in the App store:
    http://itunes.apple.com/us/app/data-usage/id386950560?mt=8
    However, since your carrier is the one that bills you, the only stats that matter are your carrier's. Some carrier's offer apps that provide this info, see if yours does.

  • Can't run very simple DOM parsing source on my machine - please help :(

    Hi Guys,
    I am trying to run the following very simple program on my machine to parse a very simple XML file.
    It just returns Document object NULL.
    Same code is working fine on another machine.
    Note: there is no silly mistake. i have valid xml file at valid place.
    Please help.
    import org.apache.xerces.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import java.io.*;
    class XML
         public static void main(String[] args)
              try{
                   String caseFile = "c:\\case-config\\config.xml";
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setValidating(true);
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   Document doc = builder.parse(caseFile);
                   System.out.println("\n\n----" + doc);
              }catch(Exception e)
                   e.printStackTrace();
    }

    You could also work with JDOM, which I find easier to use than regular DOM:
    import org.xml.sax.InputSource;
    import java.io.FileReader;
    import org.jdom.input.SAXBuilder;
    import org.jdom.Document;
    String caseFile = "c:/case-config/config.xml";
    InputSource inputSource = new InputSource(new FileReader(caseFile));
    SAXBuilder builder= new SAXBuilder();
    Document document = builder.build(inputSource);Just an alternate suggestion.

  • Safari won't open. Firefox disappeared, only question mark. Mail doesn't have content. Time Machine won't turn on because sparse bundle is in use. Please help.

    I had this issue about a month in a half ago and it was fixed by a local technician. I no longer have access to him and I really need some help. The issues are as follows:
    Safari will not open.
    Firefox disappeared. No icon, just a question mark in it's place.
    When I open mail it shows I have new messages but the content is blank.
    Time Machine cannot turn on because sparse bundle is in use.
    New files that were made are no longer available. It's almost as if the computer jumped back in time.
    The Mac Mini is running Mavericks 10.9.5

    I'll assume that you have some way of connecting to this website from the affected machine. If not, ask for other instructions.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen. Click the Clear Display icon in the toolbar. Then try to launch Safari. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How to record sound into array using DAQ ?

    Hi to everyone
    Im last year student , im using LABVIEW for the first time.
    i have an myDAQ , i need to record audio go through the analog ports/AUDIO INPUT of the myDAQ, into array, for later singal proccesing.
    its for my final project.

    First, Learn to use LabVIEW with myDAQ is a series of videos.  To quote the Introduction,
    The Learn to LabVIEW with MyDAQ provides fundamental LabVIEW knowledge for a great out of the box experience with your MyDAQ. Each unit provides a set of videos to allow you to learn at your own pace and review material an unlimited number of times. As well, most videos are accompanied by minor exercises which will help drive home important topics and challenge you along the way.
    View the videos, do the exercises, and I suspect many of your questions will be answered.  If you write some LabVIEW code and have a problem, come back, show us your code, and explain the problem.
    Bob Schor

  • Jsp database access using odbc - please help

    Hi friends,
    I�m trying a very simple database access program in jsp data base access using odbc. Odbc has to be used because thin driver or other drivers may not be available in every system of our college and as you know it's not that easy to make changes to those systems. My problem is so simple. I always get an exception in my program.
    My jsp content is as simple as:
    <%@ page import="java.lang.*,java.sql.*,java.io.*,registerbean" %>
    <jsp:useBean id="db" class="registerbean" scope="session"/>
    <%
    String str="insert into reg values('" + db.getName() + "','" + db.getUname() + "','" + db.getPass() + "'," + db.getAge() + ",'" + db.getSex() + "','" + db.getAdd() + "','" + db.getUgcourse() + "','" + db.getUgqual() + "'," + db.getPer() + ",'" + db.getIadd() + "')";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:yogaesh","scott","tiger");
    Statement stmt=con.createStatement();
    stmt.executeUpdate(str);
    }catch(Exception e1){out.println(str);};
    %>
    the table reg has the structure:
    Name Null? Type
    CNAME VARCHAR2(20)
    UNAME VARCHAR2(20)
    CPSWD VARCHAR2(20)
    CONFPASS VARCHAR2(20)
    CAGE NUMBER
    CSEX VARCHAR2(5)
    CADD VARCHAR2(100)
    COURSE NUMBER
    CQUAL VARCHAR2(10)
    CPER NUMBER
    IADD VARCHAR2(100)
    The registerbean.java file is as below: (This seems to work fine because I tried printing the values using <%= %> tag and it worked out fine and moreover the query string is intact.)
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class registerbean
    private String name,uname,pass,cpass,age,sex,add,ugcourse,ugqual,per,iadd,otherugqual,ccode;
    public void setName(String a)
    name=a;
    public void setUname(String a)
    uname=a;
    public void setPass(String a)
    pass=a;
    public void setCpass(String a)
    cpass=a;
    public void setAge(String a)
    age=a;
    public void setSex(String a)
    sex=a;
    public void setAdd(String a)
    add=a;
    public void setOtherugqual(String a)
    otherugqual=a;
    public void setCcode(String a)
    ccode=a;
    public void setUgcourse(String a)
    ugcourse=a;
    public void setUgqual(String a)
    ugqual=a;
    public void setPer(String a)
    per=a;
    public void setIadd(String a)
    iadd=a;
    public String getName()
    return(name);
    public String getUname()
    return(uname);
    public String getPass()
    return(pass);
    public String getCpass()
    return(cpass);
    public String getAge()
    return(age);
    public String getCcode()
    return(ccode);
    public String getSex()
    return(sex);
    public String getAdd()
    return(add);
    public String getUgcourse()
    return(ugcourse);
    public String getUgqual()
    return(ugqual);
    public String getPer()
    return(per);
    public String getIadd()
    return(iadd);
    public String getOtherugqual()
    return(otherugqual);
    I initially thought the problem was with str but then str seems to be perfect and I get a string of the form �insert into reg values('c','c','c',98,'Male','c','B.Tech, Applied Artificial Neural Networks','HSC',9898,'h')� which I verified through a javascript debugger. The session scope used is to get values through the db bean from another jsp file. The problem is in the executeUpdate() line of this code. I even tried changing the updation table, but in vain. What could be done to rectify this? Please help me out and please do remember that I have no option but to use odbc.
    Thanks in advance.
    R. Yogaesh.

    I didn't verify the type of exception and i'm now going to do that, but then when the string is as perfect as needed, what is the need for a prepared statement? What is the basic difference between the two? And basically what is the problem with this piece of code which creates an exception? Please reply as soon as possible.
    Thankyou very much.
    R. Yogaesh.

  • In system preferences my search engine and homepage are set for google but my computer keeps using BING, please help!

    I have system preferences > general > homepage and search engine set as google but my computer keeps using BING! Please help!

    You installed the "Genieo/InstallMac" rootkit. The product is a fraud, and the developer knowingly distributes an uninstaller that doesn't work. I suggest the tedious procedure below to disable Genieo. This procedure may leave a few small files behind, but it will permanently deactivate the rootkit (as long as you never reinstall it.)
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data. You must know how to restore from a backup even if the system becomes unbootable. If you don't know how to do that, or if you don't have any backups, stop here and ask for guidance.
    Step 1
    In the Applications folder, there should be an item named "Genieo". Select it and open the Finder Info window. If it shows that the Version is less than 2.0, download and install the current version from the genieo.com website. This may seem paradoxical, since the goal is to remove it, but you'll be saving yourself some trouble as well as the risk of putting the system in an unusable state.
    There should be another application in the same folder named "Uninstall Genieo". After updating Genieo, if necessary, launch "Uninstall Genieo" and follow the prompts to remove the "newspaper-style home page." Restart the computer.
    This step does not completely inactivate Genieo.
    Step 2
    Don't take this step unless you completed Step 1, including the restart, without any error messages. If you couldn't complete Step 1, stop here and ask for instructions.
    Triple-click anywhere in the line below on this page to select it:
    /Library/Frameworks/GenieoExtra.framework
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.
    If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder should open with an item named "GenieoExtra.framework" selected. Move that item to the Trash. You'll be prompted for your administrator password.
    Move each of these items to the Trash in the same way:
    /Library/LaunchAgents/com.genieo.completer.update.plist
    /Library/LaunchAgents/com.genieo.engine.plist
    /Library/LaunchAgents/com.genieoinnovation.macextension.plist
    /Library/LaunchDaemons/com.genieoinnovation.macextension.client.plist
    /Library/PrivilegedHelperTools/com.genieoinnovation.macextension.client
    /usr/lib/libgenkit.dylib/usr/lib/libgenkitsa.dylib
    /usr/lib/libimckit.dylib
    /usr/lib/libimckitsa.dylib~/Library/Application Support/com.genieoinnovation.Installer~/Library/LaunchAgents/com.genieo.completer.download.plist
    ~/Library/LaunchAgents/com.genieo.completer.update.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those listed above, move them as well. There's no need to restart after each one. Some of these items will be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    Restart and empty the Trash. Don't try to empty the Trash until you have restarted.
    Step 3
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including ones called "Genieo" or "Omnibar," and any that have the word "Spigot" or "InstallMac" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Your web browser(s) should now be working, and you should be able to reset the home page and search engine. If not, stop here and post your results.
    Make sure you don't repeat the mistake that led you to install this software. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad has a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If youever download a file that isn't obviously what you expected, delete it immediately.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the Genieo developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. It must be said that this failure of oversight is inexcusable and has seriously compromised the value of Gatekeeper and the Developer ID program. You cannot rely on Gatekeeper alone to protect you from harmful software.
    Finally, be forewarned that when Genieo is mentioned on this site, the developer sometimes shows up under the name "Genieo support." If that happens, don't believe anything he says, but feel free to tell him what you think of his scam.

Maybe you are looking for

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables. Currently a single column is returned: tablename. I want to add the column RowCount. DECLAR

  • When trying to sync, I get an error message "account name missing".

    I just tried configuring Firefox Sync on my laptop and desktop (both Macs), with the laptop as source of the sync data. When I try to connect to the server, however, I get an error message "connecting to server failed" on the laptop and "account name

  • Is there a good office like app for ipad

    I have tried documents and cloud on but cannot find a good office like app. Any ideas?

  • BIC mapping names / classes

    Anyone out there using Seeburger BIC converter...Do you know where the mapping names / classes are stored in XI. We think we deployed the mapping libraries but not sure where this is stored for reference. Any help in this matter is greatly appreciate

  • Scroll/select wheel not working

    HELP. My ipod is stuck on the menu list and the wheel is not working. the hold button is the only thing is working so far. i have tried to reset it holding the menu and select button down together. It shows the language menu now, but i can't select n