MouseMotionListener  doubt  Please correct this small program

Write an applet to draw a red curve on a blue back ground which follows your cursor.
Use anonymous inner classes.
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
<applet code="Curve" width=200 height=100>
</applet>
public class Curve extends Applet {
     int x, y;
     String msg = " ";
     public void init() {
          setBackground(Color.blue);
          setForeground(Color.red);
          addMouseMotionListener(new MouseMotionAdapter(){
               public void mouseMoved(MouseEvent me) {
                    msg = "*";
                    x = me.getX();
                    y = me.getY();
                    showStatus("x="+x+" "+"y="+y);
                    repaint(x, y, 1, 1);
     public void paint(Graphics g) {
          g.drawString(msg,x, y);
This program is not working as expected.

DOUBLE POST?
Reply here: http://forum.java.sun.com/thread.jspa?threadID=779055

Similar Messages

  • How would I set this small program to activate every 120 seconds?

    I have this small program that writes the value 0 to a file, but I want it to only activate every 120 seconds, so it doesn't take up a bunch of system resources by constantly running. Can I make it pause for 120 seconds, or set a timer for it, in such a way that it won't make my PC run slow? Here's my code. Thanks if you can help.
    import java.util.*;
    import java.io.*;
    import java.io.File;
    public class Purge extends Random implements Serializable {
         public Purge () {
              writePrimDoubles();
         public static void main (String [] args) {
              Purge test = new Purge();
         public void writePrimDoubles() {
              DataOutputStream outStream;
              long timerStart;
              long timerEnd;
              long size;
              int a = 1;
              try     {          
                   while (a==1) {
                        outStream = new DataOutputStream
                             (new FileOutputStream("packetlog.txt"));
                        timerStart = System.currentTimeMillis();
                        outStream.writeBytes("0");
                        timerEnd = System.currentTimeMillis();
                        outStream.close();
              catch(IOException e) {
                   System.out.println("Error writing to file");
    }

    java.util.Timer, I think may do the trick.

  • When i try and open the auto cad Lt that i just downloaded i get this error The directory may be locked by another process or have been set Read Only. Directory: '/Users/hockaday' Please correct this problem and press OK to exit the application.

    i get this error why i try and open the auto cad that i just downloaded
    The directory may be locked by another process or have been set Read Only.
    Directory: '/Users/hockaday'
    Please correct this problem and press OK to exit the application.

    I did install it in the admin account.  Actually the computer has four accounts, one for my husband, where I installed it.  One for me which also is set to admin, one is called TEST and has nothing in it and one is guest user.
    I don't know how AutoCad is interfacing with the account.  That is why I am not sure what to do about it.  I read other threads in various places and some seemed to point to something having to do with having multiple users.  The solutions were not clear.  I was hoping someone else had this problem and could tell me what to do.  I tried apple support but no help.  I have not tried AutoCad yet as I assumed they wont help since this is a free educational version of their product.

  • Scope of list ALV not defined (please correct) in rm06bkps program

    hi experts,
    i have to add some fields in me5j t-code, for this i have copied the standard program as z prog. But at time of execution it gives an error
    "Scope of list ALV not defined (please correct)
    Message no. ME287"
    At the time of debugging i found gf_factory object is not filled, but im unable to trace that variable
    even i have searhed the same on SDN but the quetion is not answerd.
    please help me out ASAP.
    waiting for ur valuable replies..
    thanks in advance
    Neha

    i got the problem
    in fm
    ME_REP_GET_TABLE_MANAGER  -->   l_factory(object) -->im_service(variable)
    l_active = l_factory->is_active( im_service = l_service  im_scope = im_scope ).
    im_service  variable has programe name, im_scope has "ALV" . then it execution goes in case statement where it checks the im_service with standard prog name.
    as in case im_service has zprog, so it doesnt go to any when case and hence the prob.
    any sugesstion..?????
    Neha

  • Please correct this script

    Hello
    In this script i cant change resulution it will change default size 72 dpi when i chnage 300 dpi it cant work
    also it was not work in cs5 bridge app
    please help me
    #target bridge  
    if( BridgeTalk.appName == "bridge" ) { 
    var menu = MenuElement.find ('myBridgeMenu');
    if (menu == null){
    var newMenu = MenuElement.create( "menu", "Bridge", "before tools/ps", "myBridgeMenu" );
    WebPics = MenuElement.create( "command", "Bridge Processor", "at the end of myBridgeMenu",  "BridgeProcessor" );
    WebPics.onSelect = function () {
       WebPictures();
    function WebPictures(){
    if(app.version.match(/^\d+/) < 2){
        alert("You need CS3 or better to use this script!");
        return;
    if($.os.match(/windows/gi)){
    var TemplateFolder = new Folder(Folder.userData.absoluteURI + "/Adobe/XMP/Metadata Templates");
    var Templates = TemplateFolder.getFiles("*.xmp");
    var TemplateNames =[];
    for(var d in Templates){TemplateNames.push(decodeURI(Templates[d].name.toString().replace(/\.xmp$/i,'' )));}
    var PrefsFile = File(Folder.userData +"/BridgePrefs.dat");
    var Prefs = {};
    if(!PrefsFile.exists){
        Prefs.folder = decodeURI(app.document.presentationPath);
        Prefs.Width = 900;
        Prefs.Height = 800; 
        Prefs.quality = 79;
        Prefs.type = 0;
        if($.os.match(/windows/gi)){
        Prefs.template = 0;
        }else{
    PrefsFile.open('r');
    Prefs = eval(PrefsFile.read());
    PrefsFile.close();
    if($.os.match(/windows/gi)){
    if(Prefs.template == null) Prefs.template = 0;
    if(Prefs.template == undefined) Prefs.template = 0;
    var win = new Window('dialog','Bridge Processor');
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
    g.backgroundColor = myBrush;
    win.alignChildren="row";
    win.g10 = win.add('group');
    win.g10.orientation = "row";
    win.title = win.g10.add('statictext',undefined,"Bridge Processor");
    win.title.helpTip="Written by Paul Riggott";
    win.title.alignment="bottom";
    var g = win.title.graphics;
    g.font = ScriptUI.newFont("Georgia","BOLDITALIC",26);
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.p1.alignChildren="fill";
    win.p2= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g3 =win.p2.add('group');
    win.g3.orientation = "row";
    win.g3.alignment="left";
    win.g3.rb1 = win.g3.add('radiobutton',undefined,'Use selected Files');
    win.g3.rb2 = win.g3.add('radiobutton',undefined,'Use files of Type');
    var FileExtensions = "DNG,PSD,PDD,JPEG,JPG,JPE,GIF,BMP,RLE,DIB,TIF,CRW,NEF,RAF,ORF,CIN,DPX,EPS,PS,FLM,PSB,EXR, PCX,PDP," +
    "PCD,RAW,PICT,PCT,PIC,PXR,PNG,TGA,VDA,ICB,VST,TIF,TIFF,WBM,DNG,SCT,PBM,CRW,CR2,DC2,DCR,NEF ,MOS,MRW,X3F,MOV";
    FileExtensions= FileExtensions.toUpperCase();
    FileExtensions = FileExtensions.split(",");
    FileExtensions= ReturnUniqueSortedList(FileExtensions);
    win.g3.dd1 = win.g3.add('dropdownlist',undefined,FileExtensions);
    try{
    win.g3.dd1.selection= Number(Prefs.type);
    }catch(e){win.g3.dd1.selection=0;};
    win.g3.rb1.value=true;
    win.g3.cb1 = win.g3.add('checkbox',undefined,'Use Subfolders');
    win.g3.dd1.enabled=false;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=false;
    win.g3.rb2.onClick = function(){
    win.g3.dd1.enabled=true;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=true;
    win.g3.rb1.onClick = function(){
    win.g3.dd1.enabled=false;
    win.g3.cb1.value=false;
    win.g3.cb1.enabled=false;
    win.p3= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g10a =win.p3.add('group');
    win.g10a.alignment="left";
    win.g10a.cb1 = win.g10a.add('checkbox',undefined,'Save to Same Location');
    win.g11 =win.p3.add('group');
    win.g11.spacing=10;
    win.g11.orientation = 'row';
    win.g11.alignment="left";
    win.g11.st1 = win.g11.add('statictext',undefined,'Output Folder :-');
    win.g11.st1.preferredSize=[200,20];
    win.g11.bu1 = win.g11.add('button',undefined,'Browse');
    win.g11.st1.alignment="left";
    win.g11a =win.p3.add('group');
    win.g11a.et1 = win.g11a.add('edittext');
    win.g11a.et1.preferredSize=[400,20];
    win.g11a.et1.enabled=false;
    if(Folder(Prefs.folder.exists)){
        win.g11a.et1.text =  decodeURI(Folder(Prefs.folder).fsName);
    if(Folder(Prefs.folder.exists)) outputFolder = Folder(Prefs.folder);
    win.g11.bu1.onClick=function(){  
         outputFolder = Folder.selectDialog("Please select the output folder",Prefs.folder);   
         if(outputFolder !=null) win.g11a.et1.text =  decodeURI(outputFolder.fsName);
    win.p4= win.p1.add("panel", undefined, undefined, {borderStyle:"black"});
    win.g12 =win.p4.add('group');
    win.g12.cb1 = win.g12.add('checkbox',undefined,'Use Fullsize JPEG');
    win.g12.cb1.helpTip="This can take a lot more time!";
    if($.os.match(/windows/gi)){
    win.g12.cb2 = win.g12.add('checkbox',undefined,'Set Resolution');
    win.g12.et1 = win.g12.add('edittext',undefined,'72');
    win.g12.et1.preferredSize=[100,20];
    win.g12.et1.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    win.g12.orientation = 'row';
    win.g12.alignment="left";
    win.g12.spacing=20;
    win.g12.cb2.onClick=function(){
        if(win.g12.cb2.value){
            win.g12.et1.enabled=true;
            }else{
                win.g12.et1.enabled=false;
    win.g12.cb2.onClick();
    win.g14 =win.p4.add('group');
    win.g14.spacing=0;
    win.g14.orientation = 'row';
    win.g14.alignment="left";
    win.g14.cb1 = win.g14.add('checkbox',undefined,"Fit Image");
    win.g14.cb1.preferredSize=[80,20];
    win.g14.st0 = win.g14.add('statictext',undefined,"W: ");
    win.g14.et1 = win.g14.add('edittext',undefined,'900');
    win.g14.et1.preferredSize=[50,20];
    win.g14.et1.enabled=false;
    win.g14.et1.text = Number(Prefs.Width);
    win.g14.st1 = win.g14.add('statictext',undefined,"px");
    win.g14.st1.preferredSize=[30,20]
    win.g14.st0a = win.g14.add('statictext',undefined,"H: ");
    win.g14.et1a = win.g14.add('edittext',undefined,'900');
    win.g14.et1a.preferredSize=[50,20];
    win.g14.et1a.enabled=false;
    win.g14.et1a.text = Number(Prefs.Height);
    win.g14.st1a = win.g14.add('statictext',undefined,"px");
    win.g14.st1a.preferredSize=[30,20]
    win.g14.st3 = win.g14.add('statictext',undefined,"Quality");
    win.g14.st3.preferredSize=[60,20];
    win.g14.dd1 = win.g14.add('dropdownlist');
    for(var a =1;a<101;a++){
        win.g14.dd1.add("item", a);
    win.g14.dd1.selection=Number(Prefs.quality);
    win.g14.et1.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    win.g14.et1a.onChanging = function() {
      if (this.text.match(/[^\d]/)) {
        this.text = this.text.replace(/[^\d]/g, '');
    if($.os.match(/windows/gi)){
    win.g18 =win.p4.add('group');
    win.g18.spacing=25;
    win.g18.orientation = 'row';
    win.g18.alignment="left";
    win.g18.cb1 = win.g18.add('checkbox',undefined,'Use Template');
    win.g18.dd1 = win.g18.add('dropdownlist',undefined,TemplateNames);
    if(Templates.length < 1) {
    win.g18.cb1.enabled=false;
    }else{
    win.g18.dd1.selection=Number(Prefs.template);
    win.g18.dd1.enabled=false;
    win.g18.cb1.onClick=function(){
        if(win.g18.cb1.value){
            win.g18.dd1.enabled=true;
            }else{
                win.g18.dd1.enabled=false;
    win.g14.cb1.onClick=function(){
       if( win.g14.cb1.value){
           win.g14.et1.enabled=true;
           win.g14.et1a.enabled=true;
           }else{
               win.g14.et1.enabled=false;
               win.g14.et1a.enabled=false;
    win.g50 =win.p4.add('group');
    win.g50.spacing=10;
    win.g50.orientation = 'row';
    win.g50.alignment="left";
    win.g50.st1 = win.g50.add('statictext',undefined,"FileName Options");
    var options = ["Document Name","Document Name with Prefix","Document Name with Suffix","Document Name with Sequence Number","New Name with Sequence Number"];
    win.g50.dd1 = win.g50.add('dropdownlist',undefined,options);
    win.g50.dd1.selection=0;
    win.g55 =win.p4.add('group');
    win.g55.spacing=10;
    win.g55.orientation = 'stack';
    win.g55.alignment="left";
    win.g55a =win.g55.add('group');
    win.g55a.spacing=10;
    win.g55a.alignment="left";
    win.g55a.st1 = win.g55a.add('statictext',undefined,"Prefix");
    win.g55a.et1 = win.g55a.add('edittext',undefined,"");
    win.g55a.et1.preferredSize=[250,20];
    win.g55a.visible=false;
    win.g55b =win.g55.add('group');
    win.g55b.spacing=10;
    win.g55b.alignment="left";
    win.g55b.st1 = win.g55b.add('statictext',undefined,"Suffix");
    win.g55b.et1 = win.g55b.add('edittext',undefined,"");
    win.g55b.et1.preferredSize=[250,20];
    win.g55b.visible=false;
    var numbers =[2,3,4,5,6,7,8,9,10];
    win.g55c =win.g55.add('group');
    win.g55c.spacing=10;
    win.g55c.alignment="left";
    win.g55c.st1 = win.g55c.add('statictext',undefined,"Sequence Number");
    win.g55c.et1 = win.g55c.add('edittext',undefined,"");
    win.g55c.et1.preferredSize=[50,20];
    win.g55c.st2 =win.g55c.add('statictext',undefined,'Length');
    win.g55c.dd1 =win.g55c.add('dropdownlist',undefined,numbers);
    win.g55c.dd1.selection=2;
    win.g55c.visible=false;
    win.g55c.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g55d =win.g55.add('group');
    win.g55d.spacing=10;
    win.g55d.st1 = win.g55d.add('statictext',undefined,"FileName");
    win.g55d.et1 = win.g55d.add('edittext',undefined,"");
    win.g55d.et1.preferredSize=[195,20];
    win.g55d.et2 = win.g55d.add('edittext',undefined,"");
    win.g55d.et2.preferredSize=[50,20];
    win.g55d.st2 =win.g55d.add('statictext',undefined,'length');
    win.g55d.dd1 =win.g55d.add('dropdownlist',undefined,numbers);
    win.g55d.dd1.selection=2;
    win.g55d.visible=false;
    win.g55d.et2.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g50.dd1.onChange = function(){
        switch(this.selection.index){
            case 0 : hideFields();checkSave();break;
            case 1 : hideFields();
            win.g55a.visible=true;
            break;
            case 2 : hideFields();
            win.g55b.visible=true;
            break;
            case 3 : hideFields();
            win.g55c.visible=true;
            break;
            case 4 : hideFields();
            win.g55d.visible=true;
            break;
            default : break;
    function hideFields(){
    win.g55a.visible=false;
    win.g55a.et1.text='';
    win.g55b.et1.text='';
    win.g55b.visible=false;
    win.g55c.visible=false;
    win.g55c.et1.text='1';
    win.g55d.visible=false;
    win.g55d.et1.text='';
    win.g55d.et2.text='1';
    win.g150 =win.p1.add('group');
    win.g150.spacing=10;
    win.g150.orientation = 'row';
    win.g150.alignment="top";
    win.g150.bu1 = win.g150.add('button',undefined,"Process");
    win.g150.bu1.preferredSize=[200,30];
    win.g150.bu2 = win.g150.add('button',undefined,"Cancel");
    win.g150.bu2.preferredSize=[200,30];
    win.g10a.cb1.onClick=function(){
        if(win.g10a.cb1.value){
            win.g11.bu1.enabled=false;
            win.g50.dd1.selection=4;
            }else{
                win.g11.bu1.enabled=true;
    function checkSave(){
        if(win.g10a.cb1.value){
            alert("Sorry this is not allowed as it could overwrite the document!\nPlease use another option");
            win.g50.dd1.selection=4;
            return;
    win.g150.bu1.onClick=function(){
        if(win.g11a.et1.text == ''){
            alert("No output folder has been selected!");
            return;
        if(Number(win.g14.et1.text) <10) {
            alert("Please enter a realistic Resize number!");
            return;
        if(Number(win.g14.et1a.text) <10) {
            alert("Please enter a realistic Resize number!");
            return;
        if(win.g50.dd1.selection.index == 1 && win.g55a.et1.text == ''){
            alert("No Prefix Has Been Entered!");
            win.g55a.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 2 && win.g55b.et1.text == ''){
            alert("No Suffix Has Been Entered!");
            win.g55b.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 3 && win.g55c.et1.text == ''){
            alert("No Sequence Number Has Been Entered!");
            win.g55c.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 4 && win.g55d.et1.text == ''){
            alert("No File Name Has Been Entered!");
            win.g55d.et1.active=true;
            return;
        if(win.g50.dd1.selection.index == 4 && win.g55d.et2.text == ''){
            alert("No Sequence Number Has Been Entered!");
            win.g55d.et2.active=true;
            return;
    Prefs.folder = decodeURI(outputFolder);
    Prefs.Width = Number(win.g14.et1.text);
    Prefs.Height = Number(win.g14.et1a.text);
    Prefs.quality = parseInt(win.g14.dd1.selection.index);
    Prefs.type= parseInt(win.g3.dd1.selection.index);
    if($.os.match(/windows/gi)){
    if(Templates.length > 0) {
    Prefs.template = parseInt(win.g18.dd1.selection.index);
    PrefsFile.open('w');
    PrefsFile.write(Prefs.toSource());
    PrefsFile.close();
        win.close(1);
        process();
    win.center();
    result = win.show();
    function process(){
    var folders =[];
    if(win.g3.cb1.value){
    var topLevel = Folder(app.document.presentationPath);   
    folders = FindAllFolders(topLevel, folders);
    folders.unshift(topLevel);
    var Quality = parseInt(win.g14.dd1.selection.index);
    var ResizeW = Number(win.g14.et1.text);
    var ResizeH = Number(win.g14.et1a.text);
    var sels =[];
    Count = 0;
    mask = win.g3.dd1.selection.text.toLowerCase();
    if(win.g3.rb1.value) {
        sels = app.document.selections;
       processSels();
    if(!win.g3.rb1.value &&  !win.g3.cb1.value){
    app.document.deselectAll();  
    sels = app.document.getSelection(mask);
    processSels();
    if(!win.g3.rb1.value &&  win.g3.cb1.value){//use subfolders
    mask = "*."+ win.g3.dd1.selection.text.toLowerCase();
    for(var k in folders){
    sels = folders[k].getFiles(mask);
    processSels();
    function processSels(){
    for(var z  in sels){
    var Thumb1 = new Thumbnail(sels[z]);
    Name = decodeURI(Thumb1.spec.name).replace(/\.[^\.]+$/, '');
    var Seq1 = zeroPad((Number(Count)+Number(win.g55c.et1.text)), (parseInt(win.g55c.dd1.selection.index)+2));
    var Seq2 = zeroPad((Number(Count)+Number(win.g55d.et2.text)), (parseInt(win.g55d.dd1.selection.index)+2));
    var Prefix = win.g55a.et1.text;
    var Suffix = win.g55b.et1.text;
    var NewName = win.g55d.et1.text;
    app.synchronousMode = true;
    if(win.g12.cb1.value){
    Thumb1.core.fullsize.fullsize;
    }else{
        Thumb1.core.preview.preview;
    app.synchronousMode = false;
    var md = Thumb1.synchronousMetadata;
    md.namespace = "http://ns.adobe.com/tiff/1.0/";
    var orientation = md.Orientation.replace(/(\w+)(\s+)(.)(\d+)(.)/,"$3$4");
    orientation = orientation.replace(/°/,'');
    orientation = orientation.replace(/Rotate/,'');
    if(orientation == 'Normal') orientation =0;
    var bm = undefined;
    if(win.g12.cb1.value){
    bm = Thumb1.core.fullsize.fullsize;
    }else{
        bm = Thumb1.core.preview.preview;
    if(bm.width != undefined) bm = bm.rotate(orientation);
    if(win.g14.cb1.value){
    if(bm.width > bm.height){
    var maxSize = Math.max(bm.height,bm.width);
    var minSize =Math.min(ResizeW,maxSize);
    if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
    }else{
        var maxSize = Math.max(bm.height,bm.width);
        var minSize =Math.min(ResizeH,maxSize);
    if(minSize < maxSize) bm = bm.resize(minSize,BitmapData.bicubicSharper);
    var parts = Thumb1.name.match(/(.*)\.([^\.]+)/); 
    switch(Number(win.g50.dd1.selection.index)){
        case 0 : saveFile =  Name; break;
        case 1 : saveFile =  Prefix + Name; break;
        case 2 : saveFile =  Name + Suffix; break;
        case 3 : saveFile =  Name + Seq1; break;
        case 4 : saveFile =  NewName + Seq2; break;
        default : break;
    if(win.g10a.cb1.value) outputFolder =app.document.presentationPath;
    bm.exportTo(new File(outputFolder +"/"+ saveFile +".jpg"),(Quality+1));
    Count++;
    if($.os.match(/windows/gi)){
    if(win.g12.cb2.value){//set resolution
    var res = Number(win.g12.et1.text);
    var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
    var mdata = t.synchronousMetadata;
    mdata.namespace = "http://ns.adobe.com/tiff/1.0/";
    mdata.XResolution =res*1000 +"/1000";
    mdata.YResolution =res*1000 +"/1000";
    mdata.ResolutionUnit =1;
    if(win.g18.cb1.value){
    var t = new Thumbnail(new File(outputFolder +"/"+ saveFile +".jpg"));
    var mdata = t.synchronousMetadata;
    mdata.applyMetadataTemplate(win.g18.dd1.selection.text, "replace");
        if(result == 1) alert("All done!");
    function ReturnUniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;
    for (var ki in unduped) {
       uniques.push(unduped[ki]);
    uniques.sort();
    return uniques;
    function FindAllFolders( srcFolderStr, destArray) {
        var fileFolderArray = Folder( srcFolderStr ).getFiles();
        for ( var i = 0; i < fileFolderArray.length; i++ ) {
            var fileFoldObj = fileFolderArray[i];
            if ( fileFoldObj instanceof File ) {           
            } else {
             destArray.push( Folder(fileFoldObj) );
            FindAllFolders( fileFoldObj.toString(), destArray );
        return destArray;
    function zeroPad(n, s) {
    n = n.toString();
    while (n.length < s) n = '0' + n;
    return n;

    The latest version is here:-
    http://www.scriptsrus.talktalk.net/BridgeProcessor.htm
    This is WINDOWS ONLY, this script will NOT work on a Mac!

  • Please correct this

    select a. b_name, b.VESSEL ,b.vessel_date, sum(nvl(b.qty,0)) Econt_QTY,
         x.b_name,y.vessel,y.vessel_date, sum(nvl(y.iqty,0)) Issue_qty
                             from mol_exp a, sub_mol_exp b,
                             mol_issue x , sub_mol_issue y
    where a.mexp_no = b.mexp_no
         and x.alcexp_no = y.alcexp_no
         and b.vessel = y.vessel
    group by a. b_name, b.VESSEL ,b.vessel_date,
              x.b_name,y.vessel,y.vessel_date
    --b.qty = 1000
    -- y.iqty = 500 but it is showin 1000 any one guid me why it is happning.

    your 2nd query is working but it is also adding quantity 2 times.
    actual quantity I have 202 but returning 404.
    no doubt you people are very intelligen dont have data and solving my problem
    Thank you so much all of you.
    I used this cursor in when button press trigger now it is working fine
    DECLARE
         CURSOR repo
         IS
    select a. b_name,a.p_name, b.VESSEL , sum(nvl(qty,0)) EXP_QTY from mol_exp a, sub_mol_exp b
    where a.mexp_no = b.mexp_no
    group by a. b_name,b.vessel, a.p_name;
    V_b_name               mol_exp.b_name%TYPE;
    v_p_name               mol_exp.p_name%type;
    v_vessel               sub_mol_exp.vessel%type;
    v_C_qty                    sub_mol_exp.qty%type;
         BEGIN
    OPEN repo;
    LOOP
         FETCH repo INTO v_b_name,v_p_name,v_vessel,v_c_qty;
    EXIT WHEN repo%NOTFOUND;
                                  insert into exp_report (buyer, p_name, vessel, cont_qty)
                                       values (v_b_name, v_p_name, v_vessel , v_c_qty);
    END LOOP;
         CLOSE repo;
         END;
         --- Export (Issue)
    DECLARE
         CURSOR repo
         IS
    select a.b_name,a.p_name,b.vessel,b.vessel_date, sum(nvl(iqty,0)) Issue_qty from mol_issue a , sub_mol_issue b
    where a.alcexp_no = b.alcexp_no
    group by a.b_name,b.vessel,b.vessel_date,a.p_name;
    V_b_name               mol_issue.b_name%TYPE;
    v_p_name               mol_issue.p_name%type;
    v_vessel               sub_mol_issue.vessel%type;
    v_vessel_date     sub_mol_issue.vessel_date%type;
    v_e_qty                    sub_mol_issue.iqty%type;
         BEGIN
    OPEN repo;
    LOOP
         FETCH repo INTO v_b_name, v_p_name, v_vessel, v_vessel_date, v_e_qty;
    EXIT WHEN repo%NOTFOUND;
                                  update exp_report set vessel_date = v_vessel_date, exp_qty = nvl(v_e_qty,0)
                                  where vessel= v_vessel;
    END LOOP;
         CLOSE repo;
         END;
    Edited by: Kami on Sep 21, 2008 10:34 PM

  • Updated my iPhone5 to the latest version and now I cannot receive email.  Please correct this update.

    Anyone else have this problem..... Help please

    Did that... Still nothing. The only time I can receive email it after I reboot the phone. But that only works once,  After that I can't receive anything. Until i reboot the phone again? After that I get the circle of death.
    Any other ideas?

  • What recordset now called can somebody please correct this code? MIchael Horton

    Private Sub ShowRecord_Click()
    Dim rst As DAO.Recordset
    Set rst = [Forms]![Assets].RecordsetClone
    rst.FindFirst "InvestID=" & List2
    [Forms]![Assets].Bookmark = rst.Bookmark
    DoCmd.Close acForm, "GoToRecordDialog"
    End Sub

    You can cater for Nulls by executing the code conditionally.  Also it's advisable to examine the NoMatch property before synchronizing the bookmarks, e.g.
    Const MESSAGETEXT1 = "No asset selected."
    Const MESSAGETEXT2 = "No matching record found."
    Dim frm as Form
    Set frm = Forms("Assets")
    If Not IsNull(Me.List2) Then
       With frm.RecordsetClone
           .FindFirst "InvestID = " & Me.List2
           If Not .NoMatch Then
               frm.Bookmark = .Bookmark
               DoCmd.Close acForm, Me.Name
           Else
               MsgBox MESSAGETEXT2, vbInformation, "Warning"
           End if
        End With
    Else
        MsgBox MESSAGETEXT1, vbExclamation, "Invalid Operation"
    End If
    This does assume of course that the list box's bound column is that containing the InvestID values.
    PS:  It also assumes that the list box is not a multi-select control.
    Ken Sheridan, Stafford, England

  • How can Firefox state that it is going to discontinue support for 3.6.17 when Mac OS 10.4.X cannot accept Firefox 4? This whole situation is crazy. Someone at Firefox please correct this insanity.

    WE cannot download Firefox 4 because it is not compatible with Mac OS 10.4.11.

    There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox

  • Any one  please correct  this code it is not giving the result as expected.

    class image {
         public int[][] data;
         public int rows;
         public int columns;
    public class BlurImage {
    public int function1(image i1,int k,int j,int rad)
                   int sum=0;
                   int count=0;
                   int R=0,G=0,B=0;
                   String s=new String();
                   for(int x=k-rad;x<=k+rad;x++)
                        if(x<0 || x>=i1.rows)
                             continue;
    for(int y=j-rad;y<=j+rad;y++)
                             if(y<0 || y>=i1.columns)
                                  continue;
    s=Integer.toHexString(i1.data[x][y]).substring(4,6);
                             B=B+Integer.valueOf(s, 16).intValue();
                             s=Integer.toHexString(i1.data[x][y]).substring(2,4);
                             G=G+Integer.valueOf(s, 16).intValue();
                             s=Integer.toHexString(i1.data[x][y]).substring(0,2);
                             R=R+Integer.valueOf(s, 16).intValue();
    count++;
                   R=R/count;
                   G=G/count;
                   B=B/count;
                   System.out.println(" ");
                   String s1=new String();
                   s1=Integer.toHexString(R).concat(Integer.toHexString(G));
                   s1=s1.concat(Integer.toHexString(B));
                   System.out.println(Integer.valueOf(s1, 16).intValue()+" ");
                   return Integer.valueOf(s1, 16).intValue();
    public image blur_image(image i, int radius) {
              //Write your code here
              if(i.rows<radius || i.columns<radius)
                   return null;
              image i1 = new image();
              i1.rows=i.rows;
              i1.columns=i.columns;
              i1.data=new int[i.rows+1][i.columns+1];
              for (int k = 0; k < i.rows; k++)
              for (int j = 0; j < i.columns; j++)
                        if(i.data[k][j]>0xFFFFFF)
                             return null;
                        i1.data[k][j]=(int)function1(i,k,j,radius);
              return i1;
    public static void main(String[] args) {
    //TestCase 1
    try {
    image i = new image();
    i.rows = 5;
    i.columns = 3;
    i.data = new int[][]{{6, 12, 18}, {5, 11, 17}, {4, 10, 16}, {3, 9, 15}, {2, 8, 14}};
    BlurImage obj = new BlurImage();
    image res = obj.blur_image(i, 2);
    System.out.println("TestCase 1");
    if (res != null) {
    for (int k = 0; k < i.rows; k++) {
    System.out.println();
    for (int j = 0; j < i.columns; j++) {
    System.out.print(res.data[k][j] + ",");
    } else
    System.out.println("NULL");
    catch (Exception e) {
                   e.printStackTrace();
    //TestCase 2
    try {
    image i = new image();
    i.rows = 3;
    i.columns = 5;
    i.data = new int[][]{{0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038},
    {0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038},
    {0x5a0060, 0x6a0050, 0x6a0050, 0x6a0050, 0x7f0038}};
    BlurImage obj = new BlurImage();
    image res = obj.blur_image(i, 1);
    System.out.println("\nTestCase 2");
    if (res != null) {
    for (int k = 0; k < i.rows; k++) {
    System.out.println();
    for (int j = 0; j < i.columns; j++) {
    System.out.print(Integer.toHexString(res.data[k][j])+ ",");
    } else
    System.out.println("NULL");
    catch (Exception e) {
    e.printStackTrace();
    It should give the output as:------
    test case 1:-
    [ 11, 11, 11 ]
    [ 10, 10, 10 ]
    output.data = [ 10, 10, 10 ]
    [ 9,    9,   9  ]
    [ 9,    9,   9  ]
    test case 2:-
    [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]
    output.data = [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]
    [ 0x620058, 0x640055, 0x6a0050, 0x710048, 0x740044 ]

    public class Test
         public static void main(String args[])
              throws Exception
              System.out.println("[ 10, 10, 10 ]");
    }I'll let you customize the above code for test case 2.
    There is not a single comment in the code. We have no idea what the code is supposed to do. We have no idea what you think is wrong. Therefore the above solution is the best we can provide.

  • Dear All, thanks in advance i have one doubt please clarify this  what it is can we delete the payroll result in production client .yes we can delete the payroll result by PU01 Tcode .But my question is

    what are the scenarios we delete the payroll results ,can we suggest the client to delete the payroll result.

    Hi,
    I would not recommend that you delete the payroll results. What is your issue? Can you provide more background, there may be other options...
    Will

  • The print is too small on various web sites that I open. How can I correct this?

    The print is too small on various web sites that I open. This has never happened on older Firefox versions. How can I correct this so every page I open, the print size is consistent and legible? I don't want to change it every time I open a new site.

    Hi Donna,
    Welcome to the HP Community Forum.
    Font Size and the scale (size) at which a document is printed is controlled within the application just before the job is sent to the printer -  this means the size is set from your browser (Firefox, Internet Explorer) or perhaps your Editor (Word).  Generally speaking, most applications use Print Preview -- or a variation of that program under a different name.
    An explanation and the use of Print Preview is avialble in the following document:
    Change Print Size with Print Preview
    Click the Kudos Thumbs-Up to show you appreciate the help.
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Click Accept as Solution when the Answer provides a Fix or Workaround!
    Kind Regards,
    Dragon-Fur

  • I AM STRUGGLINT TO ACCESS MY IPHOTO'S AND HAVE TO GO THROUGH APPLICATIONS TO ACCESS MY PHOTOS. HOW CAN I CORRECT THIS PLEASE. DOES THE MAC HAVE A DEFRAG?  TX

    I am having problems viewing my iPhoto from the dock and have to go through my applications to view. What do I have to do to correct this please? Also does the Mac have a defrag function? I have also been advised by the sales person that the Mac does not need an antivirus programme, is this true?

    I'm sorry but your post make no sense
    first off All Caps is not necessary and makes things hard to read and is consider shouting - it is rude
    Second you do not have "an iPhoto" - iPhoto is an application that manages photos - the photos are stored (by default) in the iPhoto library in a SQL lite database and you use the iPhoto program to manage them
    I am having problems viewing my iPhoto from the dock and have to go through my applications to view.
    can you please explain this in some detail. When you launch iPhoto by clicking on the iPhoto icon in the Dock what happens?
    As to your other OS questions this is certainly not hte best place to address them - we are iPhoto users just like yourself here  ---  basically as I understand it (and I have had had Macs for 30+ years) there is no "defrag and you do not need one - and antivirus is your choice - most people feel it is a waste of money on a Mac but some like to have it
    LN

  • When using text edit, the font as it appears on the screen is ok, but when I print, it is much smaller on the paper than the chosen font size. How do I correct this?

    When using TextEdit, the font as it appears on the screen is ok, but after printing, the font is much smaller on the paper than the chosen size. (in this case 14)
    How do I correct this?

    Hi Corel
    Thank you for your reply
    However I need the lower case version for some sites and the upper case version for the site in question? To make matters worse this site does not allow you to change your log on name unless it is in the form of an e-mail address
    So what I need is Kostas for this site and kostas saved for other sites and allow me to choose which one I want to use
    How do I do this please
    I have no bother with this on Win Internet Explorer but I like Firefox
    Mind it may be as simple as deleting The appropriate entry and resetting with Kostas instead of kostas?
    But I would appreciate knowing the correct solution from an expert

  • I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    I can't forcequit firefox and shutdown my computer, nor can I open up any other programs or applications. Does anyone know how to fix this? please help this poor soul.

    You can force quit applications
    >Force quit
    if that does not work you can force quit a computer shut down by hold the power button for an extended period.

Maybe you are looking for

  • Printing report on AIX

    Hi, For printing the report on windows machine iam using following code which executes perfectly. String userId =      "atl3_dev_jul04/atl3_dev_jul04@MGI"; String printer ="\""+"\\\\VIJAYAKRISHNA\\HP LaserJet 5100 PCL 6"+"\"";      Runtime rt = Runti

  • Music Wont Play

    About 5 days ago for no apparent reason at all, about 7000 songs which i have collected over a number of years has just decided that it wont play in ITUNES or in any other of my media players. When you click on Play over a song nothing happens. The p

  • PIR consumption

    Please suggest me with effective planning. I have a FG "A" having phantom A_PHAN which has a component "B" (planning strategy 70). when i plan for B, lets say i entered 600 qty in a planning table for 12/2010. now i got a sales order with 2 schedules

  • Custom OA page deployment

    I have developed a custom OA PG.xml. The package structure is like /company/oracle/apps/cappl/module/webui/TestPG.xml. And I have <$CAPPL_TOP> ($APPL_TOP/serv/11.5.10/caapl without including company identifier in its folder structure) in the server.

  • Multiple IMAP-accounts in Mutt.

    I have been struggling with Mutt for a while now. It works as it should when only working with one IMAP-account, but if I add more, only the last one is active. I have searched the manual about it but it is quite cryptic for me. I can use offlineimap