Urgent help with If statement please!

HI Everyone
Was wondering if anyone can tell me why flash seems to be
ignoring my If Statements, every time I try to use one it ignores
the condition and just actions the command. Its driving me crazy.
I'm sure I must be doing something wrong I just can't work it out.
I've put;
on (release) {
if ((_root.eyeshadow = "Pink") && (_root.lipy =
"Pink")) {
_root.correct._alpha =100;
It seems to just action the _root.correct._alpha = 100;
even when a different colour is selected.
I was wondering can flash read a variable from another
script, because if not it will not know what eyeshadow and lipy
are. I dont get any error messages though.
Please help somebody!
Thank you,
Stacy.x.

Thank you that appears to have made the if statement work,
but now i have another problem.
It doesn't seem to acknowledge wether these selections have
been selected.
I have put in the code for the pink eyeshadow;
on (release) {
_root.eyeshadow2._alpha =0;
_root.eyeshadow1._alpha = 100;
eyeshadow == "Pink";
the same code is in all the other selections, with the name
variations.
any ideas?
.x.

Similar Messages

  • Help with If statement please

    Hi,
    First Special thanks to Kglad for the help with the AS1 to AS3 conversion.
    I've been able to link up my buttons to play a different frames of the movie. this was my novice way of finally getting the programming to work.
    In frame 95 I have
    var myLoader:Loader = new Loader();
    addChild(myLoader); var url:URLRequest = new URLRequest("page1.swf");
    myLoader.load(url);
    in frame 165:
    var myLoader1:Loader = new Loader();
    addChild(myLoader1); var url1:URLRequest = new URLRequest("page1.swf");
    myLoader1.load(url1);
    My buttons link to 116 which plays a frame and loads ^
    in frame 226: removeChild(myLoader).
    But if the user has looped back into home from another part in the movie clip then it would need to remove myLoader1 instead of myLoader.
    I'm guessing there is some really dynamic way to solve the programatic nightmare i'm developing, but I'm really novice.
    So what i need is an if statement for frame 226
    That would do something:
    if(myLoader <> null
         removeChild(myLoader)
    else(
    removechild(myLoader1)
    Anyone have a method for this?

    yes, you can use the same urlrequest but just change its url property:
    // initialize, for example in frame 1.  this is done once and never again:
    var loader:Loader=new Loader();
    var urlR:URLRequest=new URLRequest();
    //  then in frame 2, for example:
    urlR.url="page1.swf";
    loader.load(urlR);
    //  in frame 20, for example:
    urlR.url="page2.swf";
    loader.load(urlR);
    // in frame 30, for example:
    urlR.url="page3.swf";
    loader.load(urlR);
    //etc.  if you're loading any swfs that play streams (sound or video), you'll want to add some code to this.

  • Help with SQL statements please.... URGENT PLEASE!!!!

    I have 2 Tables
    TABLE_NAME COLUMN_NAME DATA_TYPE
    TASTEWINE TWDATE DATE
    TASTEWINE BIN NUMBER
    TASTEWINE QUANTITY NUMBER
    TASTING TDATE DATE
    TASTING PLACE VARCHAR2
    a) Table TASTING has 2 columns.... TDATE( date Tasting was Held) and PLACE ( locations at which Tasting was held)
    b) Table TASTEWINE has 3 Columns.............. TWDATE( wine tasting date, BIN( ID number for type of wine that was tasted), AND QUANTITY( quantity of win consumed by bottles)
    Here is the QUestion.... I am having a hard time figuring out how to connect those two tables based on this information .. What I want to do is this.....select the total number of bottles of wine served at each wine-tasting, but only for the second half of the year 1999, and I want to see not only the date and total bottles served, but also the location where the wine-tasting took place. I also want to display the date, the place, and total quantity.
    Can Anyone please Help me??

    Hi,
    Your query works fine - as well as the one mentioned by Alok. I have tired it with some sample values, and both show the same results:-
    The two tables :-
    CREATE TABLE TASTEWINE
         TWDATE     DATE,
         BIN     NUMBER,
         QUANTITY NUMBER
    CREATE TABLE TASTING
         TDATE DATE,
         PLACE VARCHAR2(100)
    );Rows in the Tables:-
    INSERT INTO TASTEWINE VALUES (TO_DATE('01/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('02/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('03/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('04/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('05/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('06/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('07/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('08/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('09/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('10/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('11/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('12/12/1999','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('01/12/2000','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('02/12/2000','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('03/12/2000','MM/DD/YYYY'),1,100);
    INSERT INTO TASTEWINE VALUES (TO_DATE('04/12/2000','MM/DD/YYYY'),1,100);
    COMMIT;
    INSERT INTO TASTING VALUES (TO_DATE('01/12/1999','MM/DD/YYYY'),'SEATTLE');
    INSERT INTO TASTING VALUES (TO_DATE('02/12/1999','MM/DD/YYYY'),'SAN FRANSICO');
    INSERT INTO TASTING VALUES (TO_DATE('03/12/1999','MM/DD/YYYY'),'DENVER');
    INSERT INTO TASTING VALUES (TO_DATE('04/12/1999','MM/DD/YYYY'),'AUSTIN');
    INSERT INTO TASTING VALUES (TO_DATE('05/12/1999','MM/DD/YYYY'),'SALT LAKE CITY');
    INSERT INTO TASTING VALUES (TO_DATE('06/12/1999','MM/DD/YYYY'),'LOS ANGLES');
    INSERT INTO TASTING VALUES (TO_DATE('07/12/1999','MM/DD/YYYY'),'PORTLAND');
    INSERT INTO TASTING VALUES (TO_DATE('08/12/1999','MM/DD/YYYY'),'NEW YORK');
    INSERT INTO TASTING VALUES (TO_DATE('09/12/1999','MM/DD/YYYY'),'NEWARK');
    INSERT INTO TASTING VALUES (TO_DATE('10/12/1999','MM/DD/YYYY'),'EL PASO');
    INSERT INTO TASTING VALUES (TO_DATE('11/12/1999','MM/DD/YYYY'),'AUSTIN');
    INSERT INTO TASTING VALUES (TO_DATE('12/12/1999','MM/DD/YYYY'),'CHICAGO');
    INSERT INTO TASTING VALUES (TO_DATE('01/12/2000','MM/DD/YYYY'),'ATLANTA');
    INSERT INTO TASTING VALUES (TO_DATE('02/12/2000','MM/DD/YYYY'),'HOLLYWOOD');
    INSERT INTO TASTING VALUES (TO_DATE('03/12/2000','MM/DD/YYYY'),'');
    INSERT INTO TASTING VALUES (TO_DATE('04/12/2000','MM/DD/YYYY'),'SEATTLE');
    COMMIT;The First Query :-
    SELECT
         A.TWDATE,
         B.PLACE,
         SUM(A.QUANTITY)
    FROM
         TASTEWINE     A,
         TASTING          B
    WHERE
              A.TWDATE = B.TDATE
         AND     B.TDATE > TO_DATE('01/07/1999', 'DD/MM/YYYY')
         AND     B.TDATE < TO_DATE('01/01/2000', 'DD/MM/YYYY')
    GROUP BY
         A.TWDATE,
         B.PLACE;The Second Query :-
    SELECT
         A.TWDATE,
         B.PLACE,
         SUM(A.QUANTITY)
    FROM
         TASTEWINE     A,
         TASTING          B
    WHERE
              A.TWDATE = B.TDATE
         AND     B.TDATE
                   BETWEEN
                        TO_DATE('01/07/1999', 'DD/MM/YYYY')      AND
                        TO_DATE('01/01/2000', 'DD/MM/YYYY')
    GROUP BY
         A.TWDATE,
         B.PLACE;Regards,
    Sandeep

  • Need help with If statement Please

    Hi guys,
    This is my first time posting and sorry if for some reason i post incorrectly.
    I am having trouble figuring out what I am doing with my if Statement and why the compiler is giving me an error which says 'cannot find symbol';
    Just incase you need to see the code here it is. And please any pointers would help me get back on track. And please dont laugh at the novice code i just started^^;
    import java.util.*;
    import java.text.*;
    public class Student
         public static void main(String[]args)
         Scanner scan=new Scanner(System.in);
         double std1, std2, std3, num1, num2, num3, num4;
         String a, answer1, name1;
    System.out.println("Welcome to _____ program, press any button to continue: ")
    a=scan.nextLine();
    System.out.println("Good, would you like to enter a grade for a student(y/n)?");
    answer1=scan.nextLine();
    if (answer1 == y)
         System.out.println("Please enter the students name ");
                             name1=scan.nextLine();
                             System.out.println("Please label the test number ");
                             num1=scan.nextDouble();
                             System.out.println("Please enter the grade, "+name1+" recieved");
    std1=scan.nextDouble();
    if (answer1==n)
         System.out.println("Thank you for trying my program ");
    else
    System.out.println("It's obvious you couldn't follow a simple direction good bye ");

    Thanks Flounder,
    I'll keep in mind to edit the code the way you told me too.
    As far as the code goes, what do you mean 'y' is not a string and should be a variable. All I'm trying to do is give a true false statement.
    For example
    if (input==y)
    System.out.println("________");
    And in my code it gives an error stating that y is a variable.
    I dont understand why.
    Thanks much for all your replies.

  • What is Happening,help with these stats please

    Well I have checked my router system logs and for the second day,it looks like the router is disconecting to the exchange at the same time each day,and also if you look at the path it says "0",not interleave or fast,this has only started to happen,if this continues then I will end up with ip profile probs again
    Any ideas please.......just to add it is doing it at exactly the same time @ 05:42
    Jul 12 05:42:38  user  kernel: Line 0: ADSL link down  Jul 12 05:42:38  user  syslog: tc qdisc del dev ppp_0_0_38_1 root 2>/dev/null  Jul 12 05:42:40  daemon  pppd[458]: Terminating connection due to link down.  Jul 12 05:42:59  user  kernel: Line 0: xDSL G.994 training  Jul 12 05:43:08  user  kernel: Line 0: ADSL G.992 started  Jul 12 05:43:13  user  kernel: Line 0: ADSL G.992 channel analysis  Jul 12 05:43:19  user  kernel: Line 0: ADSL G.992 message exchange  Jul 12 05:43:20  user  kernel: Line 0: ADSL link down  Jul 12 05:43:25  user  kernel: Line 0: xDSL G.994 training  Jul 12 05:43:34  user  kernel: Line 0: ADSL G.992 started  Jul 12 05:43:38  user  kernel: Line 0: ADSL G.992 channel analysis  Jul 12 05:43:44  user  kernel: Line 0: ADSL link up, Path 0, us=864, ds=19208  Jul 12 05:43:46  daemon  pppd[458]: Clear IP addresses.  Connection DOWN. 

    Just to add,the speedtester results are still OK.
    Test1 comprises of two tests
    1. Best Effort Test:  -provides background information.
    Download  Speed
    14186 Kbps
    0 Kbps
    21000 Kbps
    Max Achievable Speed
     Download speedachieved during the test was - 14186 Kbps
     For your connection, the acceptable range of speeds is 4000-21000 Kbps.
     Additional Information:
     Your DSL Connection Rate :19208 Kbps(DOWN-STREAM), 864 Kbps(UP-STREAM)
     IP Profile for your line is - 16000 Kbps
    2. Upstream Test:  -provides background information.
    Upload Speed
    711 Kbps
    0 Kbps
    864 Kbps
    Max Achievable Speed
    >Upload speed achieved during the test was - 711 Kbps
     Additional Information:
     Upstream Rate IP profile on your line is - 864 Kbps

  • Help with access control please

    So I'm trying to set up my brother's PSP to the wirless network through MAC address timed access. What I want to do is make it so that he can only access it through certain times in the day. I'm having troubles with actually getting it to work. Everytime I set it up, the PSP only show's up as a DHCP client and not a Wireless client. I tried the option panel with the add wireless clients through the first try access. Could I get some help with this issue please? Thanks!

    Just to calm your fears... There is no conspiracy. If someone had an answer or a suggestion they would post it.

  • Need some URGENT help with 3 DVD mastering issues PLEASE! :

    Hi there,
    Firstly, I am running DVD SP 3.0.2 on Mac OS 10.4.7 on a G5 Dual 2 GHz 3Gb Ram plenty of HD space...
    I am creating a DVD with: An intro sequence, a main menu, 4 sub menus, and 4 sections with around 12 chapters each.
    I am having some big problems, and a pretty stuck. I will lest them separately below, numbered. If you are able to help, please refer clearly to which number you are helping with. Any help is MUCH appreciated! Many thanks!!
    1. Each of the 5 menus (1 main, 4 sub) have a background video, and a separate audio track. I added the background videos by simply dragging them to the assests panel, then from there onto the menu editor window. They are created in FCP and are properly encoded. However, when I click the motion button, or use the simulator, the videos do not show up. The music plays, but all i see is plain black.
    What is going on?!?!?!
    2. I am really struggling with rollover buttons. I have custom created buttons, and I wand them to have a soft red glow around them when hovered over. HOW ON EARTH DO I ACTUALLY DO THIS??
    The buttons are in photoshop so can be exported with/without background/glow in any format.
    3. Is it possible, once I have got the above rollover working, to have an image to the right hand side of my buttons which changes with the the button rollover. i.e. hover over button 1, see image 1. hover over button 2, image changes to image 2.
    PLEASE PLEASE give any help you can, I have a deadline coming up and am quite stumped. Thanks again!!

    I am still having problems regarding issue Number 1. PLEASE ANYONE HELP?!
    Sorry, I'm not sure about the motion menus. I avoid those whenever possible. But you might click on the menu in the storyline tab (whatever it's called -- the hierarchical view with the disc, tracks, slideshows, etc.) and look at the properties and see if there's anything you have to enable specifically for motion. And be sure the motion button is on on the main display/preview area, but it sounds like you already know how that works.
    For your information, here is a screen grab of the menu I am trying to create:
    http://www.redhavoc.co.uk/stuff/menu.jpg
    I think it is obvious that when a button is hovered over, I want it to glow red, and the image to the right will change to match the respective button.
    IS THIS GOING TO BE POSSIBLE????
    Yes.
    First, your menus have to be layered menus. Unfortunately, there's no way to convert non-layered menus to layered menus, so if you already have non-layered, you'll have to just delete them and create new layered menus. The button (and menu item) to create a layered menu should be right by the normal new-menu item.
    Next, the graphical work is all in Photoshop.
    Side tip: You may already know this, but I found it's best to use 640x480 for the Photoshop document. When I do text and leave it as a text object in the Photoshop file, it resizes poorly in DVDSP. So this ends up being another 720x480 vs. 640x480 square/rectangular pixel conversion thing. DVDSP plays in the 640x480 world, at least as far as the designer can see. So I keep my images at 640x480, and it doesn't have to resize, and everything looks right.
    Moving on... Set up your basic background, the part that won't change (or will have other things covering it, like for your square image).
    Then put in all the buttons and images you'll be using, each part in a separate layer. This could have fifteen buttons (you have five buttons, and there can be three versions for each -- inactive, selected, and activated versions) and five or six square images (you said one for each button, and you might want a blank default if, say, you want to add a "back" button on the menu and want some blank or default image for the square when they're on the "back" button).
    Sometimes people don't bother with a separate "active" button state, but you usually want some visual feedback that they clicked the button. Also, I usually just build the default (unselected) button into the background; that's less hassle later on, and it will just draw the selected or activated buttons over that when the user is on that button.
    Line up all your buttons and images. All the square images lined up perfectly on top of each other, all the buttons in the right places (so you'll have three buttons stacked on top of each other in each spot). Give each layer a short but quickly recognizable name, and line them up in a consistent order. (button1-default, button1-selected, button1-active, button1-squarepicture, then button2-default, ... etc.) Photoshop and DVDSP don't care, but it makes it easier for you later.
    Note that earlier versions of DVDSP won't show Photoshop layer effects. (They handle layers, just not the effects, like inner glow, outer bezel, etc.) I don't remember when they changed this, but I think it was version 4.something. So if you're using that method to make your buttons glow, you may have to flatten each selected or active button layer, and you may even need to create a dummy blank layer underneath it first to give it something to flatten onto.
    Save the file as a standard Photoshop file (.psd). Drag the file onto your DVDSP layered menu and set it as the background.
    Now, in DVDSP, create all your buttons. Just drag boxes over/around the button pictures you have. Feel free to make them extra-big; users won't see the actual area you've selected, and bigger areas makes it easier for people to hit them if they're using a mouse on a computer to watch the DVD. You can point the buttons to their targets now if you want, and set the end jumps on the tracks if you want. (I tend to set the end jumps on the tracks so they automatically select the button for the next track.)
    Now's the fun part, since it will actually hook everything up and should be easy if your naming layer order were consistent. Click on the layered menu (in that hierarchical view) and look at the properties window. (Sorry I can't remember the technical names for all these windows; I'm doing this all from memory. So feel free to ask more questions if you can't find what I'm talking about.) One of the properties tabs should have a grid of checkboxes with a list of your layers. Make sure the background is checked for all of the states. Then check the layers you want to show for each button state, as well as the corresponding square image to show for each.
    Again, I'm doing this from memory, and I can't remember exactly how things are listed in that grid. But I remember it keeps your layers in the same order you put them in the Photoshop file and shows you those names, so it should make it easy to go down the list and check the right boxes.
    And another side tip: You can update the Photoshop file, but once you've put it in DVDSP, if you change the layer order, it will screw up the check boxes you checked. It always shows you the layer names correctly, but it keeps the checkboxes in DVDSP simply assigned to the layer number, so the fifth layer will keep the same checkboxes even if you juggle them so some other layer is now the fifth layer. So if you do juggle the layers in Photoshop, go back and fix the checkbox list in DVDSP.
    I put a sample Photoshop file based on yours in
    http://dan.black.org/layered-menu-sample.psd
    It's quick and dirty, but shows the layer layout, and you should be able to drop it on DVDSP to play with. (I also won't leave it there forever, maybe a few weeks, so anybody reading this in a month or more probably will get a 404 for that url.)
    Again, doing this from memory, so feel free to ask if anything doesn't work or doesn't make sense.
    G4/dual867   Mac OS X (10.4.5)   2GB/0.8TB

  • Urgent Help with Planning Book

    Hello Gurus,
    Need your help with a very urgent issue. I cannot see my key figure values in my planning book(Interactive Planning). I could sucessfully generate my CVC, then initialised my planning area. Then when I go the interactive planning I can see all my characteristics -Ex Material master( has all values), Prod type has values, etc. Iam in DEV system and have to move the whole config to QA now. I have to validate that the config works in QA. Its works ok in the sandbox but I cannot figureout why I can not see the values for key figs that Iam loading from a Flat File. Please help!!!!!!

    Hello Suresh,
    I have one more question for you. Let me tell you my scenario. I have the client giving me a rough forecast for the future. I have to do stat forecast based on the history and check that against the initial forecast given by them. But, the problem I realised now is that when I go to my planning books I can see the values for 2008 in mothly buckets since I have 0calmonth. But the client gave me another file with forecast for 2008 in monthly buckets and for 2009 and 2010 in quarter buckets. So, i have a planning buck profile defined to meet that but, how do I upload the file with both 0calmonth and 0calquarter in a single file. Please let me know!! Urgent task.
    Thanks again,
    Chinna.

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • Urgent help with Pages 5.0 needed

    Hi guys,
    I need urgent help! I deleted Pages 5.0 (as I HATED it) but now can't open a very important document. Can someone please tell me how to reinstall it??
    Thanks
    Kellie

    Downloading again is not as easy as that. you must find the app in the "Purchased" section of the
    app store and I think you then must hold down the option key to reinstall it.
    BTW, I only worked with one document as a trial for Pages 5 and then imported it to Word and saved it. I then deleted Pages 5 (I can't believe anyone who works with software would think that piece of worthless junk would sufice for anyone who uses a word processor professionally), reopened the Word document and saved it in Pages 09.
    I hope this helps

  • Urgent Help with network access to FileOutputStream

    URGENT HELP NEEDED GUYS...I am stuck on this past 2 days. I tried several alternatives but to vain.
    I am trying to access a Folder on a user's computer which is lying in a different Domain.
    For accessing this folder, I have the following information with me.
    Domain name, PC name, folder name, windows username, windows password.
    Note: This username and password will give me rights to read + write to that folder.
    How to use these information to open a fileoutputstream ? Does the java.io package allow programs to pass a username, password , domainname, pcname and then the folder and filename to create/read/write files..
    Pls. suggest code examples. Sometime back I posted this query but didnt get an answer to my satisfaction. I have tried at my end but unsuccessful yet. Help would be appreciated.
    I am trying this on a Windows File System and Network domain
    THIS IS V. URGENT
    Thanks,

    Hi HJK,
    I am referring to the last reply of yours.
    " Hi, there are three approaches I can think of offhand:
    1) make sure the user-context under which you run the java app has the right to access the remote drive.
    2) Do the network connection in a batch or c program and call that at the start of your java app with Runtime#exec.
    3) Write some c/c++ code to open the connection and integrate that via JNI.
    Let me know what (other) solution you came up with in the end!
    Regarding the 1st.
    I am supposed to write a remote installation utility actually. There are around 200 PC(s) in a network on which I need to copy these java class files. My problem statement is such that at runtime I only have username, passwords, domain access. I am not supposed to map any drives. Its supposed to be done dynamically. No manual intervention required. :(
    How do I do the network connection in a batch mode ? Let me know that?
    If 2nd option can be done, probably I can think of action-3 at the moment I am quite blurr :(

  • Help with Switch statements using Enums?

    Hello, i need help with writing switch statements involving enums. Researched a lot but still cant find desired answer so going to ask here. Ok i'll cut story short.
    Im writing a calculator program. The main problem is writing code for controlling the engine of calculator which sequences of sum actions.
    I have enum class on itself. Atm i think thats ok. I have another class - the engine which does the work.
    I planned to have a switch statement which takes in parameter of a string n. This string n is received from the user interface when users press a button say; "1 + 2 = " which each time n should be "1", "+", "2" and "=" respectively.
    My algorithm would be as follows checking if its a operator(+) a case carry out adding etc.. each case producing its own task. ( I know i can do it with many simple if..else but that is bad programming technique hence im not going down that route) So here the problem arises - i cant get the switch to successfully complete its task... How about look at my code to understand it better.
    I have posted below all the relevant code i got so far, not including the swing codes because they are not needed here...
    ValidOperators v;
    public Calculator_Engine(ValidOperators v){
              stack = new Stack(20);
              //The creation of the stack...
              this.v = v;          
    public void main_Engine(String n){
           ValidOperators v = ValidOperators.numbers;
                    *vo = vo.valueOf(n);*
         switch(v){
         case Add: add();  break;
         case Sub: sub(); break;
         case Mul: Mul(); break;
         case Div: Div(); break;
         case Eq:sum = stack.sPop(); System.out.println("Sum= " + sum);
         default: double number = Integer.parseInt(n);
                       numberPressed(number);
                       break;
                      //default meaning its number so pass it to a method to do a job
    public enum ValidOperators {
         Add("+"), Sub("-"), Mul("X"), Div("/"),
         Eq("="), Numbers("?"); }
         Notes*
    It gives out error: "No enum const class ValidOperators.+" when i press button +.
    It has nothing to do with listeners as it highlighted the error is coming from the line:switch(v){
    I think i know where the problem is.. the line "vo = vo.valueOf(n);"
    This line gets the string and store the enum as that value instead of Add, Sub etc... So how would i solve the problem?
    But.. I dont know how to fix it. ANy help would be good
    Need more info please ask!
    Thanks in advance.

    demo:
    import java.util.*;
    public class EnumExample {
        enum E {
            STAR("*"), HASH("#");
            private String symbol;
            private static Map<String, E> map = new HashMap<String, E>();
            static {
                put(STAR);
                put(HASH);
            public String getSymbol() {
                return symbol;
            private E(String symbol) {
                this.symbol = symbol;
            private static void put(E e) {
                map.put(e.getSymbol(), e);
            public static E parse(String symbol) {
                return map.get(symbol);
        public static void main(String[] args) {
            System.out.println(E.valueOf("STAR")); //succeeds
            System.out.println(E.parse("*")); //succeeds
            System.out.println(E.parse("STAR")); //fails: null
            System.out.println(E.valueOf("*")); //fails: IllegalArgumentException
    }

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • Help with if statement for a beginner.

    Hello, I’m new to the dev lark and wondered if someone could point me in the right direction.
    I have the following (working!) app that lets users press a few buttons instead of typing console commands (please do not be too critical of it, it’s my first work prog).
    //DBS File send and Receive app 1.0
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.Font;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    import java.applet.Applet;
    public class Buttons extends JFrame
         public Buttons()
              super("DBS 2");          
              JTextArea myText = new JTextArea   ("Welcome to the DBS application." +
                                                           "\n" +
                                                           "\n\n1. If you have received an email informing you that the DBS is ready to dowload please press the \"Receive DBS\" button." +
                                                           "\n" +
                                                           "\n1. Once this has been Received successfully please press the \"Prep File\" button." +
                                                           "\n\n2. Once the files have been moved to their appropriate locations, please do the \"Load\" into PAS." +
                                                           "\n\n3. Once the \"Load\" is complete, do the \"Extract\"." +
                                                           "\n\n4. When the \"Extract\" has taken place please press the \"File Shuffle\" button." +
                                                           "\n\n5. When the files have been shuffled, please press the \"Send DBS\" Button." +
                                                           "\n\nJob done." +
                                                           "\n", 20,50);
              JPanel holdAll = new JPanel();
              JPanel topPanel = new JPanel();
              JPanel bottomPanel = new JPanel();
              JPanel middle1 = new JPanel();
              JPanel middle2 = new JPanel();
              JPanel middle3 = new JPanel();
              topPanel.setLayout(new FlowLayout());
              middle1.setLayout(new FlowLayout());
              middle2.setLayout(new FlowLayout());
              middle3.setLayout(new FlowLayout());
              bottomPanel.setLayout(new FlowLayout());
              myText.setBackground(new java.awt.Color(0, 0, 0));     
              myText.setForeground(new java.awt.Color(255,255,255));
              myText.setFont(new java.awt.Font("Times",0, 16));
              myText.setLineWrap(true);
              myText.setWrapStyleWord(true);
              holdAll.setLayout(new BorderLayout());
              topPanel.setBackground(new java.awt.Color(153, 101, 52));
              bottomPanel.setForeground(new java.awt.Color(153, 0, 52));
              holdAll.add(topPanel, BorderLayout.CENTER);
              topPanel.add(myText, BorderLayout.NORTH);
              setSize(700, 600);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              getContentPane().add(holdAll, BorderLayout.CENTER);
              Container c = getContentPane();
              c.setLayout(new FlowLayout());
              final JButton receiveDBS = new JButton("Receive DBS"); //marked as final as it is called in an Inner Class later
              final JButton filePrep = new JButton("Prep File");
              final JButton fileShuffle = new JButton("File Shuffle");
              final JButton sendDBS = new JButton("Send DBS");
              JButton exitButton = new JButton("Exit");
    //          JLabel statusbar = new JLabel("Text here");
              receiveDBS.setFont(new java.awt.Font("Arial", 0, 25));
              filePrep.setFont(new java.awt.Font("Arial", 0, 25));
              fileShuffle.setFont(new java.awt.Font("Arial", 0, 25));
              sendDBS.setFont(new java.awt.Font("Arial", 0, 25));
              exitButton.setBorderPainted ( false );
              exitButton.setMargin( new Insets ( 10, 10, 10, 10 ));
              exitButton.setToolTipText( "EXIT Button" );
              exitButton.setFont(new java.awt.Font("Arial", 0, 20));
              exitButton.setEnabled(true);  //Set to (false) to disable
              exitButton.setForeground(new java.awt.Color(0, 0, 0));
              exitButton.setHorizontalTextPosition(SwingConstants.CENTER); //Don't know what this does
              exitButton.setBounds(10, 30, 90, 50); //Don't know what this does
              exitButton.setBackground(new java.awt.Color(153, 101, 52));     
              topPanel.add(receiveDBS);
              middle1.add(filePrep);
              middle2.add(exitButton);
              middle3.add(fileShuffle);
              bottomPanel.add(sendDBS);
              receiveDBS.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        if (ae.getSource() == receiveDBS);
                        try
                             Runtime.getRuntime().exec("cmd.exe /c start c:\\DBS\\ReceiveDBSfile.bat");
                        catch(Exception e)
                             System.out.println(e.toString());
                             e.printStackTrace();
              filePrep.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        if (ae.getSource() == filePrep);
                        try
                             Runtime.getRuntime().exec("cmd.exe /c start c:\\DBS\\filePrep.bat");
                        catch(Exception e)
                             System.out.println(e.toString());
                             e.printStackTrace();
              exitButton.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        System.exit(0);
              fileShuffle.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        if (ae.getSource() == fileShuffle);
                        try
                             Runtime.getRuntime().exec("cmd.exe /c start c:\\DBS\\fileShuffle.bat");
                        catch(Exception e)
                             System.out.println(e.toString());
                             e.printStackTrace();
              sendDBS.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent ae)
                        if (ae.getSource() == sendDBS);
                        try
                             Runtime.getRuntime().exec("cmd.exe /c start c:\\DBS\\sendDBSFile.bat");
                        catch(Exception e)
                             System.out.println(e.toString());
                             e.printStackTrace();
              c.add(receiveDBS);
              c.add(filePrep);
              c.add(fileShuffle);
              c.add(sendDBS);
              c.add(exitButton);
    //          c.add(statusbar);
         public static void main(String args[])
              Buttons xyz = new Buttons();
              xyz.setVisible(true);
         }What I would like help with is the following…
    I would like output to either a JLabel or JTextArea to appear if a file appears on the network. Something along these lines…
    If file named nststrace*.* is in \\[network path] then output “Download successful, please proceed.”
    btw I have done my best to search this forum for something similar and had no luck, but I am looking forward to Encephalopathic’s answer as he/she has consistently made me laugh with posted responses (in a good way).
    Thanks in advance, Paul.

    Hospital_Apps_Monkey wrote:
    we're starting to get aquainted, but I think "best friend" could take a while as it is still as hard going as I recall, but I will persevere.Heh, it's not so bad! For example, if I had no idea how to test whether a file exists, I would just scan the big list of classes on the left for names that sound like they might include File operations. Hey look, File! Then I'd look at all of File's methods for something that tests whether it exists or not. Hey, exists! Then if I still couldn't figure out how to use it, I'd do a google search on that particular method.

  • I need urgent help with the GPS

    i've ask my family to buy Nokia n 97 from syria,while i live in cyprus,how ever i got the phone with a card inside the box says:
    this nokia device has been specially designed and manufactured for this market.the satandard GPS features have been disabled in accordance with market regulations.
    im using this mobile for the second day,i can't send it back to syria and i don't know what to do,i can't connect with the gps system in cyprus and i can't connect with the internet,please help me to find a way to enable the GPS system in my phone.
    THanks a lot

    As I explained in an earlier post, you WILL NOT be able to do it yourself.
    If the hardware is just disabled (the error message may be misleading), a Nokia service point may be able to reactivate it, though you'd have to pay because the phone only has warranty in Syria and because this wouldn't be a warranty fix anyway.
    If the hardware is removed, then you are more than likely stuck.

Maybe you are looking for

  • FCS 2 Upgrade from FCP 2?

    I have a question about the upgrade to FCS 2. In the Apple store it says you can upgrade from an old version including FCP 2. I have a legit FCP 2 install disc so I assume this would work, but I'm not exactly sure how. FCP 2 is an OS 9 only app and t

  • Design - Any substitute for f:verbatim

    Hi, In my jsp I have used a <h:panelGroup> component, which have both html markup and jsf component embedded in it. When I view the page the jsp components renders after the markup language. I dont want to user f:verbatim as it clutters the whole htm

  • Click on the field name of a multiple form in change value

    In previous versions of Acrobat, you could click on a field and push the + or minus key to change the field number.

  • Got internet connection but none of the apps will access

    I am new in the mac-world and I encountered a first problem: for some reason none of my applications have access to internet anymore though everything worked fine a couple of hours ago. Now it works neither with cable nor wirelessly. I had little sni

  • Can i manage my family share from any device

    i set up family share from my wife's mac. but when I try to access family share in iCloud on my iPad or iPhone it asks me to setup the family share. Then it tells me that my apple id is already part of a family.