How to get WIDTH and HEIGHT fields from applet tag?

I am developing an applet using JDK1.1 (to ensure microsoft jvm compatability).
A problem I'm facing is that there are no getWidth() or getHeight() method for Applet in 1.1, so I am hoping I can get this info from my html: <APPLET CODE="MyApplet" WIDTH=600 HEIGHT=856></APPLET>
getParameter didn't work, so does anyone have any ideas how I could get the width and height?
Cheers,
James

Write a jpeg decoder that can figure out how to determine the width/height of a jpeg file? Google it.
Or if you're really lazy, load each jpeg using the
Toolkit.loadImage( URL ) function and use getWidth/getHeight from there, but that's slow.

Similar Messages

  • How to get width and height of a jpg file ?

    Hello,
    I'm trying to insert a jpg file in a blob field on my database. The problem is that I need to get the file width and height in pixels. My class does not have a graphic interface, it's a batch. Does anybody has an idea of how can I do that ?
    tia.

    Write a jpeg decoder that can figure out how to determine the width/height of a jpeg file? Google it.
    Or if you're really lazy, load each jpeg using the
    Toolkit.loadImage( URL ) function and use getWidth/getHeight from there, but that's slow.

  • Get width and height of a dynamically loaded image once it's done loading?!

    hello : :
    well... i'm taking my first shots at flex after programming
    in flash for a year now. it's been fun and i've been picking up on
    things pretty well (or so i think), but i come across something
    today that i used to be able to do in my as2 programming and don't
    know how to do in as3...
    in flex, i'm loading an image into an image control (by using
    "myImgControl.load(urlString)"). i have a "complete" parameter on
    the image control that calls a function just fine after the image
    is loaded, but if i try and check the hight and width of the loaded
    image once it loads, it comes back as zero. how can i get the
    height and width of the image after it's loaded?!
    in flash/as2 i used to do this little trick/work-around i
    found in a forum (kirupa.com, i think) to find out the width and
    height once the loaded image listener checked the loading process
    and came back "complete"... in the code below, "imgLoader" is the
    movieClip the image was loaded using
    imgLoaderListener.loadClip(urlString, imgLoader).
    quote:
    iTot = imgLoader.getBytesTotal();
    iLoad = imgLoader.getBytesLoaded();
    if (iLoad == iTot && iTot > 4) {
    imgH = imgLoader._height;
    imgW = imgLoader._width;
    that all make sense?!
    basically, it's as simple as this: i need to find something
    similar to the above for as3 that will tell me the width and height
    of a dynamically loaded image after it's done loading...
    so there ya have it. i appreciate any help any of you can
    throw my way! thank you so much for even reading this!
    : : michael

    I assume you have probably already figured this out, but just
    in case, there should be an event to listen for after which you can
    get the height and width information successfully. I can't remember
    the exact name, however. Experiment and see which one works
    time-wise.

  • How to get count and other field in one select

    Hi,
    I am try to get total rows and some fields in two separate select:
    1. select count(id) into totalRows from mytable m where m.cat = 'CSV'
    2. select m.id, m.cat, m.updateTime from mytable m where m.cat = 'CSV'
    (all rows in mytable are distinct base on id field)
    How can I combine them into one query to make it faster so that no need to compare the m.cat field twice?
    Thanks.
    David

    Here's one solution :
    SQL> desc test;
    Name Null? Type
    ID NUMBER
    CAT VARCHAR2(10)
    UPDATE_TIME TIMESTAMP(6)
    SQL> select * from test;
    ID CAT UPDATE_TIME
    1 XYZ 09-JAN-04 09.04.17.000000 AM
    2 CSV 09-JAN-04 09.04.31.000000 AM
    4 ABCD 09-JAN-04 09.04.41.000000 AM
    5 CSV 09-JAN-04 09.04.53.000000 AM
    6 ABC 09-JAN-04 09.05.00.000000 AM
    7 CSV 09-JAN-04 09.05.06.000000 AM
    8 GGG 09-JAN-04 09.05.17.000000 AM
    7 rows selected.
    SQL> select id, cat, update_time
    2 ,Count(*) Over (Order By cat) As TotCnt
    3 from test
    4 Where cat = 'CSV'
    5 /
    ID CAT UPDATE_TIME TOTCNT
    2 CSV 09-JAN-04 09.04.31.000000 AM 3
    5 CSV 09-JAN-04 09.04.53.000000 AM 3
    7 CSV 09-JAN-04 09.05.06.000000 AM 3
    SQL>
    -- Shailender Mehta -

  • How To Get FileType and MIME Type from a File

    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.
    Can any one help me on this.
    Thanks in advance,
    Ram.
    Edited by: javausers07 on Apr 15, 2009 4:25 PM

    javausers07 wrote:
    Hi,
    I am using following ways to get FileType and MIME Type.
    I am able to get file type, but I am getting MIME Type as */*
    Can any one please let me know how to get MIME Type, but it should not be time consuming process.
    For File Type I am using following Code:
    private String getFileData(InputStream inStream) {
    fileName = C:\temp\temp.tiff
    String filePath = Util.createTempFile(fileName);
    RandomAccessFile raf = new RandomAccessFile(filePath, "rw");
    while (inStream.available() > 0) {
         byte[] buf = new byte[inStream.available()];
         inStream.read(buf);
         raf.write(buf);
    inStream.close();
    raf.close();
    File file = new File(filePath);Why do you do all above?
    JFileChooser chooser = new JFileChooser();
    String fileType = chooser.getTypeDescription(file);
    file.delete();
    //MIME Type I am getting from
    DataHandler data = new DataHandler(new DocumentSource(inStream));
    data.getContentType();
    data.getContentType() is not working well in all cases.That's because there's no way to get MIME type of all files on all filesystems.
    Kaj

  • How to get Driver and url names from a connection pool

    Hi,
    How to get the DriverName and URL from an existing pool, If I know the name of
    connection pool ? Is it possible to know the name of related pool , if I know
    the name of datasource?
    Thx
    Manish

    hi
    there are 2 ways:
    url must be: jdbc:weblogic:pool[:connectionPoolID]
    or
    jdbc:weblogic:jts[:connectionPoolID] (if you want to use jts with your JDBC connection.)
    see http://e-docs.bea.com/wls/docs60//javadocs/weblogic/jdbc/pool/Driver.html
    However, I think it is safer to configure and use DataSource to get connection.
    Nicolas
    "kumar" <[email protected]> wrote:
    >
    Hi,
    How to get the DriverName and URL from an existing pool, If I know the name
    of
    connection pool ? Is it possible to know the name of related pool , if I
    know
    the name of datasource?
    Thx
    Manish

  • How to get contacts and calendar info from my old palm files

    I used to use a Palm Tungsten T3. I no longer have it but until recently I still used the Palm Desktop. My computer "died" and I was able to copy all the Palm files of of it but now I have no idea how to get the contact and calendar(less important than contacts) info in some form I can use. I do not currently have any Palm software installed on my computer. I have Microsoft Windows XP on my computer now and use Outlook or Outlook Express. Does anyone have any advice for me. Thanks in advance.
    Post relates to: Tungsten T3

    I'm having the same problem.  Desktop 4.1.4 on old PC.  New PC with Win 7.   Loaded 6.2 and when I went to Import 6.2 is looking for .aba files.  Old PC has all .dat files.  How do I import or transfer addresses and other contact info to new PC??  Thanks.

  • How to get Essential and additional qualifications ,From which table

    Hi all,
    In one of my requirement, the report should show the Qualifications and Essential qualifications columns in the output.
    Requirement is :
    1. I have brought qualifications of Applicant from PB0024 table.
    2. I need to compare these with the Qualifications maintained in Job for the pernr.
    3. There are two types of Qualifications namely essential Qualifications and additional Qualifications.
    4.
    How do we get the Qualifications maintained for a job/Position?
    How can we distinguish between Qualifications and essential Qualifications maintained for a job at the database table level ?
    Please reply ASAP.
    Regards,
    Rama.P

    Hi Dilek Ersoz Adak,
    How can we get the jobs assigned to a position ,from which table ?
    Actually i am doing a custom recruitment report which displayes several fields along with the qualificaions and additional qualifications.
    For the two fileds: in the spec it is given as:
    14.     Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019 HRPE_PROFQ_ESSENTIAL, compare this with the qualifications maintained for the employee in Infotype 0024, and display wherever these maintained.)
    15.     Additional Qualification (This is maintained in HRPE_PROFQ_TBJID-infotype 0024 of the employee. Thus, check Position maintained for the employee in P4002_OBJID, against this position check for Essential Qualification, related object type u2018Qu2019, compare this with the qualifications maintained for the employee in Infotype 0024, and display all qualifications for which HRPE_PROFQ_ESSENTIAL is not maintained.)
    16.     Proficiency (HRPE_PROFQ_PROFC_TEXT)
    in clear :
    1.       Positions (Object Type S) are linked to Job through relationship A 007
    2.       In APDISCOM scenario, Qualifications (Object Type Q) are attached to Object u2018Jobu2019 (Object Type C) through Transaction Code PPPM
    3.       Now, for a Job there can two types of qualifications maintained Essential Qualifications (ii) Additional Qualifications
    4.       For essential qualifications: Against a Qualification we can maintain u201Cessential check boxu201D HRPE_PROFQ
    5.       For additional qualifications: Those qualifications for which HRPE_PROFQ is not maintained
    6.       Now, for an applicant, Qualifications are maintained in Infotype 0024, wherein the necessary qualifications would be selected.
    7.       In the report for field of u201Cessential qualificationu201D, check for qualifications maintained in Infotype 0024 and compare it with qualifications maintained in Job (through Position assigned to the applicant in P4002_OBJID)
    8.       Check for essential qualification HRPE_PROFQ maintained in Job and check whether the same Q is maintained in Infotype 0024 for the applicant, if yes, then generated Text of the Q
    9.       If there are any additional qualifications which are maintained in the job and not maintained in Infotype 0024, DONu2019T GENERATE ANYTHING IN FIELD
    10.   If there are any additional qualifications which are maintained in the job and if same are maintained in Infotype 0024, generate Q text under field of u201CAdditional Qualificationsu201D in the report
    11.   If there are any extra qualifications in infotype 0024, which are not maintained in Job, then generate Q text under field of u201CAdditional Qualificationsu201D in the report
    Please provide the procedure.(For clarity copy and paste the text in a MS-word)
    Please reply ASAP.
    Regards,
    Rama.P
    Edited by: Rama Chary on Dec 9, 2009 1:28 AM

  • How to get UUTPassed and UUTFailed count from C# ActiveX control

    Hello,
    My operator interface uses TestStand ActiveX control in C#. I will use the OP to test a bench of DUTs, which runs the same sequence file. I would like to know the total UUT-Tested, UUTPassed and UUTFailed count after each DUT tested. Is there any embedded parameter does the job for me and how could I get it? If there is not, I have to create internal variables in C# to do the job.
    Thanks
    Regards,
    Solved!
    Go to Solution.

    No, there is no build in function for this. So either you will have to implement something like this in on of the following:
    a) The user interface
    b) The SequenceFile (as long as it is not unloaded in between)
    c) The process model
    d) Use an external tool for analysis
    If you are already working with databases for reporting, i would suggest using d). If not, you can choose. But modifying the process model is not recommended (if other, simple solutions are available), i wouldn't recommend c).
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to get the position category field from PO13?

    Hi all,
    Anyone knows the logic of retrieving  the Position Category Field? I am given the Person's position p0001-PLANS
    Goto Tcode Po13.
    Enter plan version: 1
    Position: pernr (70000002)
    Click on general  attribute maint. infotype
    I need the value displayed. It is from structure PT1222-low
    May I know from where structure PT1222 takes values from?
    I have checked the table HRP1222. Somehow there is no field to indicate the position category.
    The structure for the general attribute maintenance
    Edited by: Siong Chao on Jan 9, 2012 10:37 AM

    Hi,
    You can get the data from the tables HRP1222 and HRT1222. Read the TABNR value from HRP1222 and use the TABNR to get further data from the table HRT1222.
    ~~~Ganesh Kumar K.

  • How to get Cube and Dimension ID from SSAS Database programatically

    Hi All,
    I am processing one SSAS cube from SSIS package and processing the cubes dynamically .For this am putting the Cube ID ,Cube name, Dimension ID, Dimension Name in a table and generating the XML programmatically.
     I can right click the properties of the dimension and cube and will get the ID information. But is there any way we can get the ID information programmatically .So that On the fly I will get the information and create the XML without storing
    the these information in table.
    We are using 2008 R2
    Thanks in advance
    Roshan

    Hi,
    Here is the C# code you want. Try it and see.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using AMO = Microsoft.AnalysisServices;
    namespace ConsoleApplication4
    class Program
    static void Main(string[] args)
    AMO.Server oServer = new AMO.Server();
    oServer.Connect(@"Provider=MSOLAP.5;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorksDW;Data Source=DEVWKS6\MSSQLSERVERMDX");
    foreach (AMO.Database db in oServer.Databases)
    foreach (AMO.Cube cube in db.Cubes)
    Console.WriteLine(System.String.Format("Cube Name : {0} Cube ID : {1}", cube.Name, cube.ID));
    foreach (AMO.CubeDimension dim in cube.Dimensions)
    Console.WriteLine(System.String.Format("Dimension Name : {0} Dimension ID : {1}", dim.Name, dim.ID));
    System.Console.WriteLine("");
    System.Console.WriteLine("");
    oServer.Disconnect(true);
    oServer.Dispose();
    System.Console.ReadLine();
    If you know your target SSAS Database Name, then you could use LINQ to narrow your search. Take a look into the following Code.
    AMO.Database db = oServer.Databases.Cast<AMO.Database>().Where<AMO.Database>(SSASdb => SSASdb.Name == "AdventureWorksDW").FirstOrDefault();
    foreach (AMO.Cube cube in db.Cubes)
    Console.WriteLine(System.String.Format("Cube Name : {0} Cube ID : {1}", cube.Name, cube.ID));
    foreach (AMO.CubeDimension dim in cube.Dimensions)
    Console.WriteLine(System.String.Format("Dimension Name : {0} Dimension ID : {1}", dim.Name, dim.ID));
    System.Console.WriteLine("");
    Best Regards...
    Chandima Lakmal Fonseka

  • How to get workbook and folder list from backend

    Hi,
    I want a list of workbook and their respective folders in excel. How can we find out this from backend?
    Thanks ,
    Sam

    Hi,
    You can try this:
    select d.doc_name,
    d.doc_developer_key,
    x.ex_to_par_name,
    e.exp_name,
    b.ba_name
    from eul10g_us.eul5_documents d,
    eul_us.eul5_elem_xrefs x,
    eul_us.eul5_expressions e,
    eul_us.eul5_ba_obj_links o,
    eul_us.eul5_bas b
    where x.ex_from_type = 'DOC'
    and x.ex_from_id = d.doc_id
    and x.ex_to_id = e.exp_id
    and e.it_obj_id = o.bol_obj_id(+)
    and o.bol_ba_id = b.ba_id(+)Tamir

  • Get Width and Height

    I am almost finished a J2ME project and it is just under 32kb in Jar size. However to finish it off I wish to determine the screen size. I am aware that Canvas Class supports getWidth/Height. And as you know I can not do:
    Canvas C = new Canvas(); /* It is protected!!! */
    C.getHeight();
    C.getWidth();
    but must do this:
    class Foobar extends Canvas
    Foobar() {}
    Foobar C = new Foobar();
    C.getHeight();
    C.getWidth();
    However this new (and unneeded) class pushes me over my 32 kb limit. - all that class header junk etc...
    There must be a better way???
    Thanks all in advance...

    Use J2ME Polish's preprocessing power for that one:
    public final static int UNDEFINED = -1;
    //#ifdef polish.ScreenWidth:defined
         //#= public final static int SCREEN_WIDTH = ${polish.ScreenWidth };
    //#else
         public final static int SCREEN_WIDTH = UNDEFINED;
    //#endif
    //#ifdef polish.ScreenHeight:defined
         //#= public final static int SCREEN_HEIGHT = ${polish.ScreenHeight };
    //#else
         public final static int SCREEN_HEIGHT = UNDEFINED;
    //#endifSame with CanvasHeight and CanvasWidth, if needed.
    Find more info at http://www.j2mepolish.org
    Best regards,
    Robert

  • My boyfriend purchased the new operating system for the mac book pro it was send to his email but we cant figure out how to get it and download it from the email

    how do we download our operating system purchase from our email it was sent to?

    You should have received a redemption code via email if you purchased Lion or Mountain Lion that would allow you to download the OS via the Mac App Store. If you purchased an earlier version it would come on discs, usually model-specific.
    Call back with some more information...
    Clinton
    MacBook Pro (15-inch Late 2011), OS Mavericks 10.9.4, 16GB Crucial RAM, Crucial M500 960GB SSD, 27” Apple Thunderbolt Display

  • How to get width/height of a movie clip in CreateJs?

    In AS3.0 it is like:
          mc.width and mc.height
    In AS2.0 it is like:
          mc._width and mc._height
    What about createJs
        mc.????

    The answer is get "nominalBounds" and then get width and height:
    var bounds = mc.nominalBounds;
    bounds.width will give you width and
    bounds.height will give you height
    Thanks

Maybe you are looking for