Need help with union-by-size method

Hello :)
I'm having a problem with a union-by-size method.
It was originally intended for a university assignment, but as I'm getting random errors by using it, I've changed to using union-by-heigth instead (which works flawlessly :-).
But I'm still very much interested in finding out what I did wrong with the union-by-size implementation (as I belive it'd be the better method since I use path compression and a lot of find(x)).
So if anyone can tell me what I'm doing wrong with the following code, I'd really appreciate it. As it is it is I'm getting ArrayIndexOutOfBoundsException with a positive much higher number than the array contains (ie. 1606 with a 900 long array)...
(I've also gotten a few stackoverflows in main, but I guess that is more with too much printouts... )
int[] union-by-size-array = new int[n*n] //implemented in other part of the code
private void union (int root1, int root2){
        int temporaryInteger;
        if(union-by-size-array[root2] < union-by-size-array[root1]){
            temporaryInteger = union-by-size-array[root2];
            union-by-size-array[root1] = root2;
            union-by-size-array[navn2] += temporaryInteger;
        }else {
            temporaryInteger = union-by-size-array[root1];
            union-by-size-array[root2] = root1;
            union-by-size-array[root1] += temporaryInteger;
    }

Ok, I'll supplement.
n is given by the user as an argument.
int nrOfDisJointSets = 1;
int[][] board = new int[n][n];
int[] ] union-by-size-array = new int[n+1];
    private void createNewNodeBoard(){
        for(int i = 0; i < n; i++){
            for(int j = 0; j <n; j++){
                board[i][j] = createNode();
    private Node createNode(){
        Node newNode = new Node(nrOfDisJointSetst);
        union-by-size-array[nrOfDisJointSets] = -1;
        nrOfDisJointSets++;
        return newNode;
    }the union method is called by the following line
union(find(x), find(y));navn2 is supposed to be root2 btw..

Similar Messages

  • Need help with finding picture size

    ok here is  my problem i have this sphere and it works great except when you click the thumbnails to display the picture, depending on the size of the picture, the pictures can get pushed to far over, and i understand why. the x and y coord never change. now my idea is to get the size of picture and use that to adjust the x-coord accordingly. my question is. how do i get the picture size? if i can. do the pictures have to be in the fla?
    heres code:
    The radius of the sphere, 'rad'. You can change it if you wish
    especially if you use thumbnails of a different size than our thumbnails.
    var rad:Number=380;
    The position of 'board' that will be defined later. 'board' is the main
    container containing the sphere and the black background
    that reponds to mouse actions.
    var posX:Number=stage.stageWidth/2;
    var posY:Number=stage.stageHeight/2;
    The size of thumbnails. Change the values to reflect the size of your
    images.
    var thumbWidth:Number=70;
    var thumbHeight:Number=53;
    The thumbnail images have been imported to the Library and linked to AS3
    under the names 'Small1', 'Small2',....,'Small46'. The corresponding
    Bitmap objects will be stored in the array 'thumbsArray'.
    var thumbsArray:Array=[];
    The addresses of the images corresponding to the thumbnails are stored
    in 'picsArray'. The images will be loaded at runtime when the user
    clicks on each thumbnail.
    var picsArray:Array=[];
    The Bitmap object corresponding to each thumbnail will be placed
    in a Sprite, holdersArray[i][j], as its child. We have to do this
    to make thumbnails responsive to mouse clicks.
    var holdersArray:Array=[];
    In order to depth-sort images on the sphere, we will need to keep
    track of their midpoints and the position of each midpoint in 3D.
    The midpoints will be stored in 'midsArray'.
    var midsArray:Array=[];
    The only part of our spherical menu that is hard-wired (and a bit harder
    to customize) is the number of thumbnails and their placement on the sphere.
    We have 46 thumbnails placed along 7 horizontal 'circles' on the sphere.
    The 'jLen' vector describes the number of thumbnails on each circle.
    The first 'circle' is the north pole and contains 1 image; the second
    is the circle corresponding to the vertical angle of 30 degrees
    from the negative y axis. That circle contains 6 images. The next one,
    at 60 degree of vertical displacement contains 10 images;
    the one after that, at 90 degrees from the negative y axis, is the equador
    of the sphere and contains 12 images. Past that, we go symmetrically:
    10, 6, and 1 image at the south pole.
    All our arrays are organized to reflect that placement of thumbnails.
    For example, thumbsArray is an array of arrays, thumbsArray[i], where
    i corresponds to the number of each circle. thumbsArray[i][j] is the
    j-th image on the i-th of the seven circles.
    var jLen:Vector.<Number>=new Vector.<Number>();
    jLen=Vector.<Number>([1,6,10,12,10,6,1]);
    We use the almost standard parametrization of a sphere:
    phi is the vertical angle measured from the vertical axis
    pointing upwards (in Flash's coordinate system this is the negative
    y-axis), theta is the horizontal angle measured from the
    horizontal axis pointing away from the screen; that is,
    the negative z-axis. phi changes from 0 to 90 degrees,
    theta from 0 to 360 degrees. For each circle, phi is constant:
    0, 30, 60, 90, 120, 150, 180. 'thetaStep' contains the angular
    distances between thumbnails on each circle. Except
    for the north and the south pole, for each circle
    the angular distance between thumbnails equals to 360 divided
    by the number of thumbnails on the circle.
    var thetaStep:Vector.<Number>=new Vector.<Number>();
    thetaStep=Vector.<Number>([0,60,36,30,36,60,0]);
    //The vertical angle between circles.
    var phiStep:Number=30;
    To make images tangent to the sphere, we need to tilt them
    vertically and horizontally. Horizontal tilt is always
    equal to the theta angle of the midpoint
    of the image and changes along each circle;
    the vertical tilt is based on the values
    of phi and is constant for each circle of thumbnails.
    var phiTilt:Vector.<Number>=new Vector.<Number>();
    phiTilt=Vector.<Number>([-90,-60,-30,0,30,60,90]);
    //The next four variables are related to auto-rotation
    //and rotation by the user.
    var autoOn:Boolean=true;
    var manualOn:Boolean=false;
    var prevX:Number;
    var prevY:Number;
    //The amount of perpective distortion. Higher values give more distortion.
    //Values have to be between 0 and 180 as they correspond to the view angle.
    this.transform.perspectiveProjection.fieldOfView=70;
    //We define and position the container 'board'.
    var board:Sprite=new Sprite();
    this.addChild(board);
    board.x=posX;
    board.y=posY;
    //We call the function that draws the border and the background
    //of 'board'.
    drawBoard();
    //Settings for our dynamic text boxes present on the Stage.
    infoBox.mouseEnabled=false;
    infoBox.wordWrap=true;
    infoBox.text="";
    loadBox.mouseEnabled=false;
    loadBox.wordWrap=true;
    loadBox.text="";
    loadBox.visible=false;
    When the user double-clicks on a thumbnail, the corresponding image
    will be loaded into 'loader' - an instance of the Loader class.
    'loader' is a child of the Sprite, 'photoHolder', which is a child
    of the MainTimeline.
    var photoHolder:Sprite=new Sprite();
    this.addChild(photoHolder);
    photoHolder.x=200;
    photoHolder.y=100;
    var loader:Loader=new Loader();
    photoHolder.addChild(loader);
    photoHolder.visible=false;
    We will literally 'build' a shere of thumbnails by positioning
    them in a Sprite called 'spSphere'. The moment we assign
    any of the 3D properties to 'spSphere', for example a value for the z coordinate,
    spSphere becomes a 3D container. That means we can place elements in it
    in 3D. We will also be able to apply 3D methods to 'spSphere', e.g. rotations.
    When 'spSphere' becomes a 3D display object, it has transfrom.matrix3D property.
    The latter property holds all the information about the current 3D state
    of 'spSphere'.
    var spSphere:Sprite=new Sprite();
    board.addChild(spSphere);
    spSphere.x=0;
    spSphere.y=0;
    //We move 'spSphere' backwards to avoid distortion of the front thumbnails.
    //You can experiment with different values for the z coordinate.
    spSphere.z=rad;
    //We call several functions defined later in the script.
    //They names tell it all.
    setUpPics();
    buildSphere();
    spSphere.rotationY=0;
    spSphere.rotationX=0;
    spSphere.rotationZ=0;
    spSphere.filters=[new GlowFilter(0x666666,1.0,6.0,6.0,2)];
    rotateSphere(0,0,0);
    setUpListeners();
    //The function that draws the black rectangle behind our sphere.
    //You can change the values below to change the size and the color
    //of the background. Those values do not affect the sphere itself.
    function drawBoard():void {
          board.graphics.clear();
          board.graphics.lineStyle(0,0x333333);
          board.graphics.beginFill(0x000000, 0);
          board.graphics.drawRect(-640,-490,1180,1080);
          board.graphics.endFill();
    //We add all the necassary listeners. They are self-explanatory.
    //Note that holdersArray[i][j] is the Sprite that contains the
    //j-th thumbnail on the i-th circle.
    function setUpListeners():void {
              var i:int;
              var j:int;
              this.addEventListener(Event.ENTER_FRAME,autoRotate);
              board.addEventListener(MouseEvent.ROLL_OUT,boardOut);
              board.addEventListener(MouseEvent.MOUSE_MOVE,boardMove);
              board.addEventListener(MouseEvent.MOUSE_DOWN,boardDown);
              board.addEventListener(MouseEvent.MOUSE_UP,boardUp);
              loader.contentLoaderInfo.addEventListener(Event.COMPLETE,doneLoad);
              loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,loadingError);
              photoHolder.addEventListener(MouseEvent.CLICK,holderClicked);
             for(i=0;i<7;i++){
                for(j=0;j<jLen[i];j++){
                    holdersArray[i][j].doubleClickEnabled=true;
                    holdersArray[i][j].addEventListener(MouseEvent.DOUBLE_CLICK,picClicked);
    The functions that are executed in response to events to which we listen.
    The next one runs when a loaded picture is clicked.
    function holderClicked(e:MouseEvent):void {
        board.visible=true;
        photoHolder.visible=false;
        infoBox.text="";
        manualOn=false;
        autoOn=true;
    'picClicked' is executed when any of the thumbnails is double-clicked.
    Note that in the function 'buildSphere' below, we assigned names to
    all holders, holderArray[i][j]. We need those names now to know
    which thumbnail was clicked and which image to load.
    function picClicked(e:MouseEvent):void {
        var targName:String="Double Click Image To View";
        var i:int;
        var j:int;
        targName=e.currentTarget.name;
        i=int(targName.charAt(3));
        j=int(targName.substring(5,targName.length));
        board.visible=false;
        loader.load(new URLRequest(picsArray[i][j]));
        infoBox.text="";
        loadBox.text="Loading...";
        loadBox.visible=true;
    function loadingError(e:IOErrorEvent):void {
        loadBox.text="There has been an error loading the image. The server may be busy. Refresh the page and try again.";
    function doneLoad(e:Event):void {
        infoBox.text="Click the image to close it.";
        photoHolder.visible=true;
        loadBox.text="";
        loadBox.visible=false;
    //Listeners responsible for mouse rotations and auto-rotation.
    function autoRotate(e:Event):void {
             if(autoOn && !manualOn){
                 spSphere.transform.matrix3D.prependRotation(-0.5,Vector3D.Y_AXIS);
                 zSortPics();
    function boardOut(e:MouseEvent):void {
                autoOn=true;
                manualOn=false;
    function boardDown(e:MouseEvent):void {           
                prevX=board.mouseX;
                prevY=board.mouseY;
                autoOn=false;
                manualOn=true;
    function boardUp(e:MouseEvent):void {
                manualOn=false;
         function boardMove(e:MouseEvent):void {
                    var locX:Number=prevX;
                    var locY:Number=prevY;
                    if(!autoOn && manualOn){
                    prevX=board.mouseX;
                    prevY=board.mouseY;
                    rotateSphere(prevY-locY,-(prevX-locX),0);
                    e.updateAfterEvent();
    The function setUpPics populates the arrays thumbsArray and picsArray.
    Note the organization of thumbnails by circles on which they reside:
    thumbsArray[0] - the north pole, thumbsArray[1] thumbnails of the first circle
    down from the north pole, etc. 'picsArray' is organized similarly.
    You can, of course, subsitute your own images, use thumbnails of
    dimensions different from ours. Changing the number of thumbnails and their organization
    would, however, require rewritting the script a bit.
    function setUpPics():void {
        thumbsArray[0]=[new Bitmap(new Small1(70,46))];
        picsArray[0]=["pic1.jpg"];
        thumbsArray[1]=[new Bitmap(new Small2(70,105)),new Bitmap(new Small3(70,105)),new Bitmap(new Small4(70,53)),new Bitmap(new Small5(70,53)),new Bitmap(new Small6(70,53)),new Bitmap(new Small7(70,53))];
        picsArray[1]=["pic2.jpg","pic3.jpg","pic4.jpg","pic5.jpg","pic6.jpg","pic7.jpg"];
        thumbsArray[2]=[new Bitmap(new Small8(70,53)),new Bitmap(new Small9(70,53)),new Bitmap(new Small10(70,53)),new Bitmap(new Small11(70,53)),new Bitmap(new Small12(70,53)),new Bitmap(new Small13(70,53)),new Bitmap(new Small14(70,53)),new Bitmap(new Small15(70,53)),new Bitmap(new Small16(70,53)),new Bitmap(new Small17(70,53))];
        picsArray[2]=["pic8.jpg","pic9.jpg","pic10.jpg","pic11.jpg","pic12.jpg","pic13.jpg","pic1 4.jpg","pic15.jpg","pic16.jpg","pic17.jpg"];
        thumbsArray[3]=[new Bitmap(new Small18(70,53)),new Bitmap(new Small19(70,53)),new Bitmap(new Small20(70,53)),new Bitmap(new Small21(70,53)),new Bitmap(new Small22(70,53)),new Bitmap(new Small23(70,53)),new Bitmap(new Small24(70,53)),new Bitmap(new Small25(70,53)),new Bitmap(new Small26(70,53)),new Bitmap(new Small27(70,53)),new Bitmap(new Small28(70,53)),new Bitmap(new Small29(70,53))];
        picsArray[3]=["pic18.jpg","pic19.jpg","pic20.jpg","pic21.jpg","pic22.jpg","pic23.jpg","pi c24.jpg","pic25.jpg","pic26.jpg","pic27.jpg","pic28.jpg","pic29.jpg"];
        thumbsArray[4]=[new Bitmap(new Small30(70,53)),new Bitmap(new Small31(70,53)),new Bitmap(new Small32(70,53)),new Bitmap(new Small33(70,53)),new Bitmap(new Small34(70,53)),new Bitmap(new Small35(70,53)),new Bitmap(new Small36(70,53)),new Bitmap(new Small37(70,53)),new Bitmap(new Small38(70,53)),new Bitmap(new Small39(70,53))];
        picsArray[4]=["pic30.jpg","pic31.jpg","pic32.jpg","pic33.jpg","pic34.jpg","pic35.jpg","pi c36.jpg","pic37.jpg","pic38.jpg","pic39.jpg"];
        thumbsArray[5]=[new Bitmap(new Small40(70,53)),new Bitmap(new Small41(70,53)),new Bitmap(new Small42(70,53)),new Bitmap(new Small43(70,53)),new Bitmap(new Small44(70,53)),new Bitmap(new Small45(70,53))];
        picsArray[5]=["pic40.jpg","pic41.jpg","pic42.jpg","pic43.jpg","pic44.jpg","pic45.jpg"];
        thumbsArray[6]=[new Bitmap(new Small46(70,53))];
        picsArray[6]=["pic46.jpg"];
    In the next function we actually create a 3D sphere of thumbnails by positioning
    them in 3D within spSphere. Note the center of the sphere is at (0,0,0) of
    spSphere. It might be worth recalling that with our interpretation of
    phi and theta each point P=(x,y,z) on the sphere corresponding to given values
    of phi and theta is given by:
    x = rad * sin(phi) * sin(theta),
    y = -rad * cos(phi),
    z = -rad * sin(phi) * cos(theta).
    Within the function, we populate 'holdersArray' and 'midsArray'. We assign thumbnails
    to holdersArray elements, position holdersArray elements, tilt them, give them names.
    We literally build our sphere.
    function buildSphere():void {
        var i:int;
        var j:int;
        var tStep:Number;
        var pStep:Number=phiStep*Math.PI/180;
        for(i=0;i<7;i++){
            holdersArray[i]=[];
            midsArray[i]=[];
            tStep=thetaStep[i]*Math.PI/180;
            for(j=0;j<jLen[i];j++){
                midsArray[i][j]=new Vector3D(rad*Math.sin(i*pStep)*Math.sin(j*tStep),-rad*Math.cos(i*pStep),-rad*Math.sin(i*p Step)*Math.cos(j*tStep));
                holdersArray[i][j]=new Sprite();
                holdersArray[i][j].name="pic"+String(i)+"_"+String(j);
                holdersArray[i][j].addChild(thumbsArray[i][j]);
                thumbsArray[i][j].x=-thumbWidth/2;
                thumbsArray[i][j].y=-thumbHeight/2;
                spSphere.addChild(holdersArray[i][j]);
                holdersArray[i][j].x=midsArray[i][j].x;
                holdersArray[i][j].y=midsArray[i][j].y;
                holdersArray[i][j].z=midsArray[i][j].z;
                holdersArray[i][j].rotationX=phiTilt[i];
                holdersArray[i][j].rotationY=-j*thetaStep[i];
          zSortPics();
    'zSortPics' depth-sorts all thumbnails corresponding to each view of
    the sphere. It sorts thumbnails by removing them (or more precisely
    their holders, holdersArray[i][j], as children of spSphere and then reassigning
    them based on the z-coordinates of their midpoints.
    function zSortPics():void {
        var distArray:Array=[];
        var dist:Number;
        var i:int;
        var j:int;
        var k:int;
        var curMatrix:Matrix3D;
        var curMid:Vector3D;
        curMatrix=spSphere.transform.matrix3D.clone();
        while(spSphere.numChildren>0){
            spSphere.removeChildAt(0);
            for(i=0;i<7;i++){
                for(j=0;j<jLen[i];j++){
                curMid=curMatrix.deltaTransformVector(midsArray[i][j]);
                dist=curMid.z;
                distArray.push([dist,i,j]);
          distArray.sort(byDist);
          for(k=0;k<distArray.length;k++){
              spSphere.addChild(holdersArray[distArray[k][1]][distArray[k][2]]);
              holdersArray[distArray[k][1]][distArray[k][2]].alpha=Math.max(k/(distArray.length-1),0.5) ;
    function byDist(v:Array,w:Array):Number {
         if (v[0]>w[0]){
            return -1;
          } else if (v[0]<w[0]){
            return 1;
           } else {
            return 0;
    The function that rotates the sphere in response to the user moving the mouse.
    Note we are setting the z coordinate to 0 before rotation. Otherwise,
    the non-zero translation coefficients produce undesirable effects.
    Note also that we do not use this function in 'autoRotate'. That is because
    when the sphere auto-rotates we want it to revolve about is pole-to-pole
    axis. That means prepending rather than appending rotation.
    See the function 'autoRotate' above.
    function rotateSphere(rotx:Number,roty:Number,rotz:Number):void {
          spSphere.z=0;
          spSphere.transform.matrix3D.appendRotation(rotx,Vector3D.X_AXIS);
          spSphere.transform.matrix3D.appendRotation(roty,Vector3D.Y_AXIS);
          spSphere.transform.matrix3D.appendRotation(rotz,Vector3D.Z_AXIS);
          spSphere.z=rad;
          zSortPics();

    I won't be searching thru all that code to try to find something relevant to your post, but if you are using a Loader to load the images, you can get the width and height as soon as the loading is complete using the loader object (loader.width, loader.height).  You just need to wait until loading is complete, so you'll need a listener for that if you don't have one already.

  • Need help with union of two selects

    select 1 selects items for a timespan.
    But if there is nothing found at one date,
    the date is not returned so I want a union with a calendar table
    Both selects work but how to make the union?
    Thanks for any help!
    select 1:
    SELECT COUNT(*) COUNT,
    fb_operation prodstep,
    kalenderwoche datum
    FROM stoerung,
    kalender
    WHERE str_kommenzeit > to_date('13.06.2006', 'dd.mm.yyyy')
    AND str_kommenzeit < to_date('11.07.2006', 'dd.mm.yyyy')
    AND to_char(str_kommenzeit,'dd.mm.yyyy') = to_char(fulldate,'dd.mm.yyyy')
    GROUP BY fb_operation,
    kalenderwoche
    ORDER BY fb_operation,
    kalenderwoche
    select 2:
    SELECT kalenderwoche datum
    from kalender
    WHERE fulldate > to_date('13.06.2006', 'dd.mm.yyyy')
    AND fulldate < to_date('11.07.2006', 'dd.mm.yyyy')

    THANKS A LOT!
    I tested it and it gave me good results
    the problem I still have is that then I expand the Date to
    to_date('11.12.2006') I just get the weeks
    that contain data. But I need all weeks that are selected, if there is
    no data the other fields shall be null or 0.
    This is much too difficult for me perhaps you can also help me with this!
    select * from
    (SELECT COUNT(*) COUNT,
    fb_operation prodstep,
    kalenderwoche datum
    FROM stoerung,
    kalender
    WHERE str_kommenzeit > to_date('13.06.2006', 'dd.mm.yyyy')
    AND str_kommenzeit < to_date('11.12.2006', 'dd.mm.yyyy')
    AND to_char(str_kommenzeit,'dd.mm.yyyy') = to_char(fulldate,'dd.mm.yyyy')
    GROUP BY fb_operation,
    kalenderwoche
    ORDER BY fb_operation,
    kalenderwoche) A,
    (SELECT kalenderwoche datum
    from kalender
    WHERE fulldate > to_date('13.06.2006', 'dd.mm.yyyy')
    AND fulldate < to_date('11.12.2006', 'dd.mm.yyyy') ) B
    where A.datum = B.datum (+)

  • Need help with a reverse number method

    hey all..
    i have this program which should return the integer reversed ..
    i have done this program using methods.. but the problem is if the
    number endes with 0 when it reversed the output doesn't contain the number 0
    for example:
    input
    123450
    output
    54321
    where before the 5 there should be 0
        This program that reads an integer and then calls a method
          that receives an integer and returns the integer with its digits reversed.
          Main prints the resulting integer.
       import java.util.Scanner; // program uses class Scanner
        class Sh9q4
           // main method begins execution of Java application
           public static void main( String args[] )
          // create Scanner to obtain input from command window
             Scanner input = new Scanner( System.in );
             int number; // The number entered by the user
             System.out.println("Enter an integer"); // prompt for input
             number = input.nextInt(); // read the the integer
             reverse (number); // print the method reverse
          } // end method main
           public static void reverse ( int num )
             int lastDigit; // the last digit returned when reversed
             int reverse = 0;
             do
                lastDigit = num % 10;
                reverse = (reverse * 10) + lastDigit;
                num = num / 10;
             while (num > 0);
             System.out.println("The integer with its digits reversed " + reverse); // print the integer reversed
          }// end method reverse
       } // end class Sh9q4thanks for your help :)

    If you need the leading zero to display, then you will have to do as Keith recommended and convert the input number to a String, then reverse that String and print it as a String.
    A number is a number is a numerical value, and there is no difference between the value of 054321 and 54321 except when written as a literal, when the first is an octal, and the second a decimal, value.
    If you are still confused, plug in these few lines of code and run them:String str = "012345";
    int x = Integer.parseInt (str);
    System.out.println(str);
    System.out.println(x);db

  • Need help with changing text size

    Hi everyone,
    I would like to allow users to easily change the text size of
    a website I am designing.
    To see an examplme, go to the Dell website (www.dell.com), on
    the bottom left there is a link to enlarge the text (or bring it
    back to normal size).
    Is this something that I can do through dreamweaver, or maybe
    CSS?
    Thanks in advance for your help!
    Jose

    This article may be of some use:
    http://www.alistapart.com/articles/alternate/
    Nadia
    Adobe® Community Expert : Dreamweaver
    ~~ CSS Templates |Tutorials |SEO Articles ~~
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au
    > I would like to allow users to easily change the text
    size of a website I
    > am
    > designing.
    >
    > To see an examplme, go to the Dell website
    (www.dell.com), on the bottom
    > left
    > there is a link to enlarge the text (or bring it back to
    normal size).
    >
    > Is this something that I can do through dreamweaver, or
    maybe CSS?
    >
    > Thanks in advance for your help!
    >
    > Jose
    >

  • I need help with rectangle tool size/align

    Hey there !
    i've some trouble with a specific document. I could not align any rectangle or define a specific size. For exemple, i choose 600px x600 px in the top "menu" bar, illustrator change the values by 599,641 px
    It's the same in inch, mm..ect
    The second thing it's if i choose a specific coordonate to place the rectangle , it's change by illustrator.
    Any ideas ?
    I have not the problem on other document.
    It's a 21 cm 21cm @ 300 dpi, proprotions 1
    No grid activited or anything else to force the magnetism

    It was, but it doesn't change :/
    I've tried to created a new document, but with pixel dimension. then i change it in cm, and it's work..
    but if my document is created in mm or cm, it's just not work
    So i could not have a cm or mm document and precise rectangle size.. i have to create a whole number pixel document

  • Need Help with Reducing PDF Size

    Hey I'm having trouble reducing my PDF file sizes.
    First off, they were school projects created in Adobe Illustrator that I save to PDF form. 
    I'm trying to email several of them to potential employers (through Gmail) but the file size limit is 25MB, and some of my files exceed that limit. 
    For example I have one PDF file that is 72MB. 
    I've compressed the file by right-clicking on the icon --- I've also reduced the file in Acrobat and that doesn't do anything. 
    Now I try to reduce the files and Acrobat tells me:
    "The PDF document contained image masks that were not downloaded."
    So can anyone help me?  I would greatly appreciate this from everyone who has time to comment and give me suggestions/help.
    Thanks.

    If you can find when a pictures is loaded (not when it is getting loaded, but after it has just finished being loaded), that is when you can check the size using the Loader (loader.width and loader.height).

  • Need Help with Font - Style -  Size

    how do you keep these the same size and style on all pages?
    example font and size will be the same but style wont. when i try
    set the same style the size changes, and if you set size the style
    changes.

    font-style:normal;
    It's not necessary to restate defaults.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "d_simpson" <[email protected]> wrote in
    message
    news:gk99ca$bcc$[email protected]..
    > Hi Joseph,
    > The best way to keep the same font size and style would
    be in a css file.
    >
    > Example:
    > body { font-family: Helvetica, sans-serif;
    font-size:10px;
    > font-style:normal; }
    >
    > This will then be applied to all pages.
    >
    >

  • Need help with my file receiving method ??????

    Hi, I have a method that can recieve files from other peers. Currently, it can recieve any file name such as d1.txt, d2.txt ...d5.txt. However, my method doesn't know the file name of the file it is recieving and assigns it to c:\\files\d1.txt. How can I change my method so that It knows what the file name is that it is receiving and assign it properly? thanks
    public void receive() throws IOException {
                    try {
                            ServerSocket ss = new ServerSocket(1234);
                            while (true) {
                                    Socket s = ss.accept();
                                    BufferedInputStream bis =
                                            new BufferedInputStream(
                                            s.getInputStream());
                                    FileOutputStream fis =
                                            new FileOutputStream(c:\\files\d1.txt);
                                    BufferedOutputStream bos =
                                            new BufferedOutputStream(fis);
                                    int c, i = 0;
                                    c = bis.read();
                                    while (c != -1) {
                                            bos.write(c);
                                            c = bis.read();
                                    bos.flush();
                                    bos.close();
                                    fis.close();
                                    bis.close();
                                    s.close();
                    } catch (Exception e) {
                            System.out.println(e);
            }

    I see two options:
    1. send (and thus receive) the file name first
    2. use a static variable that you increment for each new file
    Kind regards,
      Levi
    PS. your writing algorithm is very slow, right?

  • Need Help with a getText method

    Gday all,
    I need help with a getText method, i need to extract text from a JTextField. Although this text then needs to converted to a double so that i can multiply a number that i have already specified. As you may of guessed that the text i need to extract already will be in a double format.e.g 0.1 or 0.0000004 etc
    Thanks for your help
    ps heres what i have already done its not very good though
    ToBeConverted.getText();
    ( need help here)
    double amount = (and here)
    total = (amount*.621371192);
    Converted.setText("= " + total);

    Double.parseDouble( textField.getText() );

  • Need help with Sound Methods

    Hi, I am new to java and need help with sound methods.
    q: create a new method that will halve the volume of the positive values and double the volume of the negative values.
    Message was edited by:
    Apaula30

    duplicate message #2

  • I need Help with a website I've created

    I need help with a website I've created (www.jonathanhazelwood.com/lighthouse) I created the folowing site with dreamweaver at my current resolution 1366 by 768. Looks great on my screen resolution but if it is viewed on other resolutions the menu moves and some of the text above and below. How can I keep all content centered and working like it does on 1366 by 768 on all resolutions. The htm to my site is below I started off with a blank template through dreamweaver CS5.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>The Lighthouse Church</title>
    <style type="text/css">
    <!--
    body {
        font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
        background: #42413C;
        margin: 0;
        padding: 0;
        color: #000;
        background-color: #000;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
        padding: 0;
        margin: 0;
    h1, h2, h3, h4, h5, h6, p {
        margin-top: 0;     /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
        padding-right: 15px;
        padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
        border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
        color: #42413C;
        text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
        color: #6E6C64;
        text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
        text-decoration: none;
    /* ~~ this fixed width container surrounds all other elements ~~ */
    .container {
        width: 960px;
        background: #FFF;
        margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
        padding: 10px 0;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the overflow:hidden on the .container is removed */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    #apDiv1 {
        position:absolute;
        width:352px;
        height:2992px;
        z-index:1;
        top: 171px;
        left: 507px;
    #apDiv2 {
        position:absolute;
        width:961px;
        height:1399px;
        z-index:1;
        left: 187px;
        top: 1px;
    #apDiv3 {
        position:absolute;
        width:961px;
        height:1001px;
        z-index:1;
        top: -2px;
    #apDiv4 {
        position:absolute;
        width:963px;
        height:58px;
        z-index:1;
        left: 0px;
        top: 101px;
    #apDiv5 {
        position:absolute;
        width:961px;
        height:1505px;
        z-index:1;
        top: -5px;
    #apDiv6 {
        position:absolute;
        width:962px;
        height:150px;
        z-index:1;
        left: 0px;
        top: -1px;
    #apDiv7 {
        position:absolute;
        width:361px;
        height:25px;
        z-index:2;
        left: 35px;
        top: 1308px;
    #apDiv8 {
        position:absolute;
        width:320px;
        height:24px;
        z-index:2;
        left: 200px;
        top: 1479px;
    #apDiv9 {
        position:absolute;
        width:962px;
        height:63px;
        z-index:3;
        left: -10px;
        top: -1292px;
    #apDiv10 {
        position:absolute;
        width:270px;
        height:27px;
        z-index:2;
        left: 200px;
        top: 1478px;
    #apDiv11 {
        position:absolute;
        width:961px;
        height:44px;
        z-index:3;
        left: 195px;
        top: 183px;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #apDiv12 {
        position:absolute;
        width:295px;
        height:23px;
        z-index:4;
        left: 198px;
        top: 1px;
    #apDiv13 {
        position:absolute;
        width:135px;
        height:22px;
        z-index:5;
        left: 1001px;
        top: 3px;
    #apDiv14 {
        position:absolute;
        width:309px;
        height:992px;
        z-index:1;
        left: 33px;
        top: 479px;
    #apDiv15 {
        position:absolute;
        width:327px;
        height:999px;
        z-index:1;
        left: 324px;
    #apDiv16 {
        position:absolute;
        width:262px;
        height:1000px;
        z-index:2;
        left: 674px;
        top: 477px;
    #apDiv17 {
        position:absolute;
        width:85px;
        height:34px;
        z-index:1;
        left: -379px;
        top: 1001px;
    #apDiv18 {
        position:absolute;
        width:200px;
        height:115px;
        z-index:6;
    #apDiv19 {
        position:absolute;
        width:168px;
        height:31px;
        z-index:3;
        left: 448px;
        top: 1451px;
    #apDiv20 {
        position:absolute;
        width:94px;
        height:33px;
        z-index:3;
        left: 384px;
        top: 1477px;
    body {
        background-color: #000;
        margin-left: 0px;
        margin-right: 0px;
    #apDiv21 {
        position:absolute;
        width:920px;
        height:200px;
        z-index:4;
        left: 19px;
        top: 233px;
    </style>
    </head>
    <body>
    <div class="container">
      <div class="content">
        <div id="apDiv5">
          <div id="apDiv16">
            <div id="apDiv17">
              <map name="Map2" id="Map2">
                <area shape="rect" coords="4,2,77,28" href="http://www.myspace.com/lighthousechurch1" />
              </map>
              <img src="paypal-donate-button.png" width="83" height="33" border="0" usemap="#Map" />
              <map name="Map" id="Map">
                <area shape="rect" coords="2,2,80,30" href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=HgApKd0bxyPQv1ixwBW3HgWXaLxPIiT Po9gSsRELLQp72IZ2-_8uvSmCLRO&dispatch=5885d80a13c0db1f8e263663d3faee8d9384d85353843a619606 282818e091d0" />
              </map>
            </div>
          </div>
          <div id="apDiv21">
            <blockquote>
              <blockquote>
                <blockquote>
                  <blockquote>
                    <blockquote>
                      <blockquote>
                        <p><img src="faithexplosion.png" width="314" height="225" /></p>
                      </blockquote>
                    </blockquote>
                  </blockquote>
                </blockquote>
              </blockquote>
            </blockquote>
          </div>
          <div id="apDiv14">
            <div id="apDiv15">
              <div>
                <div>
                  <p> Special Message from Perry Stone </p>
                  <h2> Was Jesus Born on December 25?</h2>
                  <p> 12/20/2010 </p>
                  <p><img alt="iStock_000003631829XSmall" src="http://www.voe.org/images/iStock_000003631829XSmall.jpg" width="300" height="234" /></p>
                  <p>Last   year, in response to the growing number of Christians who celebrate   Hanukkah but hate Christmas, I wrote an article for this website titled   &ldquo;Hanukkah or Christmas?&rdquo; I explained why I think Jesus was either   conceived or birthed on December 25.</p>
                </div>
              </div>
              <div>
                <div><a href="http://www.voe.org/Prophecy-Update/what-happened-to-global-warming.html"> READ MORE</a>
                  <p> Prophecy Update </p>
                  <h2> What Happened to Global Warming?</h2>
                  <p> 12/17/2010 </p>
                  <p> </p>
                </div>
              </div>
              <div>
                <div></div>
              </div>
              <div>
                <div></div>
              </div>
            </div>
            <div>
              <p><font size="2">Special Word</font></p>
              <p><font size="2">January 7th, 2011</font></p>
              <p> <font size="2">Dear Viewers:</font></p>
              <p><font size="2">We have now entered into one of the most trying times; but also one of the most glorious            times in church history.  Many things are coming upon the world and also upon the church and we (the church) must be totally            prepared to take up our cross daily and venture out into the lost and</font></p>
              <p>  <a href="http://sermon.lighthousechurchinc.org/2011/01/07/special-word-1711-evangelist-barbara-lync h.aspx" target="_parent">Click Here for More</a></p>
            </div>
            <p> </p>
            <div></div>
            <div>
            <!--//              weAddFlash("lhi09hdr.swf",800, 100,"true","true","high","showall","true","#ffffff");              //--></div>
            <div></div>
            <p> </p>
          </div>
          <img src="lighthousegraphic2.jpg" width="960" height="1509" />
          <div id="apDiv20"><img src="myspacebutton.jpg" width="89" height="30" border="0" usemap="#Map3" />
            <map name="Map3" id="Map3">
            <area shape="rect" coords="3,2,87,28" href="http://www.myspace.com/lighthousechurch1" />
          </map>
      </div>
        </div>
      <p> </p>
      </div>
    <!-- end .container --></div>
    <div id="apDiv10"><font size="1"><font color="#FFFFFF">Copyright 2011 The Lighthouse Church Inc.</font></font></div>
    <div id="apDiv11">
      <ul id="MenuBar1" class="MenuBarHorizontal">
        <li><a href="#">Home</a>    </li>
        <li><a href="#" class="MenuBarItemSubmenu">Our Pastor</a>
          <ul>
            <li><a href="#">Fresh Word</a></li>
            <li><a href="#">Itinerary</a></li>
            <li><a href="#">Prophetic Word</a></li>
            <li><a href="#">Sermons</a></li>
            <li><a href="#">Special Words</a></li>
            <li><a href="#">Word of Month</a></li>
          </ul>
        </li>
        <li><a href="#">Men Ministry</a></li>
        <li><a href="#" class="MenuBarItemSubmenu">Ministers</a>
          <ul>
            <li><a href="#">Chris Gore</a></li>
    </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Our Church</a>
          <ul>
            <li><a href="#">Contact Us</a></li>
            <li><a href="#">Donate</a></li>
            <li><a href="#">Events</a></li>
            <li><a href="#">Our Store</a></li>
            <li><a href="#">Prayer Request</a></li>
            <li><a href="#">Salvation</a></li>
            <li><a href="#">Subscribe</a></li>
            <li><a href="#">Vision</a></li>
            <li><a href="#">We Believe</a></li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Resources</a>
          <ul>
            <li><a href="#">Prepare for Disaster</a></li>
            <li><a href="#">How to Fast</a></li>
            <li><a href="#">Heaven &amp; Hell</a></li>
            <li><a href="#">Warfare Prayers</a></li>
            <li><a href="#">Wisdom Words</a></li>
          </ul>
        </li>
        <li><a href="#" class="MenuBarItemSubmenu">Prophetic</a>
          <ul>
            <li><a href="#">Article Archive</a></li>
            <li><a href="#">Audio Prophecies</a></li>
            <li><a href="#">Color for Year</a></li>
            <li><a href="#">Major Articles</a></li>
            <li><a href="#">Prophecy Archive</a></li>
            <li><a href="#">Prophetic Articles</a></li>
            <li><a href="#">Word for Year</a></li>
          </ul>
        </li>
      </ul>
    </div>
    <div id="apDiv12"><font size="1"><font color="#FFFFFF">6 South Railroad Ave Wyoming,DE 19934</font></font></div>
    <div id="apDiv13"><font size="1"><font color="#FFFFFF">Phone:(302) 697-1472</font></font></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

    Look at all the apdiv's you have.  Those are absolutely positioned layers.  I'm assuming by your post that you are very new to Dreamweaver and HTML and CSS.  I would highly recommend not using absolutely positioned layers until you have a better grasp on HTML and CSS.
    Looking at your code I would suggest that you consider using one of Dreamweaver's built in, or downloadable templates as a starting point and work from there. 
    http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_templates.html

  • Need help with connecting file inputs to arrays

    In this assignment I have a program that will do the following: display a list of names inputed by the user in reverse order, display any names that begin with M or m, and display any names with 5 or more letters. This is all done with arrays.
    That was the fun part. The next part requires me to take the names from a Notepad file, them through the arrays and then output them to a second Notepad file.
    Here is the original program: (view in full screen so that the code doesn't get jumbled)
    import java.io.*;       //Imports the Java library
    class progB                    //Defines class
        public static void main (String[] arguments) throws IOException
            BufferedReader keyboard;                                  //<-
            InputStreamReader reader;                                 //  Allows the program to
            reader = new InputStreamReader (System.in);               //  read the the keyboard
            keyboard = new BufferedReader (reader);                  //<-
            String name;                 //Assigns the name variable which will be parsed into...
            int newnames;               //...the integer variable for the amount of names.
            int order = 0;              //The integer variable that will be used to set the array size
            String[] array;             //Dynamic array (empty)
            System.out.println (" How many names do you want to input?");   //This will get the number that will later define the array
            name = keyboard.readLine ();
            newnames = Integer.parseInt (name);                                         // Converts the String into the Integer variable
            array = new String [newnames];                                               //This defines the size of the array
            DataInput Imp = new DataInputStream (System.in);       //Allows data to be input into the array
            String temp;                                       
            int length;                                                                  //Defines the length of the array for a loop later on
                for (order = 0 ; order < newnames ; order++)                                //<-
                {                                                                           //  Takes the inputed names and
                    System.out.println (" Please input name ");                            //  gives them a number according to
                    temp = keyboard.readLine ();                                           //  the order they were inputed in
                    array [order] = temp;                                                  //<-
                for (order = newnames - 1 ; order >= 0 ; order--)                                //<-
                {                                                                                //  Outputs the names in the reverse 
                    System.out.print (" \n ");                                                   //  order that they were inputed
                    System.out.println (" Name " + order + " is " + array [order]);             //<-
                for (order = 0 ; order < newnames ; order++)                                  //<-
                    if (array [order].startsWith ("M") || array [order].startsWith ("m"))     //  Finds and outputs any and all
                    {                                                                         //  names that begin with M or m
                        System.out.print (" \n ");                                            //
                        System.out.println (array [order] + (" starts with M or m"));         //
                    }                                                                         //<-
                for (order = 0 ; order < newnames ; order++)                                            //<-
                    length = array [order].length ();                                                   //
                    if (length >= 5)                                                                    //  Finds and outputs names
                    {                                                                                  //  with 5 or more letters
                        System.out.print (" \n ");                                                      //
                        System.out.println ("Name " + array [order] + " have 5 or more letters ");      //<-
    }The notepad file contains the following names:
    jim
    laruie
    tim
    timothy
    manny
    joseph
    matty
    amanda
    I have tried various methods but the one thing that really gets me is the fact that i can't find a way to connect the names to the arrays. Opening the file with FileInputStream is easy enough but using the names and then outputing them is quite hard. (unless i'm thinking too hard and there really is a simple method)

    By "connect", do you just mean you want to put the names into an array?
    array[0] = "jim"
    array[1] = "laruie"
    and so on?
    That shouldn't be difficult at all, provided you know how to open a file for reading, and how to read a line of text from it. You can just read the line of text, put it in the array position you want, until the file is exhausted. Then open a file for writing, loop through the array, and write a line.
    What part of all that do you need help with?

  • Need help with XML transformation

    I am not sure this is the right place for this. But i will try it here. I am very troubled with my XSLT. Trying to transform a text Coupon which has the following html for it. So,
    _1. INPUT is:_
    <html>
    <head>
    </head>
    <body>
    <p>
    This coupon is for a good guy whose first name is :
    </p>
    <p>
    </p>
    <p align="center">
    Sadd
    </p>
    <p align="center">
    </p>
    <p align="right">
    <b>also</b> whose <var>full_name</var> is Sadd Hossain
    </p>
    <p align="left">
    </p>
    <p align="left">
    He is a <font size="3">software </font><font size="4">engineer for</font><font size="5">
    S&H</font>
    </p>
    </body>
    </html>
    *2. output needed  is:*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE>
    <TextMSG >
    This coupon is for a good guy whose first name is :
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="center">
    <emph>SADD</emph>
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="right" >
    also whose full_name is Sadd Hossain
    </TextMSG>
    <TextMSG>
    </TextMSG>
    <TextMSG align="left" >
    He is a software engineer
    for S&H
    </TextMSG>
    </POSMESSAGE>
    *3. XSLT for this*
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="body">
    <POSMESSAGE>
    <xsl:for-each select="p">
    <TextMSG>
    <!--xsl:if test="not[@align='']"-->
    <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
    <!--/xsl:if-->
    <xsl:attribute name="font"><xsl:value-of select="@size"/></xsl:attribute>
    <xsl:value-of select="."/>
    </TextMSG>
    <xsl:for-each select="b">
    <emph>
    <xsl:value-of select="."/>
    </emph>
    </xsl:for-each>
    </xsl:for-each>
    </POSMESSAGE>
    </xsl:template>
    </xsl:stylesheet>
    *4: the above xslt generating this output*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE><TextMSG align="" font="">
    This coupon is for a good guy whose first name is :
    </TextMSG><TextMSG align="" font="">
    </TextMSG><TextMSG align="center" font="">
    SADD
    </TextMSG><TextMSG align="center" font="">
    </TextMSG><TextMSG align="right" font="">
    also whose full_name is Sadd Hossain
    </TextMSG><TextMSG align="left" font="">
    </TextMSG><TextMSG align="left" font="">
    He is a software engineer
    for S&H
    </
    *5: Need help with this. what should my xslt look like to get the desired output???????????????*
    any help or direction will be very much appreciated. Thank you_

    I have below suggestions:
    1. Please use code option given in message editor toolbar for posting any formatted content like XML, Java code snippet etc.
    2. replace & in your source XML with _& a m p ;_ (Without spaces, I have put spaces to make it visible here).
    3. I have modified your XSLT according output XML you have given. I am not sure what you want to do with some elements like <b>, <font>, <var> etc. change below XSLT as you require for these elements.
    Modified XSLT:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
            <xsl:output method="xml"/>
         <xsl:template match="body">
              <POSMESSAGE>
                   <xsl:for-each select="p">
                        <TextMSG>
                             <xsl:if test=". != ''">
                                  <xsl:for-each select="@align">
                                       <xsl:attribute name="align">
                                            <xsl:value-of select="."></xsl:value-of>
                                       </xsl:attribute>
                                  </xsl:for-each>
                                  <xsl:value-of select="."/>
                             </xsl:if>
                        </TextMSG>
                   </xsl:for-each>
              </POSMESSAGE>
         </xsl:template>
    </xsl:stylesheet>
    OUTPUT:
    <?xml version="1.0"?>
    <POSMESSAGE>
         <TextMSG>This coupon is for a good guy whose first name is :</TextMSG>
         <TextMSG/>
         <TextMSG align="center">Sadd</TextMSG>
         <TextMSG/>
         <TextMSG align="right">alsowhose full_name is Sadd Hossain</TextMSG>
         <TextMSG/>
         <TextMSG align="left">He is a softwareengineer forS&H</TextMSG>
    </POSMESSAGE>

  • Need help with compression rates with Sorenson Squeeze 6, Compressor3.5.2

    Hopefully somebody can help me with this...
    I am running Sorenson Squeeze 6 on a Mac to try and compress some Apple ProRes 422 videos into an MPEG-2 file. The file will be played in a DirectX application, running on a PC with Windows 7. When being played it looks to be heavily compressed, and I need help with some of the compression settings.
    Let me get more into detail...
    So I have received a Quicktime .mov that has been encoded with FCP using Apple ProRes 422 compression at 720x486 , 29.97 fps, 40.29 Mbit/s , and the file size is 515.7mb.
    So, this is the type of file I will have to compress into an MPEG-2, that will be playing on a...
    1.6 GHz Intel Atom 330 Dual Core
    NVIDIA GeForce 9400M Graphics
    1Gb DDR2 800 Ram
    32Gb SATA Solid State Drive
    Windows 7 Home
    Here is what I have done so far on my Mac using Sorenson Squeeze 6 :
    I have brought the original file in and created some presets.
    First off, I am encoding these MPEG-2 videos using an elementary stream type so I can mux the files using MPEG Streamclip...
    Here is a screenshot of the settings I am using in Sorenson :
    - I have changed many of the data rate settings as low as 3000 Kbps, and as high as 15,000 Kbps, and the end result looks essentially the same
    - The audio isn't a problem, so I'm not going to address that.
    - I have used the crop/deinterlace filter and also not used the filter, and it makes a big difference, so obviously it needs to be deinterlaced.
    From there I will get the .m2v file and the .m2a file, and then mux those with MPEG Streamclip.
    So, I have done 8 different Pre-sets all with various settings playing primarily with the data rate, and the method from 2-pass vbr all the way to 1-pass cbr.
    So again, my end result that is playing back on the windows 7 box (the specs that are listed above) looks to be heavily compressed and pixelation occurs.
    - I have also done the exact same with Apple's Compressor, and have gotten better results muxing while compressing, however the end result still tends to be the same, however the end result is much better. I have gone through 8 or so different compression export settings, and just overall still have the same issue.
    Any help would be greatly appreciated!
    Thanks,
    Crawford and Luke
    LKC Creative, LLC.
    [email protected]

    You are using a custom layout so my directions don't make any sense...
    For the future, you can set this up in DVD SP's Preferences:
    Using the Standard window layout the things to play with would be like the screenshot below:

Maybe you are looking for

  • How do I find out wich jre an already installed iWS6SP2 installation uses?

    Our systems (sun netras with Solaris8) have several java runtimes installed. JDK 1.3.1 resides in /usr/j2se JDK 1.2.2 resides in /usr/java1.2 /usr/java is a link to /usr/java1.2 When I installed iWS 6.0SP1 I had the install skip the java runtime inst

  • Passing TABLE NAME as parameter is possible or not?

    I want develop a small/simple report like this TABLE NAME : WHERE : ORDER BY : QUERY ROWS In the above model i want to pass all the three (TABLE NAME,WHERE and ORDER BY) as a parameter. My doubt, is that possible to pass TABLE NAME as a parameter? If

  • How to get a name of the current marker?

    I have two director files with same identical marker names (2 language versions). How I can make a button that changes the language (goes to the same marker of the other file). Something like... go to "current marker name here" of movie "language_2".

  • Equivalent of SYSDATE function in SAP MDX

    For scheduling a web intelligence report, we will have to build a logic in the report or universe to automatically refresh the report for last week or last month or last year as per the requirement. For this, is any one aware of an  MDX function equi

  • Slideshows and Windows Media Player

    I'm using Windows Media Player to go through a manually controlled slide show. Are there any keyboard shortcuts to advance and reverse?