Jbutton with double functions....

Hello,
I have a button that does fullscreen and then toggles to minimize one it is in fullscreen. How can i add the minimize operation to it?
The code is as following:
buttonPanel.add(Box.createRigidArea(new Dimension(10, 0)));
          final JButton button1 = new JButton("Fullscreen");
          button1.setAlignmentX(Component.CENTER_ALIGNMENT);
          buttonPanel.add(button1);
          button1.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent e) {
                         containinFrame.setVisible(false);
                         containinFrame.removeNotify();
                         containinFrame.setUndecorated(true);
//                         frame.pack();
                         containinFrame.setSize(Toolkit.getDefaultToolkit().getScreenSize().width,Toolkit.getDefaultToolkit().getScreenSize().height);
                         containinFrame.setLocation(0, 0);
                         containinFrame.addNotify();
                         containinFrame.setAlwaysOnTop(true);
                         button1.setText("Close");
                         containinFrame.setVisible(true);

mortalha wrote:
since i have to use 2 listenersIs this homework? That sounds like an unnecessary requirement. Why not just use a single ActionListener with a boolean remembering the state of the component, like above?
Nevertheless, a (more complicated) two-listener approach:
JButton toggleButton = new JButton("Maximize");
toggleButton.addActionListener(new MyMaximizeListener());
class MyMaximizeListener implements ActionListener {
   public void actionPerformed(ActionEvent e) {
      // Code to maximize
      JButton source = (JButton)e.getSource();
      source.removeActionListener(this);
      source.setText("Normal Size");
      source.addActionListener(new MyMinimizeListener());
class MyMinimizeListener implements ActionListener {
   public void actionPerformed(ActionEvent e) {
      // Code to restore size to normal
      JButton source = (JButton)e.getSource();
      source.removeActionListener(this);
      source.setText("Maximize");
      source.addActionListener(new MyMaximizeListener();
}

Similar Messages

  • Error while replacing IF statements with DECODE function in procedure

    Hi All,
    I have created a procedure which has nested IF statements. Now I want to replace the IF statements with DECODE functions to improve performance.
    Procedure:
    IF (var_int_sev = '0')
    THEN
    var_sev := '2';
    ELSE
    SELECT sev
    INTO var_int_sev
    FROM errorconfig
    WHERE errorcode = var_errorcode;
    var_sev := var_int_sev;
    END IF;
    I converted the above IF statement into DECODE function as mentioned below:
    var_Sev := DECODE(var_int_sev,0,2,SELECT severity FROM errorconfig WHERE errorcode=var_ErrorCode)
    But it throws below error at the select statement used inside DECODE.
    Error(58,51): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specification> <an alternativ
    Can someone help me in converting the IF to DECODE in the above case. Also how can we use a select statement inside decode.

    instead of trying to rewrite all your code and hoping that the performance will be better, it's a better option to investigate and find out which part of your application is slow
    read this:
    When your query takes too long ...

  • Open file from table with double click

    Hi all,
    I use adf faces and JDEV 11.
    I want to open a file by double clicking on row in a table. (file is stored in the database).
    I first tried it with a button to open the file, with this code:
           System.out.println("Double click!");       
           BindingContainer bindings = this.getBindings();
            DCIteratorBinding iter = (DCIteratorBinding)bindings.get("XxahelpBezoekRapDocView1Iterator");
            Row row = iter.getCurrentRow();
            FacesContext fc = FacesContext.getCurrentInstance(); 
            HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
            response.setHeader("Content-Disposition","attachment; filename=\""+row.getAttribute("Filename").toString()+"\"");
            response.setHeader("cache-control", "no-cache");
            try {
                InputStream in;
                in = ((BlobDomain)row.getAttribute("Bijlage")).getInputStream();
                ServletOutputStream out = response.getOutputStream();
                writeInputStreamToOutputStream(in, out);
                fc.responseComplete();     
            } catch (IOException e) {
                e.printStackTrace();
            } This is working fine.
    Now I wan't to open the file with double clicking on a row.
    For opening the file I use the same code in the backing bean and this code on the page:
          <f:facet name="metaContainer">
        <af:group>
            <trh:script>
               goEditRow = function(event) {
                    AdfCustomEvent.queue( event.getSource(), "doubleClickOnRow", {}, false);
            </trh:script>
        </af:group>
        </f:facet>And a clientListener and serverListener on the table:
    <af:clientListener method="goEditRow" type="dblClick"/>
    <af:serverListener type="doubleClickOnRow" method="#{backingBeanScope.backing_pages_EditTicket.doubleClick}"/>The only thing that happens when I double click is that I see "Double click!" in the console. But I can't save the file :S
    What is the problem?
    Thanks in advance.

    Hi
    What we do is to pick a table column for downloading the file.
    We change the component in the column to the an af:commandLink and add an
    af:fileDownLoadActionListener to the command link.
    The user clicks on the link to download (open) the file.
    Its not exactly the same as what you requested (double
    click on the row) but it might be another solution.
    Regards
    Paul

  • LightScribe SuperMulti DVD±R/RW with Double Layer Support is no longer able to read all lightscribe discs(Blank or Containing Data)

    Hi,
    The product Name of my computer is: HP Pavilion dv6-6093ex Entertainment
    Notebook PC support
    The number of my computer is : LM610EA#A2N.
    Could anyone please at this splendid forum take some of their precious time
    out to really reply my questions and solve my problems?
    FIRST OF ALL:
    My HP Pavilion Laptop is about 3 years old.
    My
    sister's Dell Inspiron laptop is 3 years old.
    My HP laptop is well-cared, as opposed to my sister's Inspiron Dell laptop, which is always thrown in dust without caring at all. Also, its battery is always inserted even when it is fully charged while the laptop is plugged in to the main power supply. 
    However, my laptop is either used on only battery, or on plugin. Also, it is kept from the dust. But, I really found that the battery of the Dell laptop still lasts about three and half hours, and there is no problem cooling fan is not properly properly.
    I only remember one thing differently done on my laptop battery which is I charged it fully, then I stored it without using it for about four months, then when I reused it, I found it got worse over time. I.e. first time of using it after storing,I found
    it empty, then I charged it again fully, however, then it lasted about 2 hours, then 1 and half hours, next an hour, now it is only lasting about 20 minutes without performance. If there is high performance, then
    the computer shuts down suddenly.
    My problem is follows:::
    First: Whenever I inserted any Containing Data OR  Data CD/DVD-RLightScribe discs, I found that HP optical driver was
    unable to read them. When clicking on the optical disc drive 'double-click' while disc was inserted, then I found that disc opened as this way(NOTE: With a CD/DVD player is grayed out)
    I  was told 'I suspect the culprit might be hardware and lightscribe dive might be
    corrupt. Please sent it to service center to check. In addition, this thread could be as a reference:
    http://answers.microsoft.com/en-us/windows/forum/windows_vista-hardware/media-in-cddvd-drive-is-not-readable/794fe26a-7e47-45c4-a50b-0af2ed53f75b'
    Since no one replied to me at HP forums, although my HP laptop is one of their products, I had to post my problem here to know if my driver is corrupted and needs to be replaced or not.
    Blank Or Used(containg data) CD/ DVD ±R/RW lightscirbe is unable to be read by optical drive
    When clicking on drive 'duble-click', I found it opens  like a USB FlashDrive or With a CD,DVD player, however,
    : Bare in mind that 'with CD/DVD Player'
    is grayed out)
    Not Blank(containing data) CD/ DVD ±R/RW NON -Lightscirbe disc opens normal:
    Blank CD/ DVD ±R/RW NON-lightscirbe opens normal(Opens like
    a USB FlashDrive or With a CD,DVD)::
    My LightScribe System Software version is:
    I've tried installed the latest version of lightscribe software, then I run
    the diagnostic utility, however, the problem still persists.
    My HP CD/DVD DVDآ±R/RW specs are::
    Optical Drives
    hp CDDVDW TS-L633R
    Media Type DVD Writer
    Name hp
    CDDVDW TS-L633R
    Availability Running/Full Power
    Capabilities Random
    Access, Supports Writing, Supports Removable Media
    Read capabilities CD-R,
    CD-RW, CD-ROM, DVD-RAM, DVD-ROM, DVD-R, DVD-RW, DVD+R, DVD+RW, DVD-R DL, DVD-RW
    DL, DVD+R DL
    Write capabilities CD-R, CD-RW, DVD-RAM, DVD-R, DVD-RW, DVD+R,
    DVD+RW, DVD-R DL, DVD+R DL
    Config Manager Error Code Device is working
    properly
    Config Manager User Config FALSE
    Drive E:
    Media Loaded
    FALSE
    SCSI Bus 0
    SCSI Logical Unit 0
    SCSI Port 0
    SCSI Target Id
    1
    Status OK
    Trying to solve the problem,
    I have done these steps in order::
    I tried checking with dignostic ulitiy:
    I have tried Advanced View , this is the file of output data ofdignostic utlity
    LightScribe System Software Settings:
    SOFTWARE\LightScribe\MessageDir C:\Program Files (x86)\Common Files\LightScribe\
    SOFTWARE\LightScribe\LSPrintDialog C:\Program Files (x86)\Common Files\LightScribe\LSPrintDialog.exe
    SOFTWARE\LightScribe\LSPrintingDialog C:\Program Files (x86)\Common Files\LightScribe\LSPrintingDialog.exe
    SOFTWARE\LightScribe\LsPrintLauncher C:\Program Files (x86)\Common Files\LightScribe\LSPrintLauncher.dll
    SOFTWARE\LightScribe\ResourceDir C:\Program Files (x86)\Common Files\LightScribe\res
    SOFTWARE\LightScribe\LSPrintAPI C:\Program Files (x86)\Common Files\LightScribe\LSPrintAPI.dll
    SOFTWARE\LightScribe\Update\UpdateShellCommand http://www.lightscribe.com/go/downloads/windows
    SOFTWARE\LightScribe\Update\PreviousVersion 1.18.20.1
    SOFTWARE\LightScribe\Update\CurrentVersion 1.18.27.10
    SOFTWARE\LightScribe\Update\TrailingVersion
    SYSTEM\CurrentControlSet\Services\LightScribeService\Type 16
    SYSTEM\CurrentControlSet\Services\LightScribeService\Start 2
    SYSTEM\CurrentControlSet\Services\LightScribeService\ErrorControl 0
    SYSTEM\CurrentControlSet\Services\LightScribeService\
    SYSTEM\CurrentControlSet\Services\LightScribeService\DisplayName LightScribeService Direct Disc Labeling Service
    SYSTEM\CurrentControlSet\Services\LightScribeService\ObjectName LocalSystem
    SYSTEM\CurrentControlSet\Services\LightScribeService\Description Used by the LightScribe software components to support 3rd party disc labeling applications using the LightScribe COM Application Programming Interface (LSCAPI). This service needs to run for LightScribe direct disc labeling to work.
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\
    SYSTEM\CurrentControlSet\Services\Eventlog\Application\LightScribeService\TypesSupported 7
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\0 IDE\CdRomhp_CDDVDW_TS-L633R______________________0300____\4&334f7860&0&0.1.0
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\Count 2
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\NextInstance 2
    SYSTEM\CurrentControlSet\Services\Cdrom\Enum\1 SCSI\CdRom&Ven_ELBY&Prod_CLONEDRIVE&Rev_1.4\1&2afd7d61&0&000000
    SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\allocatecdroms 0
    SYSTEM\CurrentControlSet\Services\CDRom\autorun 1
    SOFTWARE\INTEL\Intel Application Accelerator Not detected
    Drives and Media:
    Drive 0 : hp CDDVDW TS-L633R 0300 219 (E:), Media Imaging Parameter : 114
    I tried running the below command line to fix potential disk issue 'Chkdsk/r /f'
    I cleaned the drive, discs, and so on.
    I have uninstalled the all third-party data recording software.
    I have uninstalled the Cyber DVD suite, lightscribe system software
    which came pre-installed with my HP pavilion Notebook.
    I have recovered my system from the HP Factory Recovery discs.
    I have tried opening all those LightScibe discs not opening on my HP optical drive, on a Dell optical drive, and all of them were opened well, although Dell optical drive did not have a lightscribe feature at all., nor  third party disc recording software.
    However, the problem is still with opening the discs LIGHT-SCRIBE.
    Thus, my questions are:
    How to determine if the drive is corrupted and needs to be replaced with another one.
    I think there something needed to be done on the BIOS Of my HP laptop[[[A similar problems happened on my Desktop computer's optical drive which is as follows (ALL discs are opened as empty by Optical Drive of My Desktop Computer) ---while
    my optical drive of my desktop was connected to the
    primary slave IDE, and the HDD was connected to the primary master IDE, the optical drive and hard disk are functioning well. However, I remember that while burning an image with Nero essential V: 5, something went wrong, and
    then the Optical Drive of My Desktop Computer (HL-DT-ST DVD-RAM GH22NP20) became NOTrecognised/Installed on
    BIOS, although it was still shown on the device manager as a recognised device. Also, it was listed on my computer, however, when entering a disc(blank or with data) into the drive, I found it was not recognised, and it opened empty(no files
    at it), although it contains data. Thus, I decided to boot to BIOS, and clicked on 'Autodetection for IDE', then I found that only HDD was still shown as installed on BIOS.  However, the optical drive was not. Th I tried clicking on it on BIOS and then
    clicking on 'enter' to try to let the device be re-recognized. However, that
    made no difference. I had to take part my computer ,and then reconnected the optical drive onto thesecondary slave IDE , and let HDD connected to the same
    primary master IDE. Then, I found that the problem solved and all discs were read normally. Aslo, optical drive became installed on BIOS.
    What is meant with with double Layer Support.
    How much does it cost?
    A man should convert his anger and sadness into strength to continue living in this life.

    Did you try unsinatalling LightScribe application then checking the status ? 
    This is probably related to the faulty hardware or the application ( LightScribe
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.
    Could you please really concentrate with me, and really reply to me to finish this problem pending.
    If you had had a look again at my first post, you would have seen that I said that I have done some things, among of which is: I have uninstalled the Cyber DVD suite, lightscribe system software
    which came pre-installed with my HP pavilion Notebook.
    Yes, you're right the two threads below are concerned about one issue.
    https://social.technet.microsoft.com/Forums/en-US/w7itpromedia/thread/5c1aa5e8-9728-492b-a5c3-387f29ee4b6e/#d6f63628-29a3-4adf-b33f-03b33c138910
    https://social.technet.microsoft.com/Forums/windows/en-US/683997ff-1004-4579-b69d-5e982746c917/lightscribe-supermulti-dvdrrw-with-double-layer-support-is-no-longer-able-to-read-all-lightscribe?forum=w7itpromedia
    However, this thread contains more precise details and screen shots about the problem. I was not able to understand whether all lightscribs were not unable to be read or not. However, I now recognized that, and I recognized that only all LightScribe(empty
    or used) discs are unable to be read. furthermore, that other thread got far too longer to be followed.
    Moreover, I would like you to take some time out to answer my problem about Lighstscribe discs since I am going to purchase 'A battery, Cooling Fan' From the HP agent in Yemen, which is far away from me about 1000 Km. Thus, If my optical disc drive was corrupted
    as well, then I would be requesting the 'optical disc  drive' as well from the HP along with 'Battery, Cooling Fan' .
    A man should convert his anger and sadness into strength to continue living in this life.

  • AUDIO TO SCORE is gone and it was much more precise for drum doubling than the doubling function itself.

    AUDIO TO SCORE. I used that all the time for drum doubling for the following reasons:
    In Logic 9 i always used audio to score for drum doubling because it had much more control over essential parameters than the drum replacement window. Parameters like: Granulation, Smooth Release and Attack Range made sure that i didn't have any flams, too few notes, too many notes etc etc. AND you could see in the sample editor (below the waveform) immediately the effect of the changes made in those parameters!
    Now with these parameters gone and only the drum doubling function left, what was a real pro function has become much more cumbersome to use. You can no longer see in detail what changes in parameters does to the out-coming midi. And the lack of the detailed parameters makes drum doubling drop or miss notes, makes flams with the original drum track etc etc.... In short. The drum doubling function is inadequate for pro results.
    So this is my suggestion: Apple probably wont reinstate audio to score as it was (i'd love it if they did, it's essential to me and others who does rock mixes in logic instead of protools). But you can do something that's even better:
    In the audio file editor (previously the sample editor) make the old audio to score into an advanced drum doubling/replacement editor. Take the audio to score window and parameters and reinstate them BUT instead of outputting different note values make them output to a desired note of the users choice (e.g C1). Without opening the library. It cluters the window and often people want to use their own drum software than apples samples.
    It's the realtime view in the bottom of the audiofile editor that makes a difference. And the missing parameters. Without these things a good outcome is based on luck rather than visual reference.

    I was doing drum replacement ( adding ) with Audio-to-score for years, and must say, drum replacement is working for me without any flams and much better and 2x faster. I think it is pro feature, with advanced transient detector. Only problem is velocity,as in Audio-to-score.
    If automatic threshold not working on some material, you can do  fine transient edits in audio editor with visual realtime feedback, you can change output note and delay globally. Also you can hear ( in compare with Audio-to-score), that's why library is opened and sample replacement -after, not difficult to do.

  • CVI Nugget - Dealing with Doubles

    I'm not sure if there were past Nuggets in the CVI forum, but here is my first nugget: Dealing with Doubles
    I read an interesting article today:  http://www.exploringbinary.com/the-answer-is-one-unless-you-use-floating-point/
    As I am mostly active in the LabVIEW Forum, I will do a cross post because I want to do a comparison between CVI and LabVIEW when dealing with doubles.  I have not yet implemented the code in LabVIEW, but I do expect the same results.
    In the article by Rick Regan, he explains the results that was obtained when running his function.  I have duplicated is function and add my own main function below. 
    #include <utility.h>
    #include <ansi_c.h>
    #include <userint.h>
    // Prototypes
    double f(double a);
    void main (void)
        int i;
        double result;
        double myArray[21] = { 5.1,  91.3, 451.9, 7341.4, 51367.7, 897451.7,
                            1923556.4, 59567771.9, 176498634.7,
                            2399851001.7, 60098761442.7,
                            772555211114.1, 1209983553611.9,
                            59871426773404.9, 190776306245331.2,
                            2987154209766221.6, 19843566622234755.9,
                            719525522284533115.3, 8399871243556765103.9,
                            39847765103525225199.1, 553774558711019983333.9 };
        for( i = 0; i < 21; i++)
            result = f ( myArray[i] );
            printf("f(%22.1f) \t = %18.17f \n", myArray[i], result );
        while ( !KeyHit() )
            GetKey();  // to see the io screen before the program closes
    double f(double a)
     double b, c;
     b = 10*a - 10;
     c = a - 0.1*b;
     return (c);
    As expected, I get the same output as Rick.
    Rick's output:
    My output (and yes, I was lazy and did not create a pretty table..  I just wanted to show a comparison of the values).
    You can read the article (link provided above) for more details on the values obtained above.  However, the message I am trying to convey is that you have to be careful when "dealing with doubles".  Often I see code where there is an if statement that compares the value to zero.
    For instance something like:
      if ( double zero == 0 )
        // then do something when true
    and people get upset and frustrated because they do not understand why the true case never gets executed.  As a matter of fact, I do recall several discussions on this topic in the LabVIEW forum.  I have actually seen the discussion turn into an argument. 
    What is important to understand is how the processor interprets double values.
    I hope this information will save someone some headaches..
    RayR
    Attachments:
    RicksOutput.PNG ‏16 KB
    MyDoublesOutput.PNG ‏24 KB

    Thanks Ray for this nugget.
    I had fallen across such cases in the past enough times to have learned not to perform any exact match on doble values
    Now your example gives me a reason for this.
    The accuracy of binary representation of doubles has been discussed several times in this forums: in addition to posts that explicitly mention IEEE754 standard I remember a few ones that also cover this subject (for example this thread and this one), but indeed having it explained in a good way is a valuable addition on this subject!
    And yes: you should be awarded for posting the first nugget on the CVI board!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to find the number of data items in a file written with ArryToFile function?

    I have written an array of number in 2 column groups to a file using the LabWindows/CVI function ArrayToFile...Now if I want to read the file with FileToArray Function then how do I know the number of items in the file. during the write time I know how many array items to write. but suppose I want the file to read at some later time then How to find the number of items in the file,So that I can read the exact number and present it. Thanks to all
    If you are young work to Learn, not to earn.
    Solved!
    Go to Solution.

    What about:
    OpenFile ( your file );
    cnt = 0;
    while ((br = ReadLine ( ... )) != -2) {
    if (br == -1) {
    // I/O error: handle it!
    break;
    cnt++;
    CloseFile ( ... );
    There are some ways to improve performance of this code, but if you are not reading thousands of lines it's quite fast.
    After this part you can dimension the array to pass to FileToArray... unless you want to read it yourself since you already have it open!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to replace single quote with double quote

    hai all,
    i have a problem,
    i am trying insert a string containing single quote into ms-access database.
    it is giving error.
    how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
    insert into database.
    in java.lang.String
    replace () will not work to replace quote with double quote.
    any otherway to solve this problem.
    please mail me to [email protected]
    thank you
    sambareddy
    inida

    java.lang.String.replace () will not work to replace quote with double quote.Really?
    String x = ...
    x.replace( "'", "\"" );

  • Not able to copying files/folders from one Document Library to another Document Library using Open with Browser functionality

    Hi All, 
    We have SharePoint Production server 2013 where users are complaining that they are not able to copy or move files from one document library to another document library using “Open with Explorer” functionality.
    We tried to activate publishing features on production server but it did not work. We users reported following errors:  
    Copying files from one document library to another document library:
    Tried to map the document libraries and still not get the error to copy files: 
    In our UAT environment we are able to copy and move folders from using “Open with Explorer” though.
    We have tried to simulate in the UAT environment but could not reproduce the production environment.  
    Any pointers about this issue would be highly appertained.
    Thanks in advance
    Regards,
    Aroh  
    Aroh Shukla

    Hi John and all,
    One the newly created web applications that we created few days back and navigated to document library, clicked on “Open with Explorer”, we get this error.
    We're having a problem opening this location in file explorer. Add this website to your trusted and try again.
    We added to the trusted site in Internet Explorer for this web application, cleared the cache and open the site with same document library but still get the same above error.
    However, another existing web application (In same the Farm) that we are troubleshooting at the moment, we are able click on “Open with Explorer”,  login in credentials opens and we entered the details we are able to open the document
    library and tried to follow these steps:
    From Windows Explorer (using with Open with Explorer), tried to copy or move a files to
    source document library.
    From Windows Explorer moved this file to another destination document library and we got this error.
    What we have to achieve is users should be able to copy files and folders using
    Open with Explorer functionality. We don’t know why Open with Explorer
    functionality not work working for our environment.  
    Are we doing something wrong? 
    We have referred to following websites.
    we hope concepts of copying / Moving files are similar as SharePoint 2010. Our production environment is SharePoint 2013.   
    http://www.mcstech.net/blog/index.cfm/2012/1/4/SharePoint-2010-Moving-Documents-Between-Libraries https://andreakalli.wordpress.com/2014/01/28/moving-or-copying-files-and-folders-in-sharepoint/
    Please advise us. Thank you.
    Regards,
    Aroh
    Aroh Shukla

  • Unable to close open apps with double clicking the button and when I tap screen does not respond?

    Cannot not close open apps with double clicking the button Since downloading iOS8.

    What happens when you try? Does double clicking the ?home button bring up the Task Bar of recently used apps? If so what happens when you flick up on the preview screen for the app you want to close?
    To quit an app double click the Home button to reveal the row of recently used apps. Flick up on the page preview and it will fly away and disappear. That quits the app.

  • Slicer Time Dimension Issue with Cube Functions

    Hi,
    Hoping someone can help me figure out right approach here.
    Summary:
    Using Excel 2013 connected to a SSAS cube as data source, and cube functions with slicers to create a dashboard.
    Have following time dimension slicers; Fiscal Year, Fiscal Quarter, Fiscal Month, Fiscal Week & Date, that are used to slice data based on user selection, along
    with a sales measure.
    Below is example of Slicer name and CubeMember function for each:
    Slicer_Fiscal_Year: 
    =CUBEMEMBER("Cube","[Date].[Fiscal Year].&[2015]")
    Slicer_Fiscal_Quarter: 
    =CUBEMEMBER("Cube","[Date].[Fiscal Quarter].[All]")
    Slicer_Fiscal_Month: 
    =CUBEMEMBER("Cube","[Date].[Fiscal Month].&[201408]")
    Slicer_Fiscal_Week: 
    =CUBEMEMBER("Cube","[Date].[Fiscal Week].&[201509]")
    Slicer_Date: 
    =CUBEMEMBER("Cube","[Date].[Date].[All]")
    Problem:
    What I am trying to do is to build a table with cube functions that takes the lowest grain of the slicer time dimension selected, shows the current member, plus
    the prior 7 so I can have an 8 period trending view table that I will build a chart from. In the above example that would mean that it would look at Slicer_Fiscal_Week since that is lowest grain that has an attribute other than All, and then show me the prior
    7 periods. In this case 201509 means Week 9, so I would want to show in table Week 9 back to Week 2. But if Slicer_Fiscal_Week was set to All, along with Slicer_Date, then Fiscal Month would be lowest grain, so I would want to show Fiscal Months from August
    (201408) back to January 2014. I know how to use CubeRankedMember to pull the value from what is selected in the slicer, the problem is figuring out how to pass the lowest grain time dimension so that I can use lag or some other MDX function to get the previous
    periods.
    Any help on this would be greatly appreciated.
    <object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{28593A5C-70C0-4593-9764-80C76B51795C}"
    /></object>

    Hello,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Bug with double division ??

    Hello,
    first sorry my bad english...
    I am trying to convert a C program in java and i had a big problem with double division.
    For example, my program needs to do that :
    double d = 2. * 3.1415926 ;
    double d2=511;
    double d3=d/d2;
    The value in memory of d3 is 0x3f892e92965e074e whereas with my original C program, for the same code) the value in memory is 0x3f892e92965e074d !!!!!! (the last byte is different)
    So what is the problem ? Is the double division in java different with the C language or is it my code which has a problem ??
    Thanks a lot

    It could be different than (some implementation of) C, but that doesn't mean it's a bug or a problem. Java is supposed to implement an IEEE floating point specification; if you can demonstrate that it's not following that spec (I think it's IEEE 754) then report it as a bug. Incidentally, do Java and your version of C implement 3.1415926 the same way?
    (Also, if that number is supposed to be pi, then the inaccuracy you claim in Java is much less than the inaccuracy you made by using an approximation to pi.)

  • What's wrong with this function

    What's wrong with this Function(PL/SQL) in this formaula column definition in Reports 6i
    function currdateFormula return Date is
    curr_date date;
    begin
    select to_char(sysdate, 'DD-MM-YYYY') into curr_date from dual;
    return(curr_date);
    end;
    I get the following error in compiling
    REP-1401. 'currdateformula'.Fatal PL/SQL error occured. ORA-01843 not a valid month.
    The SQL select to_char(sysdate, 'DD-MM-YYYY') from dual; worked well in SQL Plus prompt.
    I got a clean compile when i use just sysdate in the function (see below).
    function currdateFormula return Date is
    curr_date date;
    begin
    select sysdate into curr_date from dual;
    return(curr_date);
    end;
    Appreciate your help
    Raja Lakshmi

    hello,
    what you are trying to do :
    fetch the current date and return it as the result of the formula-column.
    what you are actually doing :
    fetch the current date, convert it to text, assign this text to a date-variable which causes an implicit type-conversion.
    in your case you create a date-string with the format dd-mm-yyyy. the implicit conversion then tries to convert this string back to date using the NLS settings of your session. depending on your NLS_LANG and NLS_DATE_FORMAT this might work, if your session-date-format is dd-mm-yyyy which obviously it is NOT as you get the error.
    what you should do :
    select sysdate into curr_date from dual;
    this fetches the sysdate and stores it in your date-variable. there is no type conversion needed what so ever.
    regards,
    the oracle reports team

  • A problem with a function

    Oracle Version: 10g
    Operating System: Microsoft windows 2003
    Hello, I need some help, I would appriciate if anyone could help me out.
    on one hand, I have a table that contains a list of table names that are sensitive in my org.
    In addition, not all the columns in the table are sensitive, some tables have only one or tow sensitive columns
    on the other hand, I have another table that contains all the SQL Statements that passed through all my DB's in the org + some other details like username, machine name etc.
    the sql statement is one columns - varchar2(4000). ALL the SQL TEXT is printed there.
    I need to create a report of the SQL Statements and their details that have any reference to the sensitive entities.
    I'm kind of new to PL/SQL or programming in DB in general.
    Can you please assist me in designing the write function and script.
    Additional details:
    Sensitive_tables table:
    table_name varchar2 (65) -- the names of the sensitive tables
    All_fields number (1) -- 0=not all the fields are sensitive, 1=all the fields are sensitive
    the conditions where the function should return true:
    1. It's not a select/SELECT statement.
    2. There is a relation to a sensitive table that all its columns are sensitive
    3. There is a relation to a sensitive table and to a specific sensitive column.
    below is the function.
    There are 2 cursors - the first loop will check if the SQL Statement touches a sensitive column + a sensitive table.
    The second one checks if the the SQL Statement a table that all its columns are sensitive.
    CREATE OR REPLACE function sens_entity_match (p_statement varchar2)
    return VARCHAR2
    IS
    v_match VARCHAR2(5);
    sql_stmt VARCHAR2(4000);
    TYPE tbls_wth_all_flds IS REF CURSOR;
    tbls_all_fields tbls_wth_all_flds;
    table_name_y varchar2(65);
    TYPE tbls_wthout_all_flds IS REF CURSOR;
    tbls_some_fields tbls_wthout_all_flds;
    table_name_n varchar2(65);
    BEGIN
    sql_stmt:=upper(p_statement);
    OPEN tbls_all_fields FOR select table_name from sens_tables where ALL_FIELDS='1';
    OPEN tbls_some_fields FOR select table_name from sens_tables where ALL_FIELDS='0';
    FETCH tbls_all_fields INTO table_name_y;
    FETCH tbls_some_fields INTO table_name_n;
    WHILE tbls_some_fields%FOUND LOOP
    BEGIN
    IF upper (sql_stmt) like 'SELECT%' THEN
    BEGIN
    RETURN ('FALSE');
    v_match:='FALSE';
    END;
    ELSIF
    ( ((sql_stmt LIKE '%ID_NUMBER%' ) OR (sql_stmt LIKE '%id_number%' )) AND (sql_stmt LIKE table_name_n) )
    OR
    ( ((sql_stmt LIKE '%ADDRESS%') OR (sql_stmt LIKE '%address%')) AND (sql_stmt LIKE table_name_n) )
    OR
    ( (((sql_stmt LIKE '%EMAIL%') OR (sql_stmt LIKE '%E_MAIL%')) OR (sql_stmt LIKE '%email%') OR (sql_stmt LIKE '%e_mail%') ) AND (sql_stmt LIKE table_name_n) )
    OR
    (( (sql_stmt LIKE '%BANK%') or (sql_stmt LIKE '%bank%')) AND (sql_stmt LIKE table_name_n) )
    OR
    ( ((sql_stmt LIKE '%PYM%') OR (sql_stmt LIKE '%PYM%')) AND (sql_stmt LIKE table_name_n) )
    OR
    ( ((sql_stmt LIKE '%CREDIT_CARD%') OR (sql_stmt LIKE '%credit_card%')) AND (sql_stmt LIKE table_name_n) )
    OR
    ( ( (sql_stmt LIKE '%USER%') OR (sql_stmt LIKE '%user%') )AND (sql_stmt LIKE table_name_n) )
    OR
    ( ((sql_stmt LIKE '%CHURN%') OR (sql_stmt LIKE '%churn%') ) AND (sql_stmt LIKE table_name_n) )
    OR
    ( ((sql_stmt LIKE '%LEGAL%') OR (sql_stmt LIKE '%legal%') ) AND (sql_stmt LIKE table_name_n) )
    THEN
    BEGIN
    v_match:='TRUE';
    RETURN ('TRUE');
    END;
    ELSE
    v_match:='FALSE';
    END IF;
    FETCH tbls_some_fields INTO table_name_n;
    END;
    END LOOP;
    WHILE tbls_all_fields%FOUND LOOP
    BEGIN
    IF upper (sql_stmt) like 'SELECT%' THEN
    BEGIN
    v_match:='FALSE';
    RETURN ('FALSE');
    END;
    ELSIF (sql_stmt LIKE table_name_y) THEN
    BEGIN
    v_match:='TRUE';
    RETURN ('TRUE');
    END;
    ELSE
    BEGIN
    v_match:='FALSE';
    RETURN ('FALSE');
    END;
    END IF;
    FETCH tbls_all_fields INTO table_name_y;
    END;
    END LOOP;
    RETURN (v_match);
    END;
    Eexampls that should should be true:
    select sens_entity_match ('update address_data set "EMAIL" = :24 where rowid= :old_rowid') from dual;
    {address_data is a sensitive_table that exists in "sensitive_tables" table and email is a sensitive column}
    select sens_entity_match ('isnert into legal (ssss) select bbbb from input where rowid = 666;') from dual;
    {legal  is a sensitive_table that exists in "sensitive_tables" table and all its columns are sensitive}
    An example that shouldn't should be true:
    select sens_entity_match ('select bank from bank_details where bank_id= 11;') from dual;
    {The SQL text is a select statement}
    The function complies and works, but it doesn't catch all the SQL Statements that are relevant.
    How can I improve it?
    What should I change?
    I would appriricate any help.
    Thanks,
    Roni.

    Hi user611218!
    If I understud right, then you want to have some kind of auditing. I suggest if want auditing than you should use the auditing capabilities of Oracle (Standard auditing and Fine Grained Auditing). It's much easier to generate a report from an Auditingtrail than to create a "Self-Made-Function".
    But if you prefer the soluting with your function then you should change the following:
    ELSIF( ((sql_stmt LIKE '%ID_NUMBER%' ) OR (sql_stmt LIKE '%id_number%' )) AND (sql_stmt LIKE table_name_n) )
    CHANGE IT TO
    ELSIF ((INSTR(LOWER(sql_stmt), 'id_number') > 0)) AND (INSTR(LOWER(sql_stmt), LOWER(table_name_n))))
    Change all the LIKE ... Statements to INSTR ... like above.
    Hope this helps!

  • Sending XML file from SAP to Windows Based file server with FTP function

    Hi Gurus,
    We are using SAP BW 3.0B version.
    I need to convert data in ODS to XML format and send this XML file to remote server which  is not a SAP application server, it is just a Window Based file server with FTP function..
    By writing some ABAP code I have converted ODS data into XML format (which gets saved in my local system)
    (Is that I need to put this file in Application Server to send it to the other servers? )
    Now the thing is how I can send this file to that Windows Based file server.
    plz suggest me.... what can be done......
    Thanks in Advance
    Madhusudhan
    Edited by: Madhusudhan Raju on Dec 3, 2009 4:25 AM

    I dont think the above code support windows OS. Because I always execute this script via UNIX.
    I think you can try this option, go to command prompt, goto the destination path where you have an XML file using cd....
    ftp (destination servername), specify the username and password.
    afterthat, use the command put and filename.
    check whether the file had reached destination successfully or not.
    For automation purpose, you can use the following script like
    ftp: -s: test.txt  (servername)
    In test.txt,
    UserName
    Password
    bin
    cd /files
    put file.xml
    bye
    Also, you can check in SM69, there will be some SAP external commands to automate the file transfer.
    Thanks
    Sat
    http://support.microsoft.com/?kbid=96269

Maybe you are looking for

  • Photoshop CC crashes on MAC 10.8.5

    Hi. Since today, but with no change on the mac, Photoshop CC just crashes when opening or few minutes after its opened. Can you help me with that? Thanks Process:         Adobe Photoshop CC [1111] Path:            /Applications/Adobe Photoshop CC/Ado

  • Update Thousands of Rows in Database??

    I am new to EJB. I wish to use entity bean for records in a table. But sometimes, I would update all or many records in the table in a manner like "UPDATE EMPLOYEE SET SALARY = SALARY * 1.1" in such case the SQL can be executed in the database tier.

  • What are the best practices for backing up SAP B1?

    Right now, we are using a nightly tape back up. Is this sufficient? Or are there other, better options? Thank you! John Sefton

  • A problem with connecting my mixer to the laptop

    Hi. i got my new Dynacord powermate 600-3 mixer last night and i connected to my macbook pro using USB wire it works perfectly with video recording softweres like photo booth but it does not work with grage band or adobe audition i can see that there

  • Double Click In Some Programs/Clear Suggestion Bar

    Hi, Does anyone else have a issue where your Mac will click twice in some programs, such a Launchpad or Dashboard? Also the suggestion bar is transparent on Safari. These happened to me after i upgraded to Yosemite. Do you have a solution? I reported