Help needed (converting string to double)

keep getting an error someone give me a hint
public class q1d
    public static void main(String [] args)
        String whats;
        double x;
        x = (String)whats;
        System.out.println(+x);
}

Then study this tutorial
http://java.sun.com/docs/books/tutorial/
Specifically, this part
http://java.sun.com/docs/books/tutorial/java/data/index.html
You need some basic knowledge. These forums are not suitable for teaching Java. The tutorial is.

Similar Messages

  • Need to know the best practice for converting string to double

    I have a string and want to convert to double if it is a valid number, else want to keep as it is. There can be couple of ways doing it and I want to know which one is best if I have lots of strings, specially from performance point of view.
    1) Use Double.parseDouble(myString) and catching Number format exception to detect it is not a number. One of my colleague said it does not give good performance because of exception catching,
    2) Use of org.apache.commons.lang.math.NumberUtils.isNumber() and if it is true then only parse it - so don't rely on exception.
    I did some performance testing - putting it in a loop and trying out for 2 scenarios - one loop for proper numeric value string and another for non-numeric. What I found out was if strings are not proper then parseDouble() is taking long time (because of exception catching) and in that case using NumberUtils.isNumber() makes sense.
    Would like to hear expert views on this.
    Thanks
    Manisha

    If you need it as a double you must convert it to a double and catch the exception. This means that testing it first is a waste of time in the case when the test succeeds - did your colleague think of that?
    Catching the exception is possibly slower than the test. Whether this is significant depends on the relative timings of the test and catching the exception, and also on the expected error rate. If this is below about 40% I suggest your colleague is talking through his esteemed hat.
    And of course the best test by far is the conversion itself. Using any other test runs the risk of its rules being different from those applied by the conversion.
    In any case you are obliged to write the code that catches the exception. You're not obliged to write the pre-test code.
    My personal rule for efficiency is to minimize lines of code until hard evidence to the contrary proves that further improvement is required.

  • Convert String to double with two digits

    How can I format "String" type of numbers (eg. 199.0, or 199) to return a "double" type of nubmers like 199.00, or 199.00. It should have two digits.
    For example, the input is String of 199.0, how can I get "double" 199.00. Always format as two digits.
    Thanks for your help,

    Thanks for replying.
    Here is my code. For some reason, when convert the returned String back to double in main, it cut the "0".
    What's wrong with my code? How can I get that 4.60 in double type.
    Thanks again,
    ==================================================================================
    import java.text.*;
    import java.util.*;
    import java.sql.*;
    public class NumUtils
    // Convert Double to 99.99
    public static String format(String str)
    //double d = 4.6;
    double d = Double.parseDouble(str);
    NumberFormat formatter = new DecimalFormat("0.00");
    formatter.setMaximumFractionDigits(2);
    String s = formatter.format(d);
    return s;
    public static void main(String[] args)
    String myDouble = "4.6";
    String mynewdouble = format(myDouble);
    System.out.println(" --- formatDouble = " + mynewdouble);
    double my_d = Double.parseDouble(mynewdouble);
    System.out.println(" --- Double = " + my_d);

  • Help needed converting 2 Captivate projects...

    Hi,
    I have troubles with Captivate (another post on this forum) and was wondering whether someone would be willing to help in converting 2 captivate projects to .swf?
    I can provide a link to the files.
    Help wpuld be appreciated.

    Hi there
    I'll try to help.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Need help in converting string to numeric array

    I am trying to convert a string to a numeric array ... the first # in the string gets cut off, the last three seem to come through. 
    This may be fairly simple, but I really haven't worked with the string functions all that much.
    Help would be appreciated.
    Thanks,
    Attachments:
    String to Array Example.vi ‏10 KB

    Steve Chandler wrote:
    If you remove the first and last byte from the string using string subset then the read spreadsheet string would probably have worked.
    Yup.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    String to Array ExampleMOD2.vi ‏10 KB

  • Needed help regarding converting  string to java.sql.Date format

    I have a a function which returns a calendar object. The date must be inserted to Oracle DB using java.sql.Date format.
    So i have converted the Calendar object to java.sql.Date format using the following code
    java.sql.Date publicationDate = new java.sql.Date(book.getPublicationDate().getTime().getTime());But while getting inserted into the DB it was in mm/dd/yyyy format whereas i wanted dd/mm/yyyy format
    Can any body please help out how to store the date in dd/mm/yyyy format ?

    Can u please explain this a bit
    This is my code
    public int addBook(List<Book> BookList) throws SQLException, ParseException{
              System.out.println("Hi there");
              Book book = new Book();
              BookDB bookDb = new BookDB();
              //listLength =      BookList.length;
              String bookId = null;
                   try{
                        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                        con  = DriverManager.getConnection("jdbc:oracle:thin:@10.123.79.195:1521:findb01","e115314", "e115314");
                        addBook = con.prepareStatement("insert into ABC_Book values(?,?,?,?,?,?,?)");
                        Iterator<Book> iterator = BookList.iterator();
                        while(iterator.hasNext()){
                             book = (Book)iterator.next();
                             System.out.println(book.getBookId());
                             addBook.setString(1,book.getBookId());
                             addBook.setString(2,book.getTitle());
                             addBook.setString(3,book.getAuthor());
                             addBook.setString(4,book.getPublisher());
                             System.out.println(book.getPublicationDate());
                             System.out.println("Before Date");
                             System.out.println("book.getPublicationDate().getTime()"+book.getPublicationDate().getTime());
                             java.sql.Date publicationDate = new java.sql.Date(book.getPublicationDate().getTime().getTime());
                             SimpleDateFormat formatter = new SimpleDateFormat("dd/mm/yyyy");
                             dateString = formatter.format(publicationDate);
                             System.out.println("Today is"+dateString);
                             java.sql.Date date = (java.sql.Date)formatter.parse(dateString);
                             System.out.println("date"+date);
                             //java.sql.Date publicationDate = (Date)book.getPublicationDate().getTime();
                             //System.out.println("Value of date is"+publicationDate);
                             System.out.println("After Date");
                             addBook.setDate(5,publicationDate);
                             addBook.setString(6,book.getCountry());
                             addBook.setString(7,book.getLanguage());
                             rs = addBook.executeQuery();
                             //con.commit();
                             rowCount = rowCount + rs.getRow();
                        return rowCount;
                   catch(SQLException se){
                        se.printStackTrace();
                   finally{
                        con.close();
                        System.out.println("After adding ");
              return 0;
         }

  • Converting String into double

    Hi,
    I want to convert 30.10 String Value into double.
    I need to get the value as 30.10 as double only.
    I tried but I am getting 30.1 only.
    Please suggest me.
    Thanks in advance..

    user13797408 wrote:
    Hi,
    I want to convert 30.10 String Value into double.
    I need to get the value as 30.10 as double only.
    I tried but I am getting 30.1 only.
    Please suggest me.
    Thanks in advance..Don't do it. A short read of the documentation will tell you why (and why several such methods in many similar Java classes have been deprecated).
    Simply said: 30.1 has no exact representation as a double; and it's quite possible that "30.10" will yield a different value from "30.1" (but hopefully not).
    As far as printing out is concerned, you should check out NumberFormat or String.format(...). You are trying to convert a number stored in binary, that you already converted from a decimal numer (30.1) back to decimal. Sound like overkill to you?
    PS: Have a look at BigDecimal. I think it may do what you want.
    Winston

  • Help needed Converting MSSQL function to PL/SQL

    Hello,
    I have the following MSSQL code which I need to migrate to Oracle 10g. The problem I am having is the MSSQL code creates a temp table as the return type and I am unsure how to get the same functionality in PL/SQL.
    MSSQL CODE_
    CREATE FUNCTION [dbo].[QueryCurrentWhy]
    @ColumnID INT,
    @GroupID INT,
    @Parents VARCHAR(8000)
    RETURNS @R TABLE(ID1 int IDENTITY (1, 1) NOT NULL, ID2 int, ColID int, [Name] VARCHAR(255), Tlevel int, ParentID int, Processed BIT)
    AS
    BEGIN
    RETURN
    END
    The code I have currently written in PL/SQL is below. I firstly create a global temp table and then a sequence and trigger for it. I then create the Function in the hope I can specify the temp table as the return type. Problem is I get the error "PLS-00201: identifier 'TEMPR' must be declared". Im guessing this is because the temp table is declared outside the function declaration?
    ORACLE CODE_
    CREATE GLOBAL TEMPORARY TABLE tempR
    ID1 INT NOT NULL,
    ID2 INT,
    ColID INT,
    Name VARCHAR2(255),
    Tlevel INT,
    ParentID INT,
    Processed CHAR(1)
    CREATE SEQUENCE gCounter
         START WITH 1
         INCREMENT BY 1
    CREATE OR REPLACE TRIGGER gTrigger
    BEFORE INSERT ON tempR
    FOR EACH ROW
    DECLARE TEMP_NO INT;
    BEGIN
         SELECT gCounter.NEXTVAL INTO TEMP_NO FROM DUAL;
    :NEW.ID1 := TEMP_NO;
    END;
    CREATE OR REPLACE FUNCTION TSORADB.QueryCurrentWhy
    aColumnID INT,
    aGroupID INT,
    aParents VARCHAR2(8000)
    RETURN tempR
    AS
    BEGIN
    RETURN;
    EXCEPTION when NO_DATA_FOUND then null;
    END;
    Basically is it possible for me to declare the temp table in the return statement, if not then what is the best way to go about this?
    Thanks in advance
    Toby
    Edited by: redeye on Jul 27, 2009 3:26 PM

    Unfortunately I didnt write the original function or stored procedure and the person who did is no longer with the company, so apologies for any confusion with what I am saying.
    Maybe it'll be more helpful if i paste the contents of the function?
    CREATE OR REPLACE FUNCTION TSORADB.QueryCurrentWhy
    aColumnID INT,
    aGroupID INT,
    aParents VARCHAR2(8000)
    RETURN tempR
    AS
    --BEGIN
    aPKColTypeID INT;
    aFKDColTypeID INT;
    aFKDSColTypeID INT;
    aFKIColTypeID INT;
    aColType VARCHAR2(30);
    aTableID INT;
    aName VARCHAR2(255);
    aNameWhyMost VARCHAR2(255);
    aNameWhyMost2 VARCHAR2(255);
    aLongNameStr VARCHAR2(1000);
    aConnectStr VARCHAR2(1000);
    aColID INT;
    aColIDWhyMost INT;
    aColIDWhyMost2 INT;
    aColIDWhyMostLast INT;
    aCount INT;
    aID1 INT;
    aID2 INT;
    aPreID2 INT;
    aMaxID2 INT;
    aCurrentID2 INT;
    aTLevel INT;
    aTLevel2 INT;
    aTlevelLast INT;
    aNewLevel INT;
    aMaxTLevel INT;
    aMaxTLevel2 INT;
    aParentID INT;
    aParentID2 INT;
    aNewParentID INT;
    aProcessed number (1);
    --aCurVar1 CURSOR;
    aParent INT; aStrEntityIDSet varchar(2000); aStrPipeSepValsInput varchar(2000); aEndPointInput int; aSeperatorIndex int;
    aNumTempDoc INTEGER := 0;
    --aColumnID INT DEFAULT(0);
    --aGroupID INT DEFAULT(0);
    --aParents VARCHAR(8000) DEFAULT('');
    BEGIN
    SELECT ColumnTypeID INTO aPKColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'PK';
    SELECT ColumnTypeID INTO aFKDColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKD';
    SELECT ColumnTypeID INTO aFKDSColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKDS';
    SELECT ColumnTypeID INTO aFKIColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKI';
    IF (aGroupID is null)
    THEN
         aGroupID := -1;
    END IF;
    --Tokenize the parent array and get back a set of values.
    IF(aParents is not null)
    THEN
    BEGIN
         aStrEntityIDSet := aParents;
         aStrPipeSepValsInput := '|' + ltrim(rtrim(aStrEntityIDSet)) + '|';
         --print aStrPipeSepValsInput
         aEndPointInput := INSTR(aStrPipeSepValsInput, '|');
         aStrPipeSepValsInput := INSTR (aStrPipeSepValsInput, LENGTH (aStrPipeSepValsInput) - aEndPointInput); -- take out the '|' pattern
         WHILE (LENGTH (aStrPipeSepValsInput) > 0)
         LOOP
         BEGIN
              aEndPointInput := INSTR(aStrPipeSepValsInput, '|'); -- get the next '|' pattern
              aParent := SUBSTR(aStrPipeSepValsInput, 1, aEndPointInput - 1);
              --PRINT 'aParent is ' + CONVERT (NVARCHAR, aParent)
              aStrPipeSepValsInput := INSTR (aStrPipeSepValsInput, LENGTH (aStrPipeSepValsInput) - aEndPointInput);
              INSERT INTO TmpParent (ColID) VALUES (aParent);
         END;
         END LOOP;
    END;
    END IF;
    SELECT hkc.TableID, hkc.Name, hkct.ColumnTypeName
    INTO aTableID, aName, aColType
    FROM TSORADB.HKColumns hkc
    INNER JOIN TSORADB.HKColumnType hkct on hkc.ColTypeID = hkct.ColumnTypeID
    WHERE hkc.ColumnID = aColumnID;
    IF aColType in ('PK','PKD')
    THEN
         -- Generate Unique Path Table Start
         SELECT
         CASE WHEN FKIs3.Name is null
         THEN PKs3.Name
         ELSE FKIs3.Name
         END Name
         INTO aName
         FROM TSORADB.HKColumns PKs3
         INNER JOIN
         SELECT hkc3.TableID FROM TSORADB.HKColumns hkc3
         WHERE hkc3.ColumnID = aColumnID
         ) HKC3 ON PKs3.TableID = HKC3.TableID
         LEFT OUTER JOIN
         SELECT TableID, Name
         FROM TSORADB.HKColumns
         WHERE ColTypeID = aFKIColTypeID
         ) FKIs3 ON PKs3.TableID = FKIs3.TableID
         WHERE PKs3.ColTypeID = aPKColTypeID AND ((aGroupID=-1 AND PKs3.GroupID IS NULL) OR PKs3.GroupID=aGroupID);     
    END IF;
    -- Insert query column itself
    aTlevel := 0;
    aParentID := 0;
    aID2 := 1;
    IF (aColType = 'ATT')
    THEN
    BEGIN
    INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
    SELECT distinct aID2, TopHKCs.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 1 as Processed
         FROM TSORADB.HKColumns TopHKCs
    WHERE TopHKCs.ColumnID = aColumnID;
    aID2 := aID2 + 1;
    aTlevel := 1;
         aParentID := aColumnID;
         -- Get the non-compound name for the parent
         SELECT
         CASE WHEN FKIs3.Name is null
         THEN PKs3.Name
         ELSE FKIs3.Name
         END Name
         INTO aName
         FROM TSORADB.HKColumns PKs3
         INNER JOIN
         SELECT hkc3.TableID FROM TSORADB.HKColumns hkc3
         WHERE hkc3.ColumnID = (SELECT ColumnID FROM TSORADB.HKColumns WHERE TableID = aTableID AND ColTypeID = aPKColTypeID)
         ) HKC3 ON PKs3.TableID = HKC3.TableID
         LEFT OUTER JOIN
         SELECT TableID, Name
         FROM TSORADB.HKColumns
         WHERE ColTypeID = aFKIColTypeID
         ) FKIs3 ON PKs3.TableID = FKIs3.TableID
         WHERE PKs3.ColTypeID = aPKColTypeID AND ((aGroupID=-1 AND PKs3.GroupID IS NULL) OR PKs3.GroupID=aGroupID);
         INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
    SELECT aID2, ColumnID, aName, aTlevel, aParentID, 0
    FROM TSORADB.HKColumns
         WHERE TableID = aTableID
         AND ColTypeID = aPKColTypeID;
    aID2 := aID2 + 1;
    END;
    ELSE
    BEGIN
         INSERT INTO TmpR1(ColID, Name, Tlevel, ParentID, Processed)
         SELECT nonCompoundHks.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 0 as Processed
         FROM TSORADB.HKColumns nonCompoundHks
         WHERE nonCompoundHks.Name = aName --lower(nonCompoundHks.Name) = lower(aName)
         AND ((aGroupID=-1 AND nonCompoundHks.GroupID IS NULL) OR nonCompoundHks.GroupID=aGroupID)
         AND nonCompoundHks.ColTypeID = aPKColTypeID
         AND EXISTS
              select ColumnID
              From TSORADB.HKColumns hkc4
              WHERE hkc4.TableID = nonCompoundHks.TableID
              AND (hkc4.ColTypeID = aFKDColTypeID OR hkc4.ColTypeID = aFKDSColTypeID)
         AND NOT EXISTS
              select ColumnID
              From TSORADB.HKColumns hkc5
              WHERE hkc5.TableID = nonCompoundHks.TableID
              AND hkc5.ColTypeID = aFKIColTypeID
              AND ((aGroupID=-1 AND hkc5.GroupID IS NULL) OR hkc5.GroupID=aGroupID)
         INSERT INTO TmpR1(ColID, Name, Tlevel, ParentID, Processed)
         SELECT compoundPk.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 0 as Processed
         FROM TSORADB.HKColumns compoundPk
         INNER JOIN TSORADB.HKColumns compoundHkc on compoundHkc.TableID = compoundPk.TableID AND compoundHkc.ColTypeID = aFKIColTypeID
    INNER JOIN (
              SELECT hkc.ColumnID
              FROM TSORADB.HKColumns hkc
              WHERE hkc.ColTypeID = aPKColTypeID
              AND hkc.Name = aName --lower(hkc.Name) = lower(aName)
              AND ((aGroupID=-1 AND hkc.GroupID IS NULL) OR hkc.GroupID=aGroupID)
              AND NOT EXISTS
              select ColumnID
              From TSORADB.HKColumns hkc2
              WHERE hkc2.TableID = hkc.TableID
              AND (hkc2.ColTypeID = aFKDColTypeID OR hkc2.ColTypeID = aFKDSColTypeID)
              AND ((aGroupID=-1 AND hkc2.GroupID IS NULL) OR hkc2.GroupID=aGroupID)
    ) Indys ON Indys.ColumnID = compoundHkc.ForeignKey
         WHERE compoundPk.ColTypeID = aPKColTypeID;
         INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
         SELECT ID2, ColID, Name, Tlevel, ParentID, Processed FROM TmpR1;
         FETCH FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed
         WHILE aafetch_status = 0
         BEGIN     
              IF(aParents is null or EXISTS (SElECT ColID FROM aTmpParent WHERE ColID = aColID) )
              BEGIN
                   INSERT INTO tempR(ID2, ColID, [Name], Tlevel, ParentID, Processed) VALUES(aID2, aColID, aName, aTlevel, aParentID, aProcessed)
                   SET aID2 = aID2 + 1
              END
              FETCH NEXT FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed
         END
         CLOSE aCurVar1 */
    END;
    END IF;
         begin
         SELECT COUNT(*) INTO aNumTempDoc FROM tempR WHERE Processed = 0 and Tlevel < 1;
         end;
    WHILE aNumTempDoc > 0
    LOOP
    BEGIN
    -- Get current row
         SELECT ID1, ID2, ColID, Name, Tlevel, ParentID
         INTO aID1, aID2, aColID, aName, aTlevel, aParentID
         FROM tempR
         WHERE Processed = 0 AND ROWNUM = 1
         ORDER BY ID1;
    UPDATE tempR SET processed = 1 WHERE ID1 = aID1;
    aPreID2 := aID2;
    -- Get why parents
    declare CURSOR aCurVar1 IS --SELECT * FROM TSORADB.HKColumns;
         SELECT distinct FKDPKs.ColumnID as ColID,
              CASE WHEN FKDFKI.NAME is null
              THEN FKDPKs.Name
              ELSE FKDFKI.Name
              END Name,
         (aTlevel+1) as Tlevel,
         PREHKCs.ColID AS ParentID,
         0 as Processed
         FROM TSORADB.HKColumns FKDPKs
         INNER JOIN
         TSORADB.HKColumns FKDFKs ON FKDPKs.ColumnID = FKDFKs.ForeignKey
    INNER JOIN
         TSORADB.HKColumns FKDFKs2 ON FKDFKs2.TableID = FKDFKs.TableID
         INNER JOIN
         tempR PREHKCs ON PREHKCs.ColID=aColID AND PREHKCs.ColID = FKDFKs2.ColumnID AND PREHKCs.Tlevel=aTlevel
         LEFT OUTER JOIN
         SELECT TableID, Name, GroupID
         FROM TSORADB.HKColumns
         WHERE ColTypeID = aFKIColTypeID
         ) FKDFKI ON FKDFKI.TableID = FKDPKs.TableID
         INNER JOIN TSORADB.HKColumnType ON FKDPKs.ColTypeID=HKcolumnType.ColumnTypeID
         WHERE FKDPKs.ColTypeID=aPKColTypeID AND FKDPKs.ColumnID <> aColumnID
         AND FKDFKs.ColTypeID=aFKDColTypeID
    AND ((aGroupID=-1 AND FKDPKs.GroupID IS NULL) OR FKDPKs.GroupID=aGroupID);
         BEGIN
    OPEN aCurVar1;
    aCount := 1;
    SELECT MAX(ID2) INTO aID2 FROM tempR;
    LOOP
         FETCH aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed;
         Exit when aCurVar1%NOTFOUND; -- Exit the loop when no more rows are found.
    --WHILE aafetch_status = 0
    BEGIN
    IF (aCount = 1) -- The first Why Parent
              THEN
                   INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) VALUES(aPreID2, aColID, aName, aTlevel, aParentID, 0);
    ELSE -- The multiple Why Parents
    BEGIN
                   aID2 := aID2 + 1;
    -- Copy the previous parent with increased ID2
    INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) SELECT aID2 as ID2, ColID, Name, Tlevel, ParentID, 1 AS Processed FROM tempR WHERE ID1 <= aID1 AND ID2 = aPreID2;
    -- Insert the new why parent
    INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) VALUES(aID2, aColID, aName, aTlevel, aParentID, 0);
    END;
    END IF;          
    aCount := aCount + 1;
              --FETCH NEXT FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed;
    END;
         END LOOP;
    CLOSE aCurVar1;
         END;
         SELECT COUNT(*) INTO aNumTempDoc FROM tempR WHERE Processed = 0 and Tlevel < 1;
    END;
    END LOOP;
    -- Generate Unique Path Table End
    RETURN;
    EXCEPTION when NO_DATA_FOUND then null;
    END;
    The table which is returned to the SProc is used in the following way, (MSSQL code, as am yet to migrate). Basically using some of the returned column values along with DB values to populate a second temp table
    INSERT INTO #TmpR1 SELECT * FROM QueryCurrentWhy(@ColumnID, @GroupID, @Parents)
    SET @Tlevel = 1
    INSERT INTO @R
    SELECT HKColumns.Columnid as ColID, HKColumns.Tableid as TblID, R1.Name as [Name], HKColumns.NounID AS KeyCompA, R1.ParentID AS KeyCompB, HKColumns.ColTypeID as ColTypeID, ColumnTypeName as ColType, 0 as HasWhats,
    CASE WHEN R2.ColID is null
    THEN 0
    ELSE 1
    END HasWhyParent,
    0 as IsSelected
    FROM HKColumns
    INNER JOIN #TmpR1 AS R1
    ON HKColumns.ColumnID = R1.ColID AND R1.Tlevel=@Tlevel
    INNER JOIN HKColumnType
    ON HKColumns.ColTypeID=HKcolumnType.ColumnTypeID AND HKColumns.ColTypeID=@PKColTypeID
    LEFT JOIN #TmpR1 AS R2
    ON R2.ID2 = R1.ID2 AND R2.Tlevel=@Tlevel+1 AND R2.ParentID=R1.ColID

  • Your help needed converting video to digital

    How do I convert video to digital using a G4 Powerbook, Canopus 300 & Imovie HD 6.0.4.
    Steps needed, please.
    I have VCR, G4 Powerbook, Canopus ADVC 300 and Ilife 08 and/or Imovie HD6.0.4.
    Another poster said I needed to purchase Ilife 08 to make it work, but after the software arrived, it required G5 hardware to fully install. Not happy with that.
    Is there a workaround? Please advise.

    Assuming that you have VHS tapes that you want to convert to digital to use in iMovie? Is that correct? If so, you can find helpful information in these threads:
    http://discussions.apple.com/thread.jspa?messageID=7138598&#7138598
    An older MacWorld article with step by step instructions:
    http://www.macworld.com/article/30972/2004/05/fromvhstodvd.html
    If you are trying to do something else, please post back.

  • Help need Convert SWF to AVI Video

    Hi plz help
    I have made presentation in flash cs4. I have one main file Index & loading rest all the files through LoadMovie.
    I  want to convert my presentation into AVI for video but when i export it  in avi so it converts in AVI but its not taking the file which m  loading externally & not even converting the movie clip.
    so please help me i want to convert my presentation SWF files to AVI.
    If anyone knows the free converter tool so plz tell me.
    Thanx

    I found a utility the other day that captures SWF playing.
    My flash pieces were to complex to use the Export too.
    Here's just one utility out there.
    iWisoft Flash SWF to Video Converter

  • Help needed with String formatting

    Hi there,
    I have this string
    /C:/Documents%20and%20Settings/sickboy/workspace/Take%20A%20Note/bin/deployment/TOC.htmlI managed to get the last field with this
    file = ViewClass.getEditorPane().getPage().toString().substring(ViewClass.
                            getEditorPane().getPage().toString().lastIndexOf('/') +
                            1);which gives me TOC.html
    but finally I need to get also the folder in which this file is contained, which means deployment/TOC.html
    I can't find out how I can do this. Any ides?
    Thanks in advance

    use string.split("/") to pass the string to an array of strings and then get the last 2 elments

  • Help needed converting 2 graphics

    http://www.nexuspoint.ca/Graphics/prisma.ai
    and
    http://www.nexuspoint.ca/Graphics/star.eps
    The only image editing software I have is Fireworks which
    sees these files
    as flattened bitmaps. Can anyone out there convert them for
    me to a
    FW-ready png with vectors etc.?
    Hopefully,
    Kathie

    Thanks so much for this, Linda. My life just became a whole
    lot easier!
    I am having a very hard time explaining to my client what
    format it is that
    I need these images in. I'm getting the feeling that I should
    really have
    more than just 1 graphics app. in order to do web design.
    Because I only do
    this as a sideline, and usually pro bono for charities, it's
    hard to justify
    the expenditure.
    Hopefully the client will agree to pay to have the starburst
    recreated.
    Regards
    Kathie
    "Linda Rathgeber" <[email protected]> wrote in
    message
    news:gn4ofg$31f$[email protected]..
    > Kathie McLaughlin wrote:
    >>
    http://www.nexuspoint.ca/Graphics/prisma.ai
    and
    >>
    http://www.nexuspoint.ca/Graphics/star.eps
    >>
    >> The only image editing software I have is Fireworks
    which sees these
    >> files as flattened bitmaps. Can anyone out there
    convert them for me to
    >> a FW-ready png with vectors etc.?
    >
    > The prisma.ai graphic can be converted to FW ones. I
    find that the easiest
    > way to get AI vectors into FW is to open it in AI, and
    then copy and paste
    > into a new FW document. Here's the result.
    >
    >
    http://www.playingwithfire.com/prisma.png
    >
    > The star.eps image is a bitmap and, as Joey said, would
    need to be
    > recreated in vector format.
    >
    >
    > --
    > Linda Rathgeber - Adobe Community Expert
    >
    http://www.adobe.com/communities/experts/members/8.html
    >

  • Some help needed on strings....urgent

    We as a part of our project are dealing with something called info reference which is actually a stream of bytes which has hex values in it. Values can range form 00 to FF. Now the API to which this has to be sent expects a String. We tried putting the information in a string and sending it but the sytem at site rejects the info reference in two cases:
    1. When the info reference is of form: 11 23 45 00 00 56 56 (This is print of content of each byte of the string in Hex format. If we print is it as a string then we will see control chars printed)
    The first 00 is taken to be as a NULL and the reading of the string stops there itself and hence the system rejects is as Invalid format error.
    2. When the info stream has form : 11 23 89 89 80 80
    Here UTF coding error is coming since the string is made up of chars and for Hex values more that 7F there is no valid char represention. So the 89 and 80 and any Hex value more than 7F is replaced by the REPLACEMENT CHARACTER e.g. EFBFBD.
    We want to pass the info reference as it is. Is there any way in which java strings can be tweaked to take care of the above mentioned situaton? Its strings only.....byte arrays wont be accepted.
    Please do reply.
    Sorry again if this is not related to the forum but I really need a solution to this.
    Anticipating early reply,

    amit_rai wrote:
    We want to pass the info reference as it is. Is there any way in which java strings can be tweaked to take care of the above mentioned situaton? Its strings only.....byte arrays wont be accepted.That's stupid. If you handle binary data, you must stay away from String/char[]/Reader/Writer. They are for text exclusively.
    If you handle binary data, you need to use byte[]/InputStream/OutputStream.
    Trying to warp Strings into handling binary data is a very bad idea and will only lead to unreadable code and lots of pain during debugging.

  • Re-post - Help needed converting .ai file to Fireworks png

    My client's printer has taken another stab at sending me a
    starburst graphic
    in a full vector format.
    Iit's (allegedly) in Adobe Illustrator format, the same as
    the prism that
    Linda R was kind enough to convert
    for me last week.
    Can anyone spare a few minutes to look at
    http://www.nexuspoint.ca/Graphics/star.ai
    ? If it is in AI format, would you
    be kind enough convert it for me to a FW-readable png?
    Thanks in advance,
    Kathie

    Linda has fixed me up!
    K
    "Kathie McLaughlin" <[email protected]>
    wrote in message
    news:gnf5fk$61g$[email protected]..
    > My client's printer has taken another stab at sending me
    a starburst
    > graphic in a full vector format.
    > Iit's (allegedly) in Adobe Illustrator format, the same
    as the prism that
    > Linda R was kind enough to convert
    > for me last week.
    >
    > Can anyone spare a few minutes to look at
    >
    http://www.nexuspoint.ca/Graphics/star.ai
    ? If it is in AI format, would
    > you be kind enough convert it for me to a FW-readable
    png?
    >
    > Thanks in advance,
    > Kathie
    >

  • Help needed with String replace!

    Hi,
    I would like to replace all '\' characters with '/' in my string, ie:
         mystring.replace('\','/');
    Howeve, it complain about the '/' (Unclosed character literal).
    Any suggestions?
    Thanks

    Show us the line, you are probably using your regex incorrectly.
    In order to get the '\' you have to escape it (the '\' char. is used as the escape character so that you can look for things like " ' and new lines by useing \" \' and \n. Otherwise, how would java know you are looking for quotes and not closing your string?) As a consequence, your regex should look like '\\" for the \.
    The replace statement should probably be:
    string.replace("\\", "/");

Maybe you are looking for