Using Formatting Objects Processor ....

Нi All!
I have a data stored in my DB in UTIF-8. I' m using Formatting Objects Processor to transform Oracle APEX 2.2.report output into PDF document.
It's a dust on the screen after loading my report in Adobe Photoshop. The text on the screen in CP1251. It's realy dust.
Excuse me for my bad English...
Нow to solve problem ?
Any ideas...
Thanks,
Roman

Hi Roman,
Excuse me for my bad English...Your English is far better than my attempts at a foreign language are.
However I'm not sure what you mean by this -
It's realy dust.Can you try and explain it in other words?

Similar Messages

  • PDFs Using Formatting Objects Processor

    I'm having problems rendering pdf documents using FOP as detailed in your document 'Rendering Oracle HTML DB Reports as PDFs Using Formatting Objects Processor'.
    When I call the pdf_GrabXML to send the XML report output to the htmldb_fop_render.jsp file I get the following error:
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:/opt/oracle/midtier/9.0.4/j2ee/home/application-deployments/default/defaultWebApp/persistence/_pages//_htmldb__fop__render.java
    8 package org.apache.fop.apps does not exist import org.apache.fop.apps.Driver;
    93 [jsp src:line #:44] cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    93 [jsp src:line #:44]cannot resolve symbol symbol : class Driver location: class htmldb_fop__render Driver driver = new Driver();
    96 [jsp src:line #:47] cannot resolve symbol symbol : variable Driver location: class htmldb_fop__render driver.setRenderer(Driver.RENDER_PDF);
    NOTE:
    We did not have a oc4j directory under $ORACLE_HOME. We have, therefore, placed htmldb_fob_render.jsp and htmldb_example.xslt in the following directory: $ORACLE_HOME/2jee/home/default-web-app. The var g_Render_URL in javascript file (htmldb_pdf.js) was modified to http://<host name>:<port>/j2ee/htmldb_fop_render.jsp.

    Kris,
    I placed the three jar files into the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory (recall that I don't have a oc4j directory) and I changed the library entries in the application.xml file to point to this directory. The htmldb_pdf.js now seems to find the jar files but I now get an error that indicates I'm not able to make a connection:
    java.net.ConnectException: Connection refused     at java.net.PlainSocketImpl.socketConnect(Native Method)     at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)     at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)     at java.net.Socket.connect(Socket.java:452)     at java.net.Socket.connect(Socket.java:402)     at sun.net.NetworkClient.doConnect(NetworkClient.java:139)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)     at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)     at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)     at sun.net.www.http.HttpClient.New(HttpClient.java:339)     at sun.net.www.http.HttpClient.New(HttpClient.java:320)     at sun.net.www.http.HttpClient.New(HttpClient.java:315)     at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)     at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)     at java.net.URL.openStream(URL.java:913)     at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2133)     at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:257)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:200)     at oracle.xml.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:557)     at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:230)     at htmldb_fop__render._jspService(_htmldb__fop__render.java:76)     [SRC:/htmldb_fop_render.jsp:27]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    QUESTIONS:
    1. Should I place all jar files in the $ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib directory . . . there are several jar files that are not referenced in the application.xml file.
    2. Should the port number that is defined in the htmldb_pdf.js and htmldb_fop_render.jsp files be the HTTP Server Listener port.
    Thanks,
    David

  • Oracle support format object processor?

    I want to create a pdf web report using pl/sql backend procedure. My procedure return the xml document which
    using formatting tags(<fo:..>)
    Is it possible to develop this using xsql or
    any xml technologies. Is Oracles supporting Format object processing in their xdk?
    thanks in advance

    Could you further clarify what do you try to achieve?
    ~ Madrid
    http://hrivera99.blogspot.com/

  • OC4J and FOP (Formatting Objects Processor)

    Hi,
    I have standalone OC4J and I deployed fop.war into it. But when i try access http://[hostname]:8888/fop/apex_fop.jsp i am getting error in logs:
    2007-10-04 10:42:53.799 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:/opt/oracle/OC4J/j2ee/home/application-deployments/default/defaultWebApp/persistence/_pages/_fop/_fop/_apex__fop.java</H3><TABLE BORDER=1 WIDTH=100%><TR><TH ALIGN=CENTER>Line #</TH><TH ALIGN=CENTER>Error</TH></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>11</TD><TD> package org.apache.fop.apps does not exist
    import org.apache.fop.apps.Driver;
    </TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>12</TD><TD> package org.apache.fop.apps does not exist
    import org.apache.fop.apps.Options;
    </TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>89</TD><TD>[jsp src:line #:38]<br> cannot resolve symbol
    symbol : class Driver
    location: class fop.fop._apex__fop
    Driver driver = new Driver();
    </TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>89</TD><TD>[jsp src:line #:38]<br> cannot resolve symbol
    symbol : class Driver
    location: class fop.fop._apex__fop
    Driver driver = new Driver();
    </TD></TR><TR><TD WIDTH=7% VALIGN=TOP><P ALIGN=CENTER>92</TD><TD>[jsp src:line #:41]<br> cannot resolve symbol
    symbol : variable Driver
    location: class fop.fop._apex__fop
    driver.setRenderer(Driver.RENDER_PDF);
    </TD></TR></TABLE>
    Any ideas why this is happening?
    M

    Looks like the libraries or at least the Driver class used by FOP is not accessible.
    What's in fop.war -- it is fully self contained where the dependent libraries are in web-inf/lib or is it expecting them to be provided outside of the application?
    Where'd you get fop.war from, I can take a look and see.
    -steve-

  • Using format mask on columns in the Object Browser

    Hello,
    Is it possible to format Object Browser columns of type DATE or NUMBERS? I tried do define a default UI but to no avail. Any other ideas?
    Thanks,
    Arie.

    Any ideas on how/if it can be done?
    Thanks,
    Arie.

  • Warning: Unknown formatting object ^html

    Hi,
    I am trying to convert an .fo file into PDF format using a servlet. The code compiled, but when I try to run the servlet it gives me the following warning:
    Unknown formatting object ^html
    Exception in transformation: null
    and does not create the pdf file.
    The line: 'driver.buildFOTree(parser, in);' seems to be the problem.
    Here is the code ('in' is the .fo file):
    XMLReader parser = XMLReaderFactory.createXMLReader();
    Driver driver = new Driver();
    driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",
                   Version.getVersion());
    driver.addElementMapping               ("org.apache.fop.fo.StandardElementMapping");
    driver.addElementMapping("org.apache.fop.svg.SVGElementMapping");
    driver.addPropertyList               ("org.apache.fop.fo.StandardPropertyListMapping");
    driver.addPropertyList               ("org.apache.fop.svg.SVGPropertyListMapping");
    driver.buildFOTree(parser, in);
    driver.format();
    driver.setWriter(new PrintWriter(new FileWriter("new_file.pdf")));
    driver.render();
    out.flush();
    Does anyone know what might be the problem here?
    Thanks in advance!
    Elena.

    I see - the other part of the code that is converting an xml file into an .fo file converted it into an .html file instead.
    public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {
    System.setProperty("javax.xml.transform.TransformerFactory",
    "org.apache.xalan.processor.TransformerFactoryImpl");
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
    "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
    System.setProperty("javax.xml.parsers.SaxParserFactory",
    "xorg.apache.xerces.jaxp.SaxParserFactoryImpl");
    System.setProperty("javax.xml.parsers.SAXParserFactory","org.apache.xerces.jaxp.SAXParserFactoryImpl");
    response.setContentType("application/pdf");
    PrintWriter out = response.getWriter();
    String xslPath = "top.xsl";
    String xmlPath = "top.xml";
    String foPath = "top.fo";
              try{
                   TransformerFactory tfactory = TransformerFactory.newInstance();
                   String filepath = foPath;
                   Transformer transformer = tfactory.newTransformer(new StreamSource(getServletContext().getResource(xslPath).toString()));
                   transformer.transform(new StreamSource(getServletContext().getResource(xmlPath).toString()),new StreamResult(new FileOutputStream(filepath )));
                   InputSource fopfile = new InputSource(filepath);
                   buildPDFFromFO(fopfile,out);
                   out.flush();
              catch(Exception ex){
                   System.out.println          }
    The fo file that resulted from this looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <html>
    <body>
    <table bgcolor="yellow" border="2">
    <tr>
    <th>Artist</th>
    <th>Song</th>
    </tr>
    <tr>
    <td>Pinky</td>
    <td>Bye-bye</td>
    </tr>
    <tr>
    <td>LOLO3</td>
    <td>Austin</td>
    </tr>
    <tr>
    <td>Hello</td>
    <td>Kuku</td>
    </tr>
    </table>
    </body>
    </html>
    Does anybody know why it didn't convert it correctly.
    I am really new to all this stuff.
    Thanks in advance for your help!!!
    Elena.

  • Dump - Access using NULL object reference is not possible!!!

    Hi,
    I'm using the BCS class for sending HTM format email so i use the below code for that its working,
    DATA: gr_document      TYPE REF TO cl_document_bcs,
    gr_document = cl_document_bcs=>create_document(
                          i_type    = 'HTM'
                           i_text    = t_html
                           i_importance = '5'
                           i_subject = gc_subject ).
    Next task is to send the image so i'm creating an another object to the same class, below code
    *Image from MIME
    DATA: o_mr_api         TYPE REF TO if_mr_api.
    DATA is_folder TYPE boole_d.
    DATA l_img1 TYPE xstring.
    DATA l_img2 TYPE xstring.
    DATA l_loio TYPE skwf_io.
    DATA: lo_document   TYPE REF TO cl_document_bcs.
    IF o_mr_api IS INITIAL.
       o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
    ENDIF.
    CALL METHOD o_mr_api->get
       EXPORTING
         i_url              = '/SAP/PUBLIC/ZDEMO/tick.png'
       IMPORTING
         e_is_folder        = is_folder
         e_content          = l_img1
         e_loio             = l_loio
       EXCEPTIONS
         parameter_missing  = 1
         error_occured      = 2
         not_found          = 3
         permission_failure = 4
         OTHERS             = 5.
    CALL METHOD o_mr_api->get
       EXPORTING
         i_url              = '/SAP/PUBLIC/ZDEMO/Delete.png'
       IMPORTING
         e_is_folder        = is_folder
         e_content          = l_img2
         e_loio             = l_loio
       EXCEPTIONS
         parameter_missing  = 1
         error_occured      = 2
         not_found          = 3
         permission_failure = 4
         OTHERS             = 5.
    *Convert XSTRING to ITAB
    DATA :lt_hex1 TYPE solix_tab,
           lt_hex2 TYPE solix_tab,
           ls_hex LIKE LINE OF lt_hex1,
           lv_img1_size TYPE sood-objlen,
           lv_img2_size TYPE sood-objlen.
    CLEAR : lt_hex1, lt_hex2, ls_hex, lv_img1_size, lv_img2_size.
    WHILE l_img1 IS NOT INITIAL.
       ls_hex-line = l_img1.
       APPEND ls_hex TO lt_hex1.
       SHIFT l_img1 LEFT BY 255 PLACES IN BYTE MODE.
    ENDWHILE.
    WHILE l_img2 IS NOT INITIAL.
       ls_hex-line = l_img2.
       APPEND ls_hex TO lt_hex2.
       SHIFT l_img2 LEFT BY 255 PLACES IN BYTE MODE.
    ENDWHILE.
    *Findthe Size of the image
    DESCRIBE TABLE lt_hex1 LINES lv_img1_size.
    DESCRIBE TABLE lt_hex2 LINES lv_img2_size.
    lv_img1_size = lv_img1_size * 255.
    lv_img2_size = lv_img2_size * 255.
    *Attach Images
    clear: lo_document.
    lo_document->add_attachment(
       EXPORTING
         i_attachment_type     =  'png'                  " Document Class for Attachment
         i_attachment_subject  =  'img1'                " Attachment Title
         i_attachment_size     =  lv_img1_size           " Size of Document Content
         i_att_content_hex     =  lt_hex1  " Content (Binary)
    lo_document->add_attachment(
       EXPORTING
         i_attachment_type     =  'png'                  " Document Class for Attachment
         i_attachment_subject  =  'img2'                " Attachment Title
         i_attachment_size     =  lv_img2_size           " Size of Document Content
         i_att_content_hex     =  lt_hex2  " Content (Binary)
    but it throws the dump " Access using NULL object reference is not possible"  when i tries to access for method add_attachment...
    Thanks,
    Siva

    Yes there is commit work after that, Below code
          gr_document = cl_document_bcs=>create_document(
                           i_type    = 'HTM'
                            i_text    = t_html
                            i_importance = '5'
                            i_subject = gc_subject ).
    *Image from MIME
    DATA: o_mr_api         TYPE REF TO if_mr_api.
    DATA is_folder TYPE boole_d.
    DATA l_img1 TYPE xstring.
    DATA l_img2 TYPE xstring.
    DATA l_loio TYPE skwf_io.
    DATA: lo_document   TYPE REF TO cl_document_bcs.
    IF o_mr_api IS INITIAL.
       o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
    ENDIF.
    CALL METHOD o_mr_api->get
       EXPORTING
         i_url              = '/SAP/PUBLIC/ZDEMO/tick.png'
       IMPORTING
         e_is_folder        = is_folder
         e_content          = l_img1
         e_loio             = l_loio
       EXCEPTIONS
         parameter_missing  = 1
         error_occured      = 2
         not_found          = 3
         permission_failure = 4
         OTHERS             = 5.
    CALL METHOD o_mr_api->get
       EXPORTING
         i_url              = '/SAP/PUBLIC/ZDEMO/Delete.png'
       IMPORTING
         e_is_folder        = is_folder
         e_content          = l_img2
         e_loio             = l_loio
       EXCEPTIONS
         parameter_missing  = 1
         error_occured      = 2
         not_found          = 3
         permission_failure = 4
         OTHERS             = 5.
    *Convert XSTRING to ITAB
    DATA :lt_hex1 TYPE solix_tab,
           lt_hex2 TYPE solix_tab,
           ls_hex LIKE LINE OF lt_hex1,
           lv_img1_size TYPE sood-objlen,
           lv_img2_size TYPE sood-objlen.
    CLEAR : lt_hex1, lt_hex2, ls_hex, lv_img1_size, lv_img2_size.
    WHILE l_img1 IS NOT INITIAL.
       ls_hex-line = l_img1.
       APPEND ls_hex TO lt_hex1.
       SHIFT l_img1 LEFT BY 255 PLACES IN BYTE MODE.
    ENDWHILE.
    WHILE l_img2 IS NOT INITIAL.
       ls_hex-line = l_img2.
       APPEND ls_hex TO lt_hex2.
       SHIFT l_img2 LEFT BY 255 PLACES IN BYTE MODE.
    ENDWHILE.
    *Findthe Size of the image
    DESCRIBE TABLE lt_hex1 LINES lv_img1_size.
    DESCRIBE TABLE lt_hex2 LINES lv_img2_size.
    lv_img1_size = lv_img1_size * 255.
    lv_img2_size = lv_img2_size * 255.
    *Attach Images
    create object lo_document type cl_document_bcs.
    lo_document->add_attachment(
       EXPORTING
         i_attachment_type     =  'png'                  " Document Class for Attachment
         i_attachment_subject  =  'img1'                " Attachment Title
         i_attachment_size     =  lv_img1_size           " Size of Document Content
         i_att_content_hex     =  lt_hex1  " Content (Binary)
    lo_document->add_attachment(
       EXPORTING
         i_attachment_type     =  'png'                  " Document Class for Attachment
         i_attachment_subject  =  'img2'                " Attachment Title
         i_attachment_size     =  lv_img2_size           " Size of Document Content
         i_att_content_hex     =  lt_hex2  " Content (Binary)
           "Add document to send request
           CALL METHOD gr_send_request->set_document( gr_document ).
           TRY.
             CALL METHOD gr_send_request->SET_SEND_IMMEDIATELY
               EXPORTING
                 I_SEND_IMMEDIATELY = 'X'.
    *    CATCH CX_SEND_REQ_BCS INTO BCS_EXCEPTION .
    **Catch exception here
           ENDTRY.
           DATA: LO_SENDER TYPE REF TO IF_SENDER_BCS VALUE IS INITIAL.
           TRY.
             LO_SENDER = CL_SAPUSER_BCS=>CREATE( SY-UNAME ). "sender is the logged in user
    * Set sender to send request
             gr_send_request->SET_SENDER(
             EXPORTING
             I_SENDER = LO_SENDER ).
    *    CATCH CX_ADDRESS_BCS.
    ****Catch exception here
           ENDTRY.
           "Send email
           CALL METHOD gr_send_request->send(
             EXPORTING
               i_with_error_screen = 'X'
             RECEIVING
               result              = gv_sent_to_all ).
           IF gv_sent_to_all = 'X'.
             WRITE 'Email sent!'.
           ENDIF.
           "Commit to send email
           COMMIT WORK.
           "Exception handling
         CATCH cx_bcs INTO gr_bcs_exception.
           WRITE:
             'Error!',
             'Error type:',
             gr_bcs_exception->error_type.
       ENDTRY.

  • I can't seem to get individual elements when comparing 2 arrays using Compare-Object

    My backup software keeps track of servers with issues using a 30 day rolling log, which it emails to me once a week in CSV format. What I want to do is create a master list of servers, then compare that master list against the new weekly lists to identify
    servers that are not in the master list, and vice versa. That way I know what servers are new problem and which ones are pre-existing and which ones dropped off the master list. At the bottom is the entire code for the project. I know it's a bit much
    but I want to provide all the information, hopefully making it easier for you to help me :)
    Right now the part I am working on is in the Compare-NewAgainstMaster function, beginning on line 93. After putting one more (fake) server in the master file, the output I get looks like this
    Total entries (arrMasterServers): 245
    Total entries (arrNewServers): 244
    Comparing new against master
    There are 1 differences.
    InputObject SideIndicator
    @{Agent= Virtual Server in vCenterServer; Backupse... <=
    What I am trying to get is just the name of the server, which should be $arrDifferent[0] or possibly $arrDifferent.Client. Once I have the name(s) of the servers that are different, then I can do stuff with that. So either I am not accessing the array
    right, building the array right, or using Compare-Object correctly.
    Thank you!
    Sample opening lines from the report
    " CommCells > myComCellServer (Reports) >"
    " myComCellServer -"
    " 30 day SLA"
    CommCell Details
    " Client"," Agent"," Instance"," Backupset"," Subclient"," Reason"," Last Job Id"," Last Job End"," Last Job Status"
    " myServerA"," vCenterServer"," VMware"," defaultBackupSet"," default"," No Job within SLA Period"," 496223"," Nov 17, 2014"," Killed"
    " myServerB"," Oracle Database"," myDataBase"," default"," default"," No Job within SLA Period"," 0"," N/A"," N/A"
    Entire script
    # things to add
    # what date was server entered in list
    # how many days has server been on list
    # add temp.status = pre-existing, new, removed from list
    # copy sla_master before making changes. Copy to archive folder, automate rolling 90 days?
    ## 20150114 Created script ##
    #declare global variables
    $global:arrNewServers = @()
    $global:arrMasterServers = @()
    $global:countNewServers = 1
    function Get-NewServers
    Param($path)
    Write-Host "Since we're skipping the 1st 6 lines, create test to check for opening lines of report from CommVault."
    write-host "If not original report, break out of script"
    Write-Host ""
    #skip 5 to include headers, 6 for no headers
    (Get-Content -path $path | Select-Object -Skip 6) | Set-Content $path
    $sourceNewServers = get-content -path $path
    $global:countNewServers = 1
    foreach ($line in $sourceNewServers)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0].Substring(2, $tempLine[0].Length-3)
    $temp.Agent = $tempLine[1].Substring(2, $tempLine[1].Length-3)
    $temp.Backupset = $tempLine[3].Substring(2, $tempLine[3].Length-3)
    $temp.Reason = $tempLine[5].Substring(2, $tempLine[5].Length-3)
    #write temp object to array
    $global:arrNewServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countNewServers ++
    Write-Host ""
    $exportYN = Read-Host "Do you want to export new servers to new master list?"
    $exportYN = $exportYN.ToUpper()
    if ($exportYN -eq "Y")
    $exportPath = Read-Host "Enter full path to export to"
    Write-Host "Exporting to $($exportPath)"
    foreach ($server in $arrNewServers)
    $newtext = $Server.Client + ", " + $Server.Agent + ", " + $Server.Backupset + ", " + $Server.Reason
    Add-Content -Path $exportPath -Value $newtext
    function Get-MasterServers
    Param($path)
    $sourceMaster = get-content -path $path
    $global:countMasterServers = 1
    foreach ($line in $sourceMaster)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0]
    $temp.Agent = $tempLine[1]
    $temp.Backupset = $tempLine[2]
    $temp.Reason = $tempLine[3]
    #write temp object to array
    $global:arrMasterServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countMasterServers ++
    function Compare-NewAgainstMaster
    Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    Write-Host "Total entries (arrNewServers): $($countNewServers)"
    Write-Host "Comparing new against master"
    #Compare-Object $arrMasterServers $arrNewServers
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Write-Host "There are $($arrDifferent.Count) differences."
    foreach ($item in $arrDifferent)
    $item
    ## BEGIN CODE ##
    cls
    $getMasterServersYN = Read-Host "Do you want to get master servers?"
    $getMasterServersYN = $getMasterServersYN.ToUpper()
    if ($getMasterServersYN -eq "Y")
    $filePathMaster = Read-Host "Enter full path and file name to master server list"
    $temp = Test-Path $filePathMaster
    if ($temp -eq $false)
    Read-Host "File not found ($($filePathMaster)), press any key to exit script"
    exit
    Get-MasterServers -path $filePathMaster
    $getNewServersYN = Read-Host "Do you want to get new servers?"
    $getNewServersYN = $getNewServersYN.ToUpper()
    if ($getNewServersYN -eq "Y")
    $filePathNewServers = Read-Host "Enter full path and file name to new server list"
    $temp = Test-Path $filePathNewServers
    if ($temp -eq $false)
    Read-Host "File not found ($($filePath)), press any key to exit script"
    exit
    Get-NewServers -path $filePathNewServers
    #$global:arrNewServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrNewServers): $($countNewServers)"
    #Write-Host ""
    #$global:arrMasterServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    #Write-Host ""
    Compare-NewAgainstMaster

    do not do this:
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Try this:
    $arrDifferent = Compare-Object $arrMasterServers $arrNewServers -PassThru
    ¯\_(ツ)_/¯
    This is what made the difference. I guess you don't have to declare arrDifferent as an array, it is automatically created as an array when Compare-Object runs and fills it with the results of the compare operation. I'll look at that "pass thru" option
    in a little more detail. Thank you very much!
    Yes - this is the way PowerShell works.  You do not need to write so much code once you understand what PS can and is doing.
    ¯\_(ツ)_/¯

  • Using Date objects in SQL statements

    Hi, I am wondering if it is possible to use Date objects while trying to retrieve entries from an access database with fields set as "Date/Time" fields, as opposed to "Text"? If so, do I need to reformat it before inserting it into the SQL statement, or can I just leave it as a Date object, and call up the variable name?
    For example - "SELECT * FROM database WHERE startDate = ' " + dateObject + ' ". And do i need quotes round this value?
    Thanks in advance.

    I had some problems by just fetching a date and pushing it back to a MS SQL Database.
    I used the following reformating step to fix it:
    if (o instanceof Timestamp)
    String time = o.toString().substring(8,10)+"."+o.toString().substring(5,7)+"."+o.toString().substring(0,4)+" "+o.toString().substring(11,19);
    ht.put(columnName, time);
    o is the object i receve from the select statement and ht is a Hashtable where i put my data.
    To write the data back i now can use:
    UPDATE table SET columnname = 'valueOfColumn'
    This means i use the value i created above in Quotes to write it back.
    Format of Timestamp.toString() is something like yyyy-mm-dd hh:mm:ss.xx
    Format used by MS SQL (and i think by Access to) 'dd.mm.yyyy hh:mm:ss'

  • Zip Payload using PayloadZipBean Module Processor

    Hi,
    I'm using AF_Modules/PayloadZipBean in module processor of Receiver SOAP adapter to compress/zip the message payload. I've used the following module key parameters :
    Parameter Name      Parameter Value
    zip.Mode                  zipAll
    zip.filenameKey        contentType
    In the adapter engine monitoring from RWB I can see the following warning message :
    Warning Zip: message is empty or has no payload
    But I can see the msg payload from the RWB message monitor as expected.
    Can anyone please throw any light on this issue?
    Thanks in advance,
    Dipankar

    Hi Stefan,
    Can you please explain what you meant by transfer-encoding gzip?
    Actually the requirement is to receive xml message in compressed zipped  format along with digital signature. As I understand using the ModuleProcessor which you mentioned in your blog I can send zipped message (using File Adapter I've actually achieved the result as mentioned in your blog. So thanks a lot for that!). But in file adapter I can't use digital signature. So how to satisfy both the requirements using a single adapter (and maybe using some module processors over it)?
    Thanks for your help!
    Dipankar

  • Using 3DS objects in CS4 Extended

    I purchased the extended version of Photoshop CS4 this time as my cadd software can save 3d models as 3DS format. I have tried bringing in those 3d entities into a 3d layer but nothing happens. I read somewhere that the third parties have to have a plug-in for Photoshop. I know my cadd software does not (DataCad) but all I read about the 3d thing in Cs4 never mentioned that. Kind of the only reason I paid for the extended aspect of it so I am hoping someone knows how to make this work together. Any ideas?

    Sorry to sound like a dummy; I'm not understanding your comment about providing the file from another website? I have the cadd software I am using and created a 3d object to send to you. How do I do that without attaching it to the email?
    Subject: using 3DS objects in CS4 Extended
    Attachments don't work, so please provide the file from another website. tesselation refers to converting BRep surfaces to polygons. Dunno how it is handled in your program, but it's eitehr automatic in the file exporters or a dedicated function somewhere. PS only accepts 3DS, OBJ, DAE and U3D files, so the other formats are no option. And if you don't mind: Please do not attach addresses and signatures. The forum rules clearly strate "no self-promotion". Thank you.
    Mylenium

  • Using Date objects in PDV tables

    Hi,
    Using SAP EP 6.0, SP9 and MSS 6.1.3, we're having at bit of trouble using other object types than String i PDV tables. The Java syntax allows for specifying other types by means of
    table.getColumn( "colName" ).setDataType( DataType.DATE );
    But nothing shows in the table; the cells are just left blank.
    Has anyone succeeded in specifying the data type?
    Thanks in advance,
    Rasmus

    I had some problems by just fetching a date and pushing it back to a MS SQL Database.
    I used the following reformating step to fix it:
    if (o instanceof Timestamp)
    String time = o.toString().substring(8,10)+"."+o.toString().substring(5,7)+"."+o.toString().substring(0,4)+" "+o.toString().substring(11,19);
    ht.put(columnName, time);
    o is the object i receve from the select statement and ht is a Hashtable where i put my data.
    To write the data back i now can use:
    UPDATE table SET columnname = 'valueOfColumn'
    This means i use the value i created above in Quotes to write it back.
    Format of Timestamp.toString() is something like yyyy-mm-dd hh:mm:ss.xx
    Format used by MS SQL (and i think by Access to) 'dd.mm.yyyy hh:mm:ss'

  • Error Loged On user does not have permission to use this object

    Hi all,
    I am trying to Export Document Data in XML format
    for OSalesinvoice or oPurchaseInovice object it is working fine
      But if i use oPurchaseTaxInvoice it is giving error
    "An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in myDUAPI.exe "
    "Additional information: The Loged On user does not have permission to use this object"
    I have logged as "manger" "manager"
    Dim oInv As SAPbobsCOM.Documents
            'oInv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            'oInv = vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
            oInv = vCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseTaxInvoice)
            If oInv.GetByKey("9") Then
                oInv.SaveXML("C:\downloads\purinvtax.xml")
            Else
                MessageBox.Show("couldn't find it")
            End If

    Hi Sudish,
    It looks to me that the logged on user is only a CRM user. You need to have a professional user license to access Invoices.
    If you're using only the DI API, please check which user name you are using to connect to DI. If you're using UI API with single sign on, the logged on user to SBO is not a professional user or don't have the correct authorisation.
    Hope it helps,
    Adele

  • PropertyAssignmentException if using Format-Table

    Hey,
    I try to create Excel worksheets for each running process.
    $Excel = New-Object -ComObject Excel.Application
    function SelectApps
    BEGIN {}
    PROCESS {Get-Process | Select ProcessName | Group ProcessName | Format-Table Name -Auto}
    END {}
    ForEach ($i in SelectApps)
    $Excel.Worksheets.Add()
    $Excel.Worksheets.Item(1).Name = "$i"
    #$i
    But this doesn't work and ends with the following Error.
    Ausnahme beim Festlegen von "Name": "Der eingegebene Name für ein Blatt oder Diagramm ist ungültig. Stellen Sie Folgendes sicher:
    • Der eingegebene Name weist maximal 31 Zeichen auf.
    • Der Name enthält keines der folgenden Zeichen: : \ / ? * [ oder ]
    • Es wurde ein Name eingegeben."
    Bei Zeile:4 Zeichen:31
    + $Excel.Worksheets.Item(1). <<<< Name = "$i"
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException
    What I need to do to solve this problem?
    Greetings
    Uemit

    Don't use format-* if you are expecting to do more with the data. PowerShell adds its own custom formatting to the data and essentially ruins it for use with anything else other than displaying it on the console.
    More info:
    http://learn-powershell.net/2012/04/18/scripting-games-2012-know-when-to-use-format-table/
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Are AS3 timers make use of multi processor cores?

    Can anyone tell if a Timer in AS3 will force Flash player to create a new Thread internally and so make use of another processor core on a multicore processor?
    To Bernd: I am asking because onFrame I can just blit the prepared in a timer handler function frame. I mean to create a timer running each 1ms and call the emulator code there and only show generated pixels in the ON_ENTER_FRAME handler function. In that way, theoretically, the emulator will use in best case a whole CPU-core. This will most probably not reach the desired performance anyway, but is still an improvement. Still, as I mentioned in my earlier posts, Adobe should think of speeding up the AVM. It is still generally 4-5 slower than Java when using Alchemy. Man, there must be a way to speed up the AVM, or?
    For those interested what I am implementing, look at:
    Sega emulated games in flash 
    If moderators think that this link is in some way an advertisement and harms the rules of this forum, please feel free to remove it. I will not be offended at all.

    Hello Boris,
    thanks for taking the time and explaining why your project needs 60 fps. If I understand you correctly those 60 fps are necessary to maintain full audio samples rate. You said your emulator collects sound samples at the frame rate and the reduced sampling rate of 24/60 results in "choppy sound". Are there any other reasons why 60 fps are necessary? The video seems smooth.
    That "choppy sound" was exactly what I was hearing when you sent me the source code of your project. But did you notice that I "solved" (read: "hacked around") the choppy sound problem even at those bad sampling rates? First off, I am not arguing with you about whether you need 60fps, or not. You convinced me that you do need 60fps. I still want to help you solve your problem (it might take a while until you get a FlashPlayer that delivers the performance you need).
    But maybe it is a good time to step back for a moment and share some of the results of your and my performance improvements to your project first. (Please correct me if my numbers are incorrect, or if you disagree with my statements):
    1) Embedding the resources instead of using the URLLoader.
    Your version uses URLLoader in order to load game resources. Embedding the resources instead does not increase the performance. But I find it more elegant and easier to use. Here is how I did it:
    [Embed(source="RESOURCES.BIN", mimeType="application/octet-stream")]
    private var EmbeddedBIN:Class;
    const rom : ByteArray = new EmbeddedBIN;
    2) Sharing ByteArrays between C code and AS code.
    I noticed that your code copied a lot of bytes between video and audio memory buffers on the C side into a ByteArray that you needed in order to call AS functions. I suggested using a technique for sharing ByteArrays between C code and AS code, which I will explain in a separate post.
    The results of this performance optimization were mildly disappointing: the frame rate only notched up by 1-2 fps.
    3) Optimized switch/case for op table calls
    Your C code used a big function table that allows you to map op codes to functions. I wrote a script that converted that function table to a huge switch/case statement that is equivalent to your function table. This performance optimization was a winner. You got an improvement of 30% in performance. I believe the frame rate suddenly jumped to 25fps, which means that you roughly gained 6fps. I talked with Scott (Petersen, the inventor of Alchemy) and he said that function calls in general and function tables are expensive. This may be a weakness within the Alchemy glue code, or in ActionScript. You can work around that weakness by replacing function calls and function tables with switch/case statements.
    4) Using inline assembler.
    I replaced the MemUser class with an inline assembler version  as I proposed in this post:
    http://forums.adobe.com/thread/660099?tstart=0
    The results were disappointing, there was no noticeable performance gain.
    Now, let me return to my choppy sound hack I mentioned earlier. This is were we enter my "not so perfect world"...
    In order to play custom sound you usually create a sound object and add an EventListener for SampleDataEvent.SAMPLE_DATA:
    _sound = new Sound();
    _sound.addEventListener( SampleDataEvent.SAMPLE_DATA, sampleDataHandler );
    The Flash Player then calls your sampleDataHandler function for retrieving audio samples. The frequency of those requests does not necessarily match with the frequency onFrameEnter is being called. Unfortunately your architecture only gets "tickled" by onFrameEnter, which is currently only being called 25fps. This becomes your bottleneck, because no matter how often the Flash Player asks for more samples, the amount will always be limited by the frame rate. In this architecture you always end up with the FlashPlayer asking for more samples than you have if the frame rate is too low.
    This is bad news. But can't we chat a little bit and assume that the "sample holes" can be filled by using sample neighbors on the time line? In other words, can't we just  stretch the samples? Well, this is what I came up with:
    private function sampleDataHandler(event:SampleDataEvent):void
         if( audioBuffer.length > 0 )
              var L : Number;
              var R : Number;
              //The sound channel is requesting more samples. If it ever runs out then a sound complete message will occur.               
              const audioBufferSize : uint = _swc.sega_audioBufferSize();
              /*     minSamples, see http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html
                   Provide between 2048 and 8192 samples to the data property of the SampleDataEvent object.
                   For best performance, provide as many samples as possible. The fewer samples you provide,
                   the more likely it is that clicks and pops will occur during playback. This behavior can
                   differ on various platforms and can occur in various situations - for example, when
                   resizing the browser. You might write code that works on one platform when you provide
                   only 2048 samples, but that same code might not work as well when run on a different platform.
                   If you require the lowest latency possible, consider making the amount of data user-selectable.                         
              const minSamples : uint = 2048;
              /*     For the maximum sample rate of 44100 we still only get 1470 samples:
                   snd.buffer_size = (rate / vdp_rate) = 44100 / 60 = 735.
                   samples = snd.buffer_size * channels = 735 * 2 = 1470.
                   So we need to stretch the samples until we have at least 2048 samples.
                   stretch = Math.ceil(2048 / (735*2)) = 3.
                   snd.buffer_size * channels * stretch = 735 * 2 * 3 = 2790.
                   Bingo: 2790 > 2048 !
              const stretch : uint = Math.ceil(minSamples / audioBufferSize);
              audioBuffer.position = 0;
              if( stretch == 1 )
                   event.data.writeBytes( audioBuffer );
              else
                   for( var i : uint = 0; i < audioBufferSize; ++i )
                        L = audioBuffer.readFloat();
                        R = audioBuffer.readFloat();
                        for( var k : uint = 0; k < stretch; ++k )
                             event.data.writeFloat(L);
                             event.data.writeFloat(R);
              audioBuffer.position = 0;
    After using that method the sound was not choppy anymore! Even though I did hear a few crackling bits here and there the sound quality improved significantly.
    Please consider this implementation as a workaround until Adobe delivers a FlashPlayer that is 3 times faster :-)
    Best wishes,
    - Bernd

Maybe you are looking for

  • Why is my mbpro mic better than my usb

    I bought a decent plantronics usb microphone - but people keep on telling me the mac mic is better, when they talk to me online. Does anyone know why this is - been through a bunch of usb mics and this is usually the case.  It's annoying because it m

  • Is there any BAPI allowing to retreive dump information in details?

    Dear all, I would like to ask a question about dumps that are sometimes generated on SAP sytems. Each morning, by using the transaction ST22 I can see the dumps that were generated during the precedent day. I click on each dump label then in the menu

  • Multiple sales representitive in Sales order item level

    Hi all, I have multiple sales representitives in Customer Master, eg: 1000 & 1001. when I create SO, i choose 1000 for the sales representitive in Sales order header level, now for item 0010, i need to add in 1001 as another sales representitive , th

  • What to do when database hang

    Hi all, May I know what to do when database hangs after shutdown immediate command perform? Can I use kill process command to stop Oracle process?

  • User can not inherited privilege from Role

    DD1 is a new user, CT_GROUP_USER is a role with all tables access right. 1)First, check the privilege of role CT_GROUP_USER select table_name,privilege from dba_tab_privs where grantee='CT_GROUP_USER' we can see CT_GROUP_USER have ALL tables' privile