Help: "no exact representable decimal result"

I have a program which calculates the value of e, however it will not let me increase the accuracy of the calculation. Currently it is only accurate to about 5ish places and caps out with an error. I thought BigDecimal would allow me to do this type of operation. What am I doing wrong?
import java.math.*;
public class Main {
    public static void main(String[] args) {
        BigDecimal num = new BigDecimal(25000); //bigger the number, the harder and more accurately e is calculated
        BigDecimal finl = (BigDecimal.ONE).add(((BigDecimal.ONE).divide(num))).pow(num.intValue());
        System.out.println(finl.toString());
//My testing of diffrent values for "num":
//10,000 == ~1 second
//25,000 == ~8 seconds
//50,000 == ~31 seconds
//75,000 == BUG: "Non-terminating decimal expansion; no exact representable decimal result." :(
Edit Here is the exact error when I use a large number like 75000:
Exception in thread "main" java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
at java.math.BigDecimal.divide(BigDecimal.java:1514)
at Benchmark.Main.main(Main.java:8)
Java Result: 1
Edited by: kavon89 on Apr 16, 2008 12:01 AM
Edited by: kavon89 on Apr 16, 2008 12:03 AM

After sifting through the API some more, I've found MathContext fixes the inefficiency. Under a second to complete the process with an added precision/MathContext thing is just as accurate.
I'm finding that it's not just the large size of the number, but just a specific number that causes it to throw the error mentioned above. For example, 75000 was what I kept trying and getting an error with, but when I tried 80000 it worked.
Well, now that it's not the size of the number, lets just shoot in the dark and get more accuracy!
import java.math.*;
public class Main {
    public static void main(String[] args) {
        String reallybig = "50000000000";
        BigDecimal num = new BigDecimal(reallybig); //bigger the number, the harder and more accurately e is calculated
        MathContext prsc = new MathContext(20);
        BigDecimal finl = ((BigDecimal.ONE).add((BigDecimal.ONE).divide(num))).pow((num.intValue()), prsc);
        System.out.println(finl.toString());
Exception in thread "main" java.lang.ArithmeticException: Invalid operation
        at java.math.BigDecimal.pow(BigDecimal.java:1932)
        at Benchmark.Main.main(Main.java:10)
Java Result: 1Great, a new exception. This time looking at the source of BigDecimal shows why:
    public BigDecimal pow(int n, MathContext mc) {
        if (mc.precision == 0)
            return pow(n);
        if (n < -999999999 || n > 999999999)
            throw new ArithmeticException("Invalid operation");So now I know I can't raise a BigDecimal to a number greater than 999999999.
My code is meant to be used in a benchmark and I can barely get 20 decimal places of accuracy with e. Is Java just incapable of this "heavy duty math" that takes less than a second to compile or should I use a different approach?

Similar Messages

  • I used firefox help and now the search results keeps reloading when I start firefox

    I just loaded firefox and I used the firefox help feature. now my search results continue to load in a separate tab when ever I open firefox. I cleared history in tools and still this page keeps loading in a tab when i open firefox.

    Hi,
    You can try to '''Restore to default''' the '''Home page''' in Firefox '''Tools''' ('''Alt''' + '''T''') > '''Options''' > [https://support.mozilla.org/en-US/kb/Options%20window%20-%20General%20panel?as=u General]. If the problem persists you can also try deleting the '''sessionstore.js''' file in the [http://kb.mozillazine.org/Profile_folder Firefox Profile Folder] after exiting Firefox. To open the profile folder via Firefox: '''Help''' ('''Alt''' + '''H''') > '''Troubleshooting Information''' > '''Show Folder'''.
    [https://support.mozilla.org/en-US/kb/Firefox%20has%20just%20updated%20tab%20shows%20each%20time%20you%20start%20Firefox Similar]
    [https://support.mozilla.org/en-US/kb/Options%20window Options]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]

  • Help converting binary to decimal.

    Hi all.
    I'm taking a course in Java programming and so far its been a great experience. I'm currently stumped on one of my assignments and I am kindly requesting some assistance.
    Basically I have to convert a binary entry into its decimal comparison.
    so for instance an entry of 1101 would output 13.
    I have the calculation formula, but my problem is finding out whether the point i'm looking at is either a 1 or a 0. I can't seem to 'strip it down' to the value.
    My current thought is something like this:
    binary = 1101;
    // problem is here
    thou = (binary % 1000) / 1000;
    hund = (thou % 100) / 100;
    tens = (hund % 10) / 10;
    ones = (tens % 1) / 1;
    // then do formular
    decimal = ones * 1 + tens * 2 + hund * 4 + thou * 8;
    I have searched but all the suggestions say to use a custom function or other obscure method. I don't know that stuff real well and we aren't even that far in the book either. All we've done so far is while, if .. else, condition statements.
    I will include the actual text for the question, in case i'm not clear. This text also includes a 'tip' which isn't helping me. (http://www.geocities.com/kaveman2000/q-4-25.pdf)
    Thanks again for any pointers.

    angeles1016 (and all),
    thanks for your great help and code snippets.
    angeles1016,
    using the code you provided i noticed that the last (single digit) was giving the wrong response in certain cases. (1000, 0111, 0001, ..) i could be off one.
    either way, i decided to fix it up and give you all the update.
    // do class, main function stuff
         if(binary/1000 == 1){
              thousands += (binary/1000);
         temp = binary % 1000;          
         if(temp/100 == 1){
              hundreds += (temp/100);
         temp = temp % 100;          
         if(temp/10 == 1){
              tens += (temp/10);
         temp = temp % 10;
         if(temp/1 == 1){
              ones += (temp/1);
         // calculate binary to decimal     
         decimal = (ones * 1) + (tens * 2) + (hundreds * 4) + (thousands * 8);
         // take result and convert to string for output
         result += "Decimal: " + decimal + "\n";
    // display in gui ?
    // end function and class stuff(note: i suppose the statements similar to "thousands += (binary/1000);" can be simplified as "thousands = 1;")

  • I need help with setting 2 decimal places

    I am using netbeans to create a GUI. My math works I need help formatting the result to 2 decimal places.
    Thanks for any help.
    This is part of my code..
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    // Regular button
    double RegularPrice = 3.09;
    double num1, result;
    num1 = Float.parseFloat(jTextField1.getText());
    result=RegularPrice * num1;
    jLabel2.setText(String.valueOf(result));
    }

    http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html

  • Printing exactly 2 decimal places

    I'm trying to print my double type variables to exactly 2 places. but numbers such as 3.00 and 124.00 keep printing as 3.0 and 124.0. Is there an easy way to force the printing to two decimal places on a primitive double type value without having to cast it to a Double object and playing around with NumberFormat and all that entails?
    thanks much,
    jh

    darelln has exactly the right answer, except that you must do the thing you don't want to do. If it were me, I'd go with his example. It's less work and much cleaner.
    import java.text.*;
    public class DoubleTest {
    static double[] numbers = {3000, 124.12, 123.122, 3.0, 124.0, 10.2, 12.14, 1234.55};
    static final NumberFormat f = new DecimalFormat("#.00");
        public static void main(String [] args) {
            System.out.println("Goofy way!\n");
            for (int i=0 ; i<numbers.length ; i++) {
                printD(numbers);
    System.out.println("\nRight way!\n");
    for (int i=0 ; i<numbers.length ; i++) {
    System.out.println(f.format(numbers[i]));
    static void printD(double dbl) {
    if (dbl % 10 == 0) {
    System.out.println(dbl + "0");
    } else {
    String sdbl = "" + dbl;
    String predot = sdbl.substring(0, sdbl.indexOf("."));
    String atdot = sdbl.substring(sdbl.indexOf("."), sdbl.length());
    String postdot = sdbl.substring(sdbl.indexOf(".") + 1, sdbl.length());
    if (postdot.length() == 2) {
    System.out.println(sdbl);
    } else if (postdot.length() < 2) {
    System.out.println(predot + "." + postdot.substring(0,1) + "0");
    } else {
    System.out.println(predot + "." + postdot.substring(0,2));
    java DoubleTest
    Goofy way!
    3000.00
    124.12
    123.12
    3.00
    124.00
    10.20
    12.14
    1234.55
    Right way!
    3000.00
    124.12
    123.12
    3.00
    124.00
    10.20
    12.14
    1234.55
    and the results are identical!

  • Help with binary to decimal, binary to hex, and hex to ascii or ascii to hex program

    I decided to do a program that will do binary to decimal, binary to hex, and hex to ascii for a project related to a java programming course, which only needs to perform features from chapters 1-6 and 8 of Tony Gaddis's book. The functions work fine as their own main programs out side of this combined effort, so can anyone help me determine why I get the following 41 errrors saying: class, interface, or enum expected as well as any other errors that may show up afterwards because I'm stumped. My flowcharts, which have to be revised after discovering that my previous function were logically incorrect after running them in their own main are attached below as the spec sheet.
    My code is as follows and I hope you don't mind the commented lines of unused code because I'm not sure where I want things and what I want at the moment:
    import java.util.Scanner;
    import java.io.*;
    import java.lang.*;
    public class BintoDectoHextoAscii
       public static void main(String[] args)throws IOException
          Scanner input = new Scanner(System.in);
          System.out.println("Enter a binary number: ");
          String binary = input.nextLine(); // store input from user
         if (binary == input.nextLine())
          //int i= Integer.parseInt(hex,2);
          //String hexString = Integer.toHexString(i);
          //System.out.println("Hexa decimal: " + hexString);
          //int finaldecimalvalue = binaryToDecimal(hexString);
          int finaldecimalvalue = binaryToDecimal(hexString);
         if (binary != input.nextLine())
          String hexInput; // The variable Bin Input declared as the datatype int to store the Binary value  
          // Create a Scanner object for keyboard input.
          //Scanner keyboard = new Scanner(System.in);
          // Get the number of binary files.
          System.out.print("Enter the Hex value: ");
          hexInput = keyboard.nextLine();
          System.out.println("Original String: "+ hexInput);
          //String hexEquivalent = asciiToHex(demoString);
          String hexEquivalent = asciiToHex(hexInput);
          //Hex value of original String
          System.out.println("Hex String: "+ hexEquivalent);
          String asciiEquivalent = hexToASCII(hexEquivalent);
          //ASCII value obtained from Hex value
          System.out.println("Ascii String: "+ asciiEquivalent);String finalhexOutput = HextoAsciiConverter(hexEquivalent);
         if (binary != input.nextLine() && hexInput != keyboard.nextLine())
             BufferedReader binInput = new BufferedReader(new InputStreamReader(System.in));
             System.out.println("Enter the Binary number:");
             String hex = binInput.readLine();
             //String finaldecimalvalue = binaryToDecimal(decimal);
             //long finalhexvalue = BinaryToHexadecimal(num);
             long finalhexvalue = BinaryToHexadecimal();
       public static String BinaryToHexadecimal(String hex)
          //public static void main(String[] args)throws IOException
             //BufferedReader bf= new BufferedReader(new InputStreamReader(System.in));
             //System.out.println("Enter the Binary number:");
             //String hex = binInput.readLine();
             long num = Long.parseLong(hex);
             long rem;
             while(num > 0)
             rem = num % 10;
             num = num / 10;
             if(rem != 0 && rem != 1)
             System.out.println("This is not a binary number.");
             System.out.println("Please try once again.");
             System.exit(0);
             int i= Integer.parseInt(hex,2);
             String hexString = Integer.toHexString(i);
             System.out.println("Hexa decimal: " + hexString);
          return num.tolong();
      //int i= Integer.parseInt(hex,2);
      //String hexString = Integer.toHexString(i);
      //System.out.println("Hexa decimal: " + hexString);
    //} // end BintoDectoHextoAsciil
       //public static String HexAsciiConverter(String hextInput)
          // Get the number of binary files.
          //System.out.print("Enter the Hex value: ");
          //hexInput = keyboard.nextLine();
          //System.out.println("Original String: "+ hexInput);
          //String hexEquivalent = asciiToHex(demoString);
          //String hexEquivalent = asciiToHex(hexInput);
          //Hex value of original String
          //System.out.println("Hex String: "+ hexEquivalent);
          //String asciiEquivalent = hexToASCII(hexEquivalent);
          //ASCII value obtained from Hex value
          //System.out.println("Ascii String: "+ asciiEquivalent);
       //} // End function  
       private static String asciiToHex(String asciiValue)
          char[] chars = asciiValue.toCharArray();
          StringBuffer hex = new StringBuffer();
          for (int i = 0; i < chars.length; i++)
             hex.append(Integer.toHexString((int) chars[i]));
          return hex.toString();
       private static String hexToASCII(String hexValue)
          StringBuilder output = new StringBuilder("");
          for (int i = 0; i < hexValue.length(); i += 2)
             String str = hexValue.substring(i, i + 2);
             output.append((char) Integer.parseInt(str, 16));
          return output.toString();
       public static String binaryToDecimal(String binary)
            //Scanner input = new Scanner(System.in);
            //System.out.println("Enter a binary number: ");
            //String binary = input.nextLine(); // store input from user
            int[] powers = new int[16]; // contains powers of 2
            int powersIndex = 0; // keep track of the index
            int decimal = 0; // will contain decimals
            boolean isCorrect = true; // flag if incorrect input
           // populate the powers array with powers of 2
            for(int i = 0; i < powers.length; i++)
                powers[i] = (int) Math.pow(2, i);
            for(int i = binary.length() - 1; i >= 0; i--)
                // if 1 add to decimal to calculate
                if(binary.charAt(i) == '1')
                    decimal = decimal + powers[powersIndex]; // calc the decimal
                else if(binary.charAt(i) != '0' & binary.charAt(i) != '1')
                    isCorrect = false; // flag the wrong input
                    break; // break from loop due to wrong input
                } // end else if
                // keeps track of which power we are on
                powersIndex++; // counts from zero up to combat the loop counting down to zero
            } // end for
            if(isCorrect) // print decimal output
                System.out.println(binary + " converted to base 10 is: " + decimal);
            else // print incorrect input message
                System.out.println("Wrong input! It is binary... 0 and 1's like.....!");
            return decimal.toint();
       } // end function
    The errors are as follows:
    ----jGRASP exec: javac BintoDectoHextoAscii.java
    BintoDectoHextoAscii.java:65: error: class, interface, or enum expected
       public static String BinaryToHexadecimal(String hex)
                     ^
    BintoDectoHextoAscii.java:73: error: class, interface, or enum expected
             long rem;
             ^
    BintoDectoHextoAscii.java:74: error: class, interface, or enum expected
             while(num > 0)
             ^
    BintoDectoHextoAscii.java:77: error: class, interface, or enum expected
             num = num / 10;
             ^
    BintoDectoHextoAscii.java:78: error: class, interface, or enum expected
             if(rem != 0 && rem != 1)
             ^
    BintoDectoHextoAscii.java:81: error: class, interface, or enum expected
             System.out.println("Please try once again.");
             ^
    BintoDectoHextoAscii.java:83: error: class, interface, or enum expected
             System.exit(0);
             ^
    BintoDectoHextoAscii.java:84: error: class, interface, or enum expected
             ^
    BintoDectoHextoAscii.java:87: error: class, interface, or enum expected
             String hexString = Integer.toHexString(i);
             ^
    BintoDectoHextoAscii.java:88: error: class, interface, or enum expected
             System.out.println("Hexa decimal: " + hexString);
             ^
    BintoDectoHextoAscii.java:90: error: class, interface, or enum expected
          return num.tolong();
          ^
    BintoDectoHextoAscii.java:91: error: class, interface, or enum expected
       ^
    BintoDectoHextoAscii.java:124: error: class, interface, or enum expected
          StringBuffer hex = new StringBuffer();
          ^
    BintoDectoHextoAscii.java:125: error: class, interface, or enum expected
          for (int i = 0; i < chars.length; i++)
          ^
    BintoDectoHextoAscii.java:125: error: class, interface, or enum expected
          for (int i = 0; i < chars.length; i++)
                          ^
    BintoDectoHextoAscii.java:125: error: class, interface, or enum expected
          for (int i = 0; i < chars.length; i++)
                                            ^
    BintoDectoHextoAscii.java:128: error: class, interface, or enum expected
          ^
    BintoDectoHextoAscii.java:130: error: class, interface, or enum expected
       ^
    BintoDectoHextoAscii.java:135: error: class, interface, or enum expected
          for (int i = 0; i < hexValue.length(); i += 2)
          ^
    BintoDectoHextoAscii.java:135: error: class, interface, or enum expected
          for (int i = 0; i < hexValue.length(); i += 2)
                          ^
    BintoDectoHextoAscii.java:135: error: class, interface, or enum expected
          for (int i = 0; i < hexValue.length(); i += 2)
                                                 ^
    BintoDectoHextoAscii.java:138: error: class, interface, or enum expected
             output.append((char) Integer.parseInt(str, 16));
             ^
    BintoDectoHextoAscii.java:139: error: class, interface, or enum expected
          ^
    BintoDectoHextoAscii.java:141: error: class, interface, or enum expected
       ^
    BintoDectoHextoAscii.java:144: error: class, interface, or enum expected
       public static String binaryToDecimal(String binary)
                     ^
    BintoDectoHextoAscii.java:150: error: class, interface, or enum expected
            int powersIndex = 0; // keep track of the index
            ^
    BintoDectoHextoAscii.java:151: error: class, interface, or enum expected
            int decimal = 0; // will contain decimals
            ^
    BintoDectoHextoAscii.java:152: error: class, interface, or enum expected
            boolean isCorrect = true; // flag if incorrect input
            ^
    BintoDectoHextoAscii.java:155: error: class, interface, or enum expected
            for(int i = 0; i < powers.length; i++)
            ^
    BintoDectoHextoAscii.java:155: error: class, interface, or enum expected
            for(int i = 0; i < powers.length; i++)
                           ^
    BintoDectoHextoAscii.java:155: error: class, interface, or enum expected
            for(int i = 0; i < powers.length; i++)
                                              ^
    BintoDectoHextoAscii.java:159: error: class, interface, or enum expected
            for(int i = binary.length() - 1; i >= 0; i--)
            ^
    BintoDectoHextoAscii.java:159: error: class, interface, or enum expected
            for(int i = binary.length() - 1; i >= 0; i--)
                                             ^
    BintoDectoHextoAscii.java:159: error: class, interface, or enum expected
            for(int i = binary.length() - 1; i >= 0; i--)
                                                     ^
    BintoDectoHextoAscii.java:166: error: class, interface, or enum expected
                else if(binary.charAt(i) != '0' & binary.charAt(i) != '1')
                ^
    BintoDectoHextoAscii.java:169: error: class, interface, or enum expected
                    break; // break from loop due to wrong input
                    ^
    BintoDectoHextoAscii.java:170: error: class, interface, or enum expected
                } // end else if
                ^
    BintoDectoHextoAscii.java:174: error: class, interface, or enum expected
            } // end for
            ^
    BintoDectoHextoAscii.java:180: error: class, interface, or enum expected
            else // print incorrect input message
            ^
    BintoDectoHextoAscii.java:185: error: class, interface, or enum expected
            return decimal.toint();
            ^
    BintoDectoHextoAscii.java:186: error: class, interface, or enum expected
       } // end function
       ^
    41 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.

    so can anyone help me determine why I get the following 41 errrors saying: class, interface, or enum expected as well as any other errors that may show up afterwards because I'm stumped.
    Yes - YOU CAN!
    My code is as follows and I hope you don't mind the commented lines of unused code because I'm not sure where I want things and what I want at the moment:
    Excellent! Commenting out code is EXACTLY how you troubleshoot problems like yours.
    Comment out sections of code until the problem goes away. Then start adding back ONE SECTION of code at a time until the problem occurs. When it does you have just FOUND the problem.
    If you do that you wind up with code that looks like this:
    import java.util.Scanner;
    import java.io.*;
    import java.lang.*;
    public class BintoDectoHextoAscii  {
          public static void main(String[] args)throws IOException      {
             Scanner input = new Scanner(System.in);
             System.out.println("Enter a binary number: ");
             String binary = input.nextLine(); // store input from user
                  public static String BinaryToHexadecimal(String hex)     {     } // end function        
    Notice ANYTHING UNUSUAL?
    You have a complete CLASS definition followed by a method definition.
    Methods have to be INSIDE the class - you can NOT define methods on their own.
    Write modular code.
    Write EMPTY methods - just the method signature and maybe a RETURN NULL if you need to return something.
    Then add calls to those empty methods.
    When everything compiles and runs find you can start adding code to the methods ONE METHOD AT A TIME.
    Test compile and run after you add the code for each method.

  • Help with query to return results from group within table?

    Hi
    Im a total noob, so please be gentle....!
    I am looking at a table that has a WORD column and a WORD_TYPE_ID column.
    Words can have the same type_id.
    What I am trying to do is write a query that will return the longest word for each word_type_id.
    I have been trying for hours to get this and all I seem to get is either error messages or I return the longest word in the whole WORD column.
    The furthest I can get before things break down is.....
    select word
    from table
    where
    length(word) =
    select
    max(length(word))
    from table
    Any help on this or if I could be pointed in the right direction it would be greatly appreciated.
    Thanks

    Hi,
    Welcome to the forum!
    Here's one way:
    SELECT    word_type_id
    ,       MIN (word) KEEP (DENSE_RANK LAST ORDDER BY LENGTH (word))     AS longest_word
    FROM       table_x
    GROUP BY  word_type_id;If there happens to be a tie within some word_type_id (that is, 2 or more words have exactly the same length, which is the longest in that group) the expression above will return the first one, in alphabetic order. (That's what MIN means here.)
    Edited by: Frank Kulash on Aug 11, 2009 1:56 PM
    You almost had it.
    As you noticed, you were getting the longest row in the whole table. That's because your sub-query was looking at the whole table.
    If you correlate the sub-query to the row in the main table, as shown below, you can get the longest word in each group:
    select  word
    from     table     m                              -- m for main
    where      length (word) = (
                                select  max (length(word))
                   from     table
                   where     word_type_id  = m.word_type_id     -- New
                   );

  • Can some one help me with diagnostic test result " apple mobile device driver not found"?

    I bought an iPhone 4gs 32gb from Singapore. iso 4. I'm living in Chennai, India. To connect it to my computer (windows XP,), I have downloaded iTunes 10.6.1.7. Unfortunately iTunes is not recognizing my iPhone.  I had tried to troubleshoot it by reinstalling iTunes (2 times). I have restarted the apple mobile device from control panel. I try connecting my iphone in another usb port. but no use. I don't know what am I missing?.  iTunes opens on my computer. but doesn't recognize my device. when I click on help. it says an "unknown error has occurred. your computer is not connected to internet. please check your internet connection and try again later". I don't know what to do? could you please help me? thank you so much for your help and time.
    when I update the usb driver (C:\Program Files\Common Files\Apple\Mobile Device Support\Drivers.Double-click the usbaapl file.) I followed the procedure from this site. http://support.apple.com/kb/TS1538 when I finished, it says "the specified location does not contain information about your software"
    I did the apple's diagnostics test on my computer. I'm pasting the result for your info.
    Microsoft Windows XP Professional Service Pack 3 (Build 2600)
    System manufacturer System Product Name
    iTunes 10.6.3.25
    QuickTime not available
    FairPlay 1.14.43
    Apple Application Support 2.1.9
    iPod Updater Library 10.0d2
    CD Driver 2.2.0.1
    CD Driver DLL 2.1.1.1
    Apple Mobile Device 5.2.0.6
    Apple Mobile Device Driver not found.
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0013AC2C08548378
    Current user is an administrator.
    The current local date and time is 2012-06-28 15:23:45.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    Intel(R) G41 Express Chipset
    **** External Plug-ins Information ****
    No external plug-ins installed.
    **** Network Connectivity Tests ****
    Network Adapter Information
    Adapter Name:        {D85300A1-330D-41ED-AC5A-EC032B22FBF0}
    Description:            Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller - Packet Scheduler Miniport
    IP Address:             192.168.1.3
    Subnet Mask:          255.255.255.0
    Default Gateway:    192.168.1.1
    DHCP Enabled:      Yes
    DHCP Server:         192.168.1.1
    Lease Obtained:     Thu Jun 28 15:17:19 2012
    Lease Expires:       Fri Jun 29 03:17:19 2012
    DNS Servers:         192.168.1.1
    Active Connection: LAN Connection
    Connected:             Yes
    Online:                    Yes
    Using Modem:        No
    Using LAN:             Yes
    Using Proxy:           No
    Firewall Information
    Windows Firewall is on.
    iTunes is enabled in Windows Firewall.
    Connection attempt to Apple web site was unsuccessful.
    The network connection timed out.
    Basic connection to the store failed.
    The network connection timed out.
    Connection attempt to Gracenote server was successful.
    The network connection timed out.
    iTunes has never successfully accessed the iTunes Store.
    **** CD/DVD Drive Tests ****
    No drivers in LowerFilters.
    UpperFilters: GEARAspiWDM (2.2.0.1),
    G: Optiarc DVD RW AD-7220A, Rev 1.01
    Drive is empty.
    **** Device Connectivity Tests ****
    iPodService 10.6.3.25 is currently running.
    iTunesHelper 10.6.3.25 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    Universal Serial Bus Controllers:
    Intel(R) N10/ICH7 Family USB Universal Host Controller - 27C8.  Device is working properly.
    Intel(R) N10/ICH7 Family USB Universal Host Controller - 27C9.  Device is working properly.
    Intel(R) N10/ICH7 Family USB Universal Host Controller - 27CA.  Device is working properly.
    Intel(R) N10/ICH7 Family USB Universal Host Controller - 27CB.  Device is working properly.
    Intel(R) N10/ICH7 Family USB2 Enhanced Host Controller - 27CC.  Device is working properly.
    No FireWire (IEEE 1394) Host Controller found.
    **** Device Sync Tests ****
    No iPod, iPhone, or iPad found.

    I have the same problem. I think that someone tried my iphone before me because when I want to reset it, I'm invited to enter a password that I didn't set. Also, when I go the Map application, the iphone indicate that I'm locateded in China while I'm in Tunisia. Now, I can't connect to my iphone to itunes, and I can't reset it because it ask me to enter a password that I didn't set.
    This is my post:
    https://discussions.apple.com/thread/4063223
    Please, we need your help.

  • Help!  Search with no results

    The problem I'm having is that users are in different domains in the company I'm working in. If the searched user is in the same domain (e.g. DC=B, DC=A) of the administrator, it returns exact one record. However, if the user is under the sub-domain (i.e. DC=C, DC=B, DC=A), and I've set the search control to scope to sub-tree, the searching returns no records. Does anybody know how to solve this?
    Here is the snippet of my code:
      public String getDN(String userid) {
        String dn = "CN=admin,OU=Sharing Account,DC=ABC,Dc=com,DC=tw";
        String ldap_url = "ldap://f1soa02.cmo.com.tw:389";
        String password = "xxxx";
        Hashtable env = new Hashtable();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        env.put("java.naming.ldap.version", "3");
        env.put(Context.PROVIDER_URL, ldap_url);
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL, dn);
        env.put(Context.SECURITY_CREDENTIALS, password);
        DirContext ctx;
        String[] attrs = { "cn" };
        try {
          ctx = new InitialDirContext(env);
          SearchControls ctls = new SearchControls();
          ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
          ctls.setReturningAttributes(attrs);
          String filter = "(CN=" + userid + ")";
          // Search for objects with these matching attributes
          NamingEnumeration results = ctx.search("DC=cmo,Dc=com,DC=tw",filter,ctls);
          if ( results != null && results.hasMoreElements()) {
            SearchResult sr = (SearchResult)results.nextElement();
            dn = sr.getName();
          } else dn = null;
          ctx.close();
        } catch (AuthenticationException e){
          System.out.println(" getDN() Authentication Exception: " + e);
          return null;
        } catch (NamingException e) {
          System.out.println(" getDN() Naming Exception: " + e);
          return null;
        return dn;
      public static void main(String[] args) {
        UserAuthenticate ua = new UserAuthenticate();
        //boolean valid = ua.ldapAuthenticate("joy_huang", "babula52395239");
        boolean valid = ua.ldapAuthenticate("karen_fang", "karenf12");
        if (valid)
          System.out.println("Valid User");
        else
          System.out.println("Invalid User");
      }

    1). Can't get connected to Global Catalog port 3268. Does this mean that I have to get the permission from the administrator to connect to that port?
    No.
    Not all domain controllers host a global catalog. If a DC is not listening on port 3268 (or 3269 over SSL) then it is not hosting a GC.
    You can find both GC's & DC's through DNS. For example if using the DnsContextFactory, you can find a GC using the DNS Query result:String strService = "_gc._tcp";
    String strQuery[]={"SRV"};
    Attributes dnsQueryresult = dnsContext.getAttributes(strService,strQuery);For completeness, the query should also take into consideration sites (IP subnets), so you return a DC or GC closest to your server. You may want to look at the Win32 API DSGetDCName and provide similar functionality in your app.
    (Refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/dsgetdcname.asp)
    If you are able to connect to port 3268 (the GC) but do not return any results, then the ACL's may not give you permission to view the objects or their attributes.
    2). How to find out the returning attributes? Our server seems do not have the attributes listed in the sample...
    IIRC, the attributes I have listed are included in the Partial Attribute Set (PAS), which is the term used to describe which attributes are included in the GC.
    Details on the default attributes contained in the GC can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/adschema/attributes_global.asp
    Note that the GC abides by the exact same security controls as a DC, so if your user does not have access to the objects and their attributes in a domain, it won't have access to them in a GC.
    If you want to return all available attributes, just specify null for the returned attributes.SearchControls searchCtls = new SearchControls();
    String returnedAttributes[] = null;
    searchCtls.setReturningAttributes(returnedAttributes);
    ...and to list out a returned attribute's name, use the getID method.
    3). Can't have empty base DN when searching? Why? Is that system limitation?
    AFAIHI (As far as I have interpreted) the LDAP RFC states that an empty BaseDN is used when querying RootDSE. It is does not state what the behaviour should be otherwise. (In RFC 2251 the search base is defined as a LDAP Distinguished Name, which in turn is defined as a LDAP String, which is finally defined as an Octet String. Doesn't specify what should happen with a null value)
    From an Active Directiory perspective, for an LDAP search, you must supply a valid base distinguished name. For a Global Catalog search, the base distinguished name can be any value, including the value "NULL" (" ").
    If you use a NULL base distinguished name with a scope of one level or subtree and specify port 389 (the default LDAP port), the search fails, whereas if you use a NULL base distinguished name with a scope of object level and specify port 389, it will return the RootDSE.

  • Help with intricate search and results display

    Hi All,
    I am looking for help with a problem I have, my knowledge on Numbers is limited, I have learnt a lot by trial and error but I do not know where to start on this problem.
    What I am trying to do is display result from sheet 1 onto sheet 2 when I enter the letters of the REFERENCE into cell C3. Below is an example of the result I am tring to achieve -
    SHEET 2
    Reference
    AB
    Reference
    SZone
    Parts
    LZone
    Parts
    AB10
    3
    75
    2
    100
    AB10
    3
    75
    2
    100
    AB10
    3
    75
    2
    100
    AB10
    3
    75
    2
    100
    AB11
    3
    75
    2
    100
    AB11
    3
    75
    2
    100
    AB11
    3
    75
    2
    100
    AB11
    3
    75
    2
    100
    AB12
    3
    75
    2
    100
    AB12
    3
    75
    2
    100
    AB13
    3
    75
    3
    75
    AB13
    3
    75
    3
    75
    AB14
    3
    75
    3
    75
    AB14
    3
    75
    3
    75
    AB15
    3
    75
    1
    200
    AB15
    3
    75
    1
    200
    AB16
    3
    75
    3
    75
    AB16
    3
    75
    3
    75
    AB21
    3
    75
    3
    75
    AB21
    3
    75
    3
    75
    AB22
    3
    75
    3
    75
    I have searched for AB by entering it in cell B3 on Sheet 2, an auotmatic search has been carried out on Sheet 1 and all the columns have been brought into sheet 2 with the corresponding data and placed under the COLUMN HEADERS. I have over 4000 lines on Sheet 1, although the most result that will ever be pulled through will be 150.
    When the data is pulled in I will need to do other calculation in the COLUMNS F, G and H so the data need to only be mapped to COLUMNS A to E.
    Also I want to be able to use this spreadsheet on my iPad.
    Has anybody got an idea/solution that will help.
    Thanks in advance.
    Ian

    Ian,
    We've had a recent report of troubles with large tables in the iOS version of Numbers, so you may want to consider ways to accomplish your goals without the full 4000-row set of data.
    I re-read the problem statement in your original post and see that I should have known that you were needing a solution for both platforms. But, I'm still not clear on what part you have figured out and what part you still need help with. We often refer to your second table as a "Breakout Table". There are different ways to program it. My favorite is to add a column to the main table that identifies rows that meet the transfer criteria and assigns them a serial number to help determine where they should go in the second table.
    Here's an example:
    In the new column on the right edge of the table T1, the expression is:
    =IF(ISERROR(FIND(T2 :: $A$1, A)), "", COUNT($F$1:F1))
    Note that the first cell in the Aux column is seeded with a zero.
    The expression in the body cells of the second table, T2, is:
    =INDEX(T1, MATCH(ROW()-1, T1 :: $F, 0), COLUMN())
    Note that the search term is to be entered into Cell A1 of table T2.
    Does this give you a start?
    Jerry

  • [regex help]Find EXACT characters in a String.

    Ok, i got this so far ...
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class Testing2 {
        public static void main(String[] args) {
            Pattern p = Pattern.compile("[wati]");
            String text = "water";
            Matcher m = p.matcher(text);
            if (m.find()) {
                System.out.print("Found !");
    }With that code i got a match, but i ONLY want to find a match if the String matches the EXACTS characters in the Pattern ...
    in this case i got, 'w' 'a' 't' 'i', 'w' 'a' 't', are in water, but 'i' NOT, so i don't want to have a match !
    i don't know how to acomplish this :(
    hope you can help me, thanks in advance :D

    Username7260 wrote:
    Ok, i got this so far ...
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class Testing2 {
    public static void main(String[] args) {
    Pattern p = Pattern.compile("[wati]");
    String text = "water";
    Matcher m = p.matcher(text);
    if (m.find()) {
    System.out.print("Found !");
    }With that code i got a match, but i ONLY want to find a match if the String matches the EXACTS characters in the Pattern ...
    in this case i got, 'w' 'a' 't' 'i', 'w' 'a' 't', are in water, but 'i' NOT, so i don't want to have a match !
    i don't know how to acomplish this :(AFAIK there's no syntax in regular expressions to accomplish this. Try turning your string into a character array, sorting it, and then do a simple comparison.

  • Connect by - sql help : getting error ORA-01489: result of string concatena

    here is an sql query and I am trying to cook a decode but since there are many columns invloved when I am trying to run this I am getting the following error:
    ORA-01489: result of string concatenation is too long
    Any kind of help is appreciated, I need to get this going otherwise I am dead :(
    Regards
    Rahul
    SQL:
    select sys_connect_by_path(c.decode_prep,'-') decode_prep
    from (select 'DECODE(BIAPPS_11.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||','||'RAHULKALRA.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||',''1'',''0'')' decode_prep, rownum curr, rownum -1 prev
    from (select rownum rn
    from dual connect by rownum <=
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    from dual)) a, (select ','||'ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM'||',' all_cols from dual) b) c
    start with curr = 1
    connect by prior curr = prev
    order by length(sys_connect_by_path(c.decode_prep,'-')) desc
    same as above sql only difference is here I am pulling the first record from the result set which above query returns :
    select ltrim(replace(decode_prep,'-','||'),'||') decode_prep
    from (select sys_connect_by_path(c.decode_prep,'-') decode_prep
    from (select 'DECODE(BIAPPS_11.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||','||'RAHULKALRA.'||substr(b.all_cols,instr(b.all_cols,',',1,a.rn)+1,instr(b.all_cols,',',1,a.rn+1)-instr(b.all_cols,',',1,a.rn)-1)||',''1'',''0'')' decode_prep, rownum curr, rownum -1 prev
    from (select rownum rn
    from dual connect by rownum <=
    (select (length('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM')
    - length(replace('ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM',',')))+1 total_cols
    from dual)) a, (select ','||'ROW_WID,COST_CENTER_NUM,COST_CENTER_NAME,COST_CENTER_DESC,CONTROL_AREA_NUM,CONTROL_AREA_NAME,CATEGORY_CODE,CATEGORY_NAME,CATEGORY_DESC,MANAGER_NAME,CURRENCY_CODE,CURRENCY_NAME,LANGUAGE_CODE,LANGUAGE_NAME,ST_ADDRESS1,ST_ADDRESS2,POST_OFFICE_BOX,CITY_NAME,STATE_CODE,STATE_NAME,REGION_CODE,REGION_NAME,COUNTRY_CODE,COUNTRY_NAME,POSTAL_CODE,PHONE_NUM,FAX_NUM,CSCN_HIER1_CODE,CSCN_HIER1_NAME,CSCN_HIER2_CODE,CSCN_HIER2_NAME,CSCN_HIER3_CODE,CSCN_HIER3_NAME,CSCN_HIER4_CODE,CSCN_HIER4_NAME,CSCN_HIER5_CODE,CSCN_HIER5_NAME,CSCN_HIER6_CODE,CSCN_HIER6_NAME,ACTIVE_FLG,CREATED_BY_WID,CHANGED_BY_WID,CREATED_ON_DT,CHANGED_ON_DT,AUX1_CHANGED_ON_DT,AUX2_CHANGED_ON_DT,AUX3_CHANGED_ON_DT,AUX4_CHANGED_ON_DT,SRC_EFF_FROM_DT,SRC_EFF_TO_DT,EFFECTIVE_FROM_DT,EFFECTIVE_TO_DT,DELETE_FLG,CURRENT_FLG,W_INSERT_DT,W_UPDATE_DT,DATASOURCE_NUM_ID,ETL_PROC_WID,INTEGRATION_ID,SET_ID,TENANT_ID,X_CUSTOM'||',' all_cols from dual) b) c
    start with curr = 1
    connect by prior curr = prev
    order by length(sys_connect_by_path(c.decode_prep,'-')) desc)
    where rownum = 1
    Edited by: Mac_Freak_Rahul on Nov 28, 2012 1:31 AM : in the first sql ')'
    removed after desc in the last line so now this query will run and throw an error.

    Clearly your error is because the string concatenation you are doing with sys_connect_by_path is exceeding the 4000 bytes permitted by SQL.
    In that case you need to concatenate your data into a CLOB datatype, for which you'll need a CLOB aggregation function...
    create or replace type clobagg_type as object
      text clob,
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number,
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number,
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number,
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number
    create or replace type body clobagg_type is
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number is
      begin
        sctx := clobagg_type(null) ;
        return ODCIConst.Success ;
      end;
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number is
      begin
        self.text := self.text || value ;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number is
      begin
        returnValue := self.text;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number is
      begin
        self.text := self.text || ctx2.text;
        return ODCIConst.Success;
      end;
    end;
    create or replace function clobagg(input clob) return clob
      deterministic
      parallel_enable
      aggregate using clobagg_type;
    SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
    ENAMES
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2    (select 'PFL' c1, 0 c2,110 c3 from dual union all
      3     select 'LHL', 0 ,111 from dual union all
      4     select 'PHL', 1, 111 from dual union all
      5     select 'CHL', 2, 111 from dual union all
      6     select 'DHL', 0, 112 from dual union all
      7     select 'VHL', 1, 112 from dual union all
      8     select 'CPHL', 0, 114 from dual union all
      9     select 'WDCL', 1, 114 from dual union all
    10     select 'AHL' ,2 ,114 from dual union all
    11     select 'NFDL', 3, 114 from dual)
    12  --
    13  -- end of test data
    14  --
    15  select trim(clobagg(c1||' ')) as c1, c3
    16  from (select * from t order by c3, c2)
    17  group by c3
    18* order by c3
    SQL> /
    C1                                     C3
    PFL                                   110
    LHL CHL PHL                           111
    DHL VHL                               112
    CPHL AHL NFDL WDCL                    114

  • [HELP] AGO function return wrong result

    Hi, i try to implement ago function in OBIEE, but the result is not as expected. Please help me to configure Time Dimension to get this work.
    My case:
    - I have a time dimension with this configuration:
    [http://i264.photobucket.com/albums/ii176/necrombi/NEO/1-1.png]
    Time Hierarchy: Total > Year > Quarter > Month > Day
    Year:
    Primary key: Calendar_year_cal_year_code
    Chronological key: Does not define
    Quarter:
    Primary key: Calendar_quarter_description
    Chronological key: Does not define
    Month:
    Primary key: Calendar_month_description
    Chronological key: Calendar_month_description
    Day:
    Primary key: Dimension_key
    Chronological key: Day_day_code
    My ago function: AGO(expression, mywh.D_qn_thoigianDim."month", 1)
    I do not understand why i get this wrong results:
    [http://i264.photobucket.com/albums/ii176/necrombi/NEO/2.png]
    Does anyone know how to solve this?
    Edited by: 864451 on Jun 8, 2011 5:11 AM

    Hi, thanks for your reply.
    I implemented Time dimension with your recommend, and have time dimension like this:
    Time Hierarchy: Total > Year > Quarter > Month > Day
    Year:
    Primary key: Calendar_year_start_date
    Chronological key: Calendar_year_start_date
    Quarter:
    Primary key: Calendar_quarter_start_date
    Chronological key: Calendar_quarter_start_date
    Month:
    Primary key: Calendar_month_start_date
    Chronological key: Calendar_month_start_date
    Day:
    Primary key: Day
    Chronological key: Dimension_key
    And Ago function works fine with month level: AGO(expression, mywh.D_qn_thoigianDim."month", n)
    But return sum result of 12 month with: AGO(expression, mywh.D_qn_thoigianDim."year", 1)
    In my case, i just use AGO(expression, mywh.D_qn_thoigianDim."month", 12) to get year ago value. But i still don't understand clearly about OBIEE Time Serries functions.
    Thanks,
    Dung Nguyen

  • Value help has more than 500 results

    Hi,
    We´re running CRM 2007 Version 6.0.
    I have integrated a field with a search help, that has more than 500 results. But in the search result popup only 500 results are shown. How can I provide access to the 500+ results to the enduser?
    I´m creating the search help via
    CREATE OBJECT rv_valuehelp_descriptor
        TYPE
          cl_bsp_wd_valuehelp_f4descr
        EXPORTING
          iv_help_id                  = 'search_help'   "search help name
          iv_help_id_kind             = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
          iv_input_mapping            = lt_inmap
          iv_output_mapping           = lt_outmap
          iv_trigger_submit           = abap_true.
    Thanks for help.
    Greetings,
    Sven

    Hi Sven Keller    ,
    u r using search help that u created in se11.Goto that search help there is a drop down(Dailog Type )
    in which 3 values r there.
    Select -
    A dailog depends on set of values or C dailog with value restriction ---as per ur need.
    see help for this field by pressing F1.
    regards,
    hem

  • BACKGROUND IN DREAMWEAVER_PLEASE HELP NEED EXACT FIT

    I am trying to put a background on my site but do not want
    the background to fill the entire page. I only would like it to fit
    about 400x500 of a section in the back of some text. The problem is
    when I load it in, it fills the whole page and not the exact size I
    want.
    someone please help

    What will happen to your exact fit when someone resizes that
    text in their
    browser?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "WebGuyDesign" <[email protected]> wrote in
    message
    news:em9dgp$dcn$[email protected]..
    >I am trying to put a background on my site but do not
    want the background
    >to
    > fill the entire page. I only would like it to fit about
    400x500 of a
    > section
    > in the back of some text. The problem is when I load it
    in, it fills the
    > whole
    > page and not the exact size I want.
    >
    > someone please help
    >

Maybe you are looking for

  • Underline Problem in template of a table in smartforms

    Hi friends,                I have a requirement wherein i need to draw two line one above text as shown below : Total Invoice Amount Amount Eligible for cash I have copied std smart form LB_BIL_INVOICE template INFO_ENDSUMMEN in table TABLEITEM has t

  • Sorting photos in album

    In PSE8 (Swedish) I have created an album containing 300 photos. Each filename starts with a year: 1941 xxxxxxx, 1946 xxxxxxx, 1947 xxxxxx and so on. I have scanned them during a couple of weeks - not in order. I now want to view them in the right or

  • Huge Delays in XCode Version 6.0.1 (6A317)

    I've been using XCode 6.0.1 for a while now on a large-ish project, and was wondering whether anyone else is experiencing these symptoms: a) Sometimes it gets to the point that the spinner comes up on EVERY keystroke, and I have to wait 10 second bef

  • MacBook Closed-Lid Operation Problems

    I currently have the new 24-inch Apple Cinema Dispaly connected to my MacBook. Whenever I have the lid closed for more than 15-20 minutes or so, the MacBook begins to get very hot and applications begin to run slow. Has anyone else experienced this a

  • Enable Selection field in datasource

    Hello All, I need to make a selection in InfoPackage for making Initialization of Datasource. When i checked in InfoPackage under data selection tab,i could nt able to see any selection Field i checked the datasource from which this IP is created and