Writing my own droplet

Hi,
I am learning how to write my own droplet.
In this droplet I have to take input from user as an integer value and then in output I have to print the values from 1 to that input valuue.
Please help me regarding this.
Regards,
Prateek G

If I want to give a text box where user has to fill the value and then click on a submit button the result will show under that text box.So How can I implement this ?
>
In such type of requirement you can try like below:
[1]. write input.jsp
input.jsp:
<html>
     <head>
          <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
          </script>
          <script>
               $(document).ready(function(){
                    $("#name").change(function(){
                         var name=$("#name").val();
                         $.ajax({
                              type: "POST",
                              url: "callDroplet.jsp",
                              data: {name: name},
                              success:function(result){                    
                                   $("#showOutput").html(result);                    
          </script>
     </head>
     <body>
          <input type="text" id="name">
          <div id="showOutput">callDroplet.jsp's output will come here</div>
     </body>
</html>[2]. Write callDroplet.jsp
<body>
          <dsp:droplet name="/a/b/c/MyXYZDroplet">
               <dsp:param name="input_param" param="name">
               <dsp:oparam name="output">
                    Your output message goes here
               </dsp:oparam>
          </dsp:droplet>
     </body>-RMishra
Edited by: RMishra on May 25, 2013 2:38 PM

Similar Messages

  • Writing my own readLine() method

    I am trying to write my own readLine() method. I am using the read() method from BufferedReader to read one char at a time into an array. Then when I encounter a \n chacter I convert the array to a string and return it.
    The problem arrises when i reach the end of a file.
    The read() method returns a -1 when the end of the file has been reached.
    How can I get my readline method to read the last line and return it but also tell the user the end of the file has been reached?
    Thanks.

    The reason I want to write my own is beacause
    readLine() in BufferedReader has been deprecated.
    No it isn't. Not until 1.3.1, at least.
    I want to read and return lines until read() returns a
    -1. But how can i still return the last line? err... with a return statement?
    It may contain a string and then be the end of the file. How
    can I return the string and the -1?You can't. You'll have to do it the way readLine already does or really think of something new.

  • Writing my own methods

    I'm trying to learn how to write my own methods and couldn't figure out what the problem is with the codes below.
    public class methodtry {
        public static int myMethod1 (int a)
              a += 10;
              System.out.println("*** Method1, a is : " + a);
              return (a);
                 int b = myMethod1(3);
               System.out.println(b);     
    }it gives identifier expected error in the last System.out.println(b); part..
    Edited by: SwmeRt on Mar 26, 2009 7:27 AM

    You can't have free-floating statements like System.out.println(b); just inside a class. Why not put that statement in a method:
    public class MethodTry {
        public static int myMethod1(int a) {
            a += 10;
            System.out.println("*** Method1, a is : " + a);
            return a;
        public static void main(String[] args) {
            int b = myMethod1(3);
            System.out.println(b);
    }Start here: [http://java.sun.com/docs/books/tutorial/java/index.html]

  • Where can one find information on writing thier own app?

    Have an idea that I would like to develop into an app.  Where might one begin in writing the necessary software?

    Get an iOS Developer Account...
    Choosing an iOS Developer Program / Which Developer Program is for you?
    ...then use the resources that come with it in the iOS Dev Center.
    iOS Human Interface Guidelines
    iOS Starting Point
    Start Developing iOS Apps Today
    App Development Overview
    App Store Review Guidelines for iOS Apps
    Your First iOS App

  • Need help for writing an own pulse script

    Hello,
    i want to generate a simple current pulse with my keithley 2602A, but i have a problem with the pulsewidth.
    I observed the length of the pulse on an oscilloscope and it's nearly constant for about four times and then, the next time it takes about 40 seconds longer.
    I wrote the following script:
    smua.measure.rangev = 6.000000
    smua.measure.rangei = 1.000000
    smua.source.rangev = 6.000000
    smua.source.rangei = 1.000000
    smua.sense = 1.000000
    ntimes = 100000.000000
    smua.source.func = smua.OUTPUT_DCAMPS
    smua.source.leveli = 0.186000
    smua.source.limiti = 0.200000
    smua.source.limitv = 5.000000
    mybuf = smua.makebuffer(2)
    mybuf.clear()
    mybuf.appendmode = 1
    smua.measure.count = 1
    smua.source.output = 1
    for i = 1 , ntimes do -- Perform following command(s) ntimes
    end --for
    smua.measure.i(mybuf)
    smua.measure.v(mybuf)
    smua.source.output = 0
    I figured out, that the problem is in smua.measure.X and not in the loop.
    Could you please help me?

    Definitely the wrong forum.
    The forum you arre looking for can be found here:
    http://forum.keithley.com

  • [spamassassin] failure on writing his own files

    Hello,
    i set up a mail server using arch, postfix, dovecot, mysql, spamassassin.
    almost everything is working fine, but i got an error about spamassassin not able to create/read some files, an bayes eval failure.
    here is the log :
    2012-11-22T11:34:55.100773+00:00 localhost postfix/postscreen[20895]: CONNECT from [209.85.214.46]:62210 to [92.243.17.51]:25
    2012-11-22T11:34:55.100996+00:00 localhost postfix/postscreen[20895]: PASS OLD [209.85.214.46]:62210
    2012-11-22T11:34:55.117560+00:00 localhost postfix/smtpd[20896]: connect from mail-bk0-f46.google.com[209.85.214.46]
    2012-11-22T11:34:55.506511+00:00 localhost postfix/smtpd[20896]: 7B9E3255C2: client=mail-bk0-f46.google.com[209.85.214.46]
    2012-11-22T11:34:55.749004+00:00 localhost postfix/cleanup[20902]: 7B9E3255C2: message-id=<[email protected]m>
    2012-11-22T11:34:55.773781+00:00 localhost postfix/qmgr[17253]: 7B9E3255C2: from=<[email protected]>, size=1506, nrcpt=1 (queue active)
    2012-11-22T11:34:55.788150+00:00 localhost spamd[16751]: spamd: connection from localhost [127.0.0.1] at port 46217
    2012-11-22T11:34:55.788961+00:00 localhost spamd[16751]: spamd: setuid to nobody succeeded
    2012-11-22T11:34:55.789217+00:00 localhost spamd[16751]: spamd: creating default_prefs: //.spamassassin/user_prefs
    2012-11-22T11:34:55.790047+00:00 localhost spamd[16751]: config: cannot create user preferences file //.spamassassin/user_prefs: No such file or directory
    2012-11-22T11:34:55.790284+00:00 localhost spamd[16751]: spamd: failed to create readable default_prefs: //.spamassassin/user_prefs
    2012-11-22T11:34:55.792041+00:00 localhost spamd[16751]: spamd: processing message <[email protected]m> for nobody:99
    2012-11-22T11:34:58.650172+00:00 localhost spamd[16751]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create lockfile /.spamassassin/bayes.mutex: No such file or directory
    2012-11-22T11:34:58.652776+00:00 localhost spamd[16751]: spamd: clean message (-0.8/5.0) for nobody:99 in 2.9 seconds, 1477 bytes.
    2012-11-22T11:34:58.653071+00:00 localhost spamd[16751]: spamd: result: . 0 - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW scantime=2.9,size=1477,user=nobody,uid=99,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=46217,mid=<[email protected]m>,autolearn=unavailable
    2012-11-22T11:34:58.694529+00:00 localhost postfix/pickup[18387]: A94E7255C4: uid=99 from=<[email protected]>
    2012-11-22T11:34:58.696117+00:00 localhost postfix/pipe[20903]: 7B9E3255C2: to=<[email protected]>, relay=spamassassin, delay=3.3, delays=0.41/0.01/0/2.9, dsn=2.0.0, status=sent (delivered via spamassassin service)
    2012-11-22T11:34:58.698830+00:00 localhost postfix/qmgr[17253]: 7B9E3255C2: removed
    2012-11-22T11:34:58.699185+00:00 localhost postfix/cleanup[20902]: A94E7255C4: message-id=<[email protected]m>
    2012-11-22T11:34:58.701168+00:00 localhost spamd[16750]: prefork: child states: II
    2012-11-22T11:34:58.723994+00:00 localhost postfix/qmgr[17253]: A94E7255C4: from=<[email protected]>, size=1863, nrcpt=1 (queue active)
    2012-11-22T11:34:58.760261+00:00 localhost dovecot: auth-worker(20909): mysql(localhost): Connected to database postfix_db
    2012-11-22T11:34:58.793178+00:00 localhost dovecot: lda([email protected]): sieve: msgid=<[email protected]m>: stored mail into mailbox 'Latex.gut'
    2012-11-22T11:34:58.794782+00:00 localhost postfix/pipe[20907]: A94E7255C4: to=<[email protected]>, relay=dovecot, delay=0.13, delays=0.06/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
    2012-11-22T11:34:58.795047+00:00 localhost postfix/qmgr[17253]: A94E7255C4: removed
    2012-11-22T11:35:26.227313+00:00 localhost postfix/smtpd[20896]: disconnect from mail-bk0-f46.google.com[209.85.214.46]
    i suspect this :
    2012-11-22T11:34:55.788961+00:00 localhost spamd[16751]: spamd: setuid to nobody succeeded
    to be part of the problem, but i'm not sure, and maybe some guru here can help me ?
    here is postconf -n :
    alias_database = $alias_maps
    alias_maps = hash:/etc/postfix/aliases
    body_checks = regexp:/etc/postfix/body_checks.cf
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    dovecot_destination_recipient_limit = 1
    header_checks = regexp:/etc/postfix/header_checks.cf
    html_directory = no
    inet_protocols = ipv4
    local_recipient_maps = $virtual_mailbox_maps
    local_transport = virtual
    mail_owner = postfix
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    mime_header_checks = regexp:/etc/postfix/mime_headers_checks.cf
    newaliases_path = /usr/bin/newaliases
    postscreen_dnsbl_action = enforce
    postscreen_dnsbl_sites = zen.spamhaus.org*2 bl.spamcop.net*2 b.barracudacentral.org*1 bl.mailspike.net*1
    postscreen_dnsbl_threshold = 2
    postscreen_greet_action = enforce
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    relay_domains = *
    sample_directory = /etc/postfix/sample
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpd_recipient_restrictions = reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_unknown_recipient_domain, reject_invalid_helo_hostname, reject_unlisted_recipient, reject_unlisted_sender, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_unauth_destination, permit
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = $mydomain
    smtpd_sasl_path = /var/run/dovecot/auth-client
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
    smtpd_sasl_type = dovecot
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /etc/ssl/private/server.crt
    smtpd_tls_key_file = /etc/ssl/private/server.key
    smtpd_tls_loglevel = 1
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = proxy:mysql:/etc/postfix/virtual_alias_maps.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /srv/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/virtual_domains_maps.cf
    virtual_mailbox_limit = 512000000
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/virtual_mailbox_maps.cf
    virtual_minimum_uid = 5000
    virtual_transport = dovecot:
    virtual_uid_maps = static:5000
    master.cf :
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    # Do not forget to execute "postfix reload" after editing this file.
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    #smtp inet n - n - - smtpd
    smtp inet n - n - 1 postscreen
    smtpd pass - - n - - smtpd -o content_filter=spamassassin
    dnsblog unix - - n - 0 dnsblog
    tlsproxy unix - - n - 0 tlsproxy
    submission inet n - n - - smtpd
    #smtp inet n - n - - smtpd -o content_filter=spamassassin
    # -o syslog_name=postfix/submission
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #smtps inet n - n - - smtpd
    # -o syslog_name=postfix/smtps
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #628 inet n - n - - qmqpd
    pickup fifo n - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - n 300 1 oqmgr
    tlsmgr unix - - n 1000? 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    trace unix - - n - 0 bounce
    verify unix - - n - 1 verify
    flush unix n - n 1000? 0 flush
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - n - - smtp
    relay unix - - n - - smtp
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - n - - showq
    error unix - - n - - error
    retry unix - - n - - error
    discard unix - - n - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - n - - lmtp
    anvil unix - - n - 1 anvil
    scache unix - - n - 1 scache
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #maildrop unix - n n - - pipe
    # flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    # ====================================================================
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    # Specify in cyrus.conf:
    # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    # Specify in main.cf one or more of the following:
    # mailbox_transport = lmtp:inet:localhost
    # virtual_transport = lmtp:inet:localhost
    # ====================================================================
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #cyrus unix - n n - - pipe
    # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    # ====================================================================
    # Old example of delivery via Cyrus.
    #old-cyrus unix - n n - - pipe
    # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    # ====================================================================
    # See the Postfix UUCP_README file for configuration details.
    #uucp unix - n n - - pipe
    # flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    # ====================================================================
    # Other external delivery methods.
    #ifmail unix - n n - - pipe
    # flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    #bsmtp unix - n n - - pipe
    # flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
    #scalemail-backend unix - n n - 2 pipe
    # flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
    # ${nexthop} ${user} ${extension}
    #mailman unix - n n - - pipe
    # flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    # ${nexthop} ${user}
    spamassassin unix - n n - - pipe user=nobody argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
    #using LDA with dovecot
    dovecot unix - n n - - pipe
    flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}

    i'm probably a bit stupid...
    mkdir & chown spamd: did the job...

  • Writing your own video codec

    I've got a requirement to implement a video codec from Symbian C++ in J2ME.
    Ideally I'd like to just write the codec and hook it into the MMAPI media player (javax.microedition.media) but this looks doubtful from the specs.
    I really don't want to be rendering the frames myself, but if I have to, I will.
    Does anyone have any exprience of this? Have you done it? What approach did you use, and even if not, how would you go about it?
    Many thanks in advance as always,
    Michael

    Hi,
    The project was called to a halt before I could get into it to any degree that might be useful. The most serious issue we faced when doing basic trials was frame rate, which we were worried about for lower performance CPU's especially.
    Not much help, I know. Sorry!
    Michael
    p.s. Apologies for taking so long to reply. I could not remember my login details!

  • Writing your own adapter

    Hi everybody,
    I'm pretty sure this is general enough not to be in the Swing forum, although this particular example involves Swing, if not, please let me know. :)
    Anyway, I'm trying to write an adapter class that can use methods in many different listener classes, but doesn't need to implement all of them. I need certain methods from each listener class, but not all of them, and the extra methods would clutter my code up. I can't extend them all, I know.
    My first attempt at this was:
    public abstract class Adapter implements ActionListener, MenuListener, MouseInputListener,
              WindowFocusListener, WindowListener {
    }I've also tried:
    public interface Adapter extends ActionListener, MenuListener, MouseInputListener,
              WindowFocusListener, WindowListener {
    }In both cases, I get warnings and errors saying I need to implement every method in each interface (windowClosing, actionPerformed, etc.). Does anyone know what I'm doing wrong here?
    Thanks,
    Jezzica85

    KelVarnson wrote:
    Encephalopathic wrote:
    The thing is though the Adapter class is by nature ugly and will have many methods declared that do nothing. If you want to create this, yours is going to be cluttered with many empty methods.Isn't that the whole point of an Adapter class? Yes. I didn't say that this is a bad thing, just that it doesn't look pretty; it's cluttered. What is bad is her desire to lump them all together into one big unholy mess.
    But yes, I do agree with your points against a mega-Adapter.As we both agree on.

  • Writing your own drum tracks?

    is there any simple wisdom that one of you all could impart re: composing drum tracks?
    i know that there seems to be individual kick drum and high hat etc.
    does the basic garage band have this ability?

    I would suggest tapping the beat on a midi keybord (find the sound you want first on the keyboard) to have a bette feel and don't let every note with the same velocity (that would be boring)
    I suggest you look at some loop that are in midi format
    (You can even use one as the basis for your futur track, delete the notes you don't want and add want you want.)
    I would suggest creating the drum on multiple midi track will be easier to re-tape-in some part or modify a kick loop.
    After you select all the track and do a joint (command-J) add all will endup on one track.

  • Tired of writing your own bash prompt?

    I realized a few days ago that I got tired of looking up arcane bash escape sequences just to customize my bash prompt. In the open source fashion, I wrote a gui in pyGTK that will automatically make one for you, if you just pick the things you want from a menu. It's not really done yet and there's still stuff that I need to add to it, but I thought i'd see if anyone around here had any comments, or would find it useful.
    Check it out: https://github.com/wisp558/promptool
    It's worth noting that I only implemented 3 of the most common bash variables, but I should fix that soon. (and the bold button is broken)
    Last edited by wisp558 (2011-08-19 09:31:46)

    Doomcide wrote:Nice! Good to see how this project develops . Another suggestion I have, is to add bright color (e.g.: \e[1;30m) support.
    Yeah, I plan to. Other things I'm looking at include a place to select the text color, (It'll use the last color in the prompt), background colors, underlined things and changing the whole textview background (I use a black urxvt, personally). I may even add a thing to save prompts or something. I might add an option to append the PS1 to one's ~/.bashrc, making the gui display the finished prompt rather than the terminal and more! I have plenty of ideas left!
    As a note, the escape you posted is just the bold option I already have. There is a high intensity option in bash, which I will look into, although it does nothing in my terminal. Those are things like '\e[0;90m' and its  friends.
    Thanks for your feedback, guys.

  • Writing own jsf component

    Hello,
    I'm writing my own JSF components.
    I got a problem with a component of type: javax.faces.Command.
    My component works well in Creator and after being deployed excepts that in the page navigation tab, when I drag a link from my component to another page, Creator defines a new action ("casex" for instance) but DO NOT affect this action to my component at the JSP level (i.e. the attribute "action "is not set on my component).
    I have to do it myself for the navigation to work.
    I think I miss something during component generation. Any idea ?
    Tnxs for any help !
    -- F

    Hello Edwin,
    Thanks for your answer ! In the mean time I rebuilt
    my components on the blueprint basis from
    bpcatalog/ui according to your blog and everything
    works fine !
    Now I have a new problem/question:
    Is there a way to access the application's message
    bundles (for localization) during the rendering of a
    custom component ?
    I have a custom component that should access -
    through the rendering process (encodeBegin) - the
    application localization's bundle in which it is
    running to localize a message .
    I tried the following:
    encodeBegin(FacesContext f, UIComponent x) throws
    IOException
    /...Start of rendering process ../
    String
    tooltip=ResourceBundle.getBundle(FacesContext.getCurre
    ntInstance().getApplication().getMessageBundle(),
    FacesContext.getCurrentInstance().getExternalContext()
    .getRequestLocale()).getString(<key>);
    /..Rendering process continues ./}
    That does not work... (always returning an empty
    string)
    Thanks for any help !
    -- Fab
    There should be a way to do what you want, but it's not my area of expertise and I would need to do some debugging.
    -Edwin

  • Writing DVD copyright for own movie?

    This is probably not a question that gets tossed around here all that often. I work for a company that is about to release our first documentary film (we're in the final stages of post), and before this thing starts getting out to film festivals and preview copies to some of the people featured in it, we'd like to instill some kind of legal disclaimer/copyright into the movie, like those annoying screens you can't skip in the big studio's movies. Does anyone know of a site with tips or guildelines or free examples for writing your own legal copy? We're trying at least in this early stage to somehow protect ourselves from someone ripping this DVD and posting it to YouTube or other similar scenarios.
    Anyone that has done this themself I would appreciate hearing from!

    You can put your own copywrite notice at the start of the DVD.
    Create the notice as a video clip and make it a track. Select the user operations tab on it's inspector and disable the controls that viewers would need to use to skip past it.
    Set that track as the first play on the DVD itself, and set it's end jump to the menu or track that you would start with otherwise and you've made your own unskippable copyright notice just like the big studios do.

  • Office Web App Server 2013: cannot edit word document with own WOPI Server

    Hi all,
    I tried to build our own WOPI Server to connect to Office Web App Server 2013 SP1. Viewing documents
    in IE was possible quite easy to achieve. Now it comes to editing.
    When I try to edit a document, I got a german message “Sie verfügen leider nicht über die Berechtigung zum Bearbeiten dieses Dokuments“.
    This means something like „Sorry, you do not have any permission to modify this document”.
    I enabled editing on the OWAS-Server while setup procedure
    (Until now, I only have an InternalUrl but no ExternalUrl.)
    PS C:\ > New-OfficeWebAppsFarm –InternalUrl “https://win-owas...” 
    –CertificateName "win-owas…" –EditingEnabled
    ULS log shows
    BaseDocument says editing is not supported [WebEditingEnabled: True] [SupportsEditing: True] [PinnedUsersRights: Read] 
    So far, I implemented these three REST service methods:
    [OperationContract]
    [WebInvoke
    "GET":"api/wopi/files/{name}?access_token={access_token}"
    "GET":"api/wopi/files/{name}/contents?access_token={access_token}"
    "POST":"api/wopi/files/{name}/contents?access_token={access_token}"
    Office Web App Server was downloaded from “Microsoft Volume Licensing Center”. I installed latest updates from Microsoft.
    Did anybody succeed in writing to own WOPI an can give me some hints?
    Thank you in advance.

    Hi,
    The discovery xml contains many lines. The one for editing docx is:
    <action
    name="edit"
    urlsrc="https://win-owas.cado.camos.de/we/wordeditorframe.aspx?"<ui=UI_LLCC=""&><rs=DC_LLCC=""&><showpagestats=PERFSTATS=""&>"
    ext="docx" requires="locks,cobalt,update"/>
    I am calling it this way:
    <iframe
    src="https://win-owas.cado.camos.de/we/wordeditorframe.aspx?WOPISrc=http%3a%2f%2fpc-ms.cado.camos.de%3a8000%2fWOPI%2fapi%2Fwopi%2Ffiles%2FAbout_Keyboard_Input.docx&access_token=5268690b-19c6-496d-8ae6-b694f8e7bd0c"
    I’m not sure whether or not I implemented "locks,cobalt,update" correct, but I do not see any ‘edit-’network traffic from OWAS-Server to WOPI-Server. So I cannot debug anything. I will (re)check the articles you mentioned.
    Thank you for your help.

  • ImageIO PNG Writing Slow With Alpha Channel

    I'm writing a project that generates images with alpha channels, which I want to save in PNG format. Currently I'm using javax.ImageIO to do this, using statements such as:
    ImageIO.write(image, "png", file);
    I'm using JDK 1.5.0_06, on Windows XP.
    The problem is that writing PNG files is very slow. It can take 9 or 10 seconds to write a 640x512 pixel image, ending up at around 300kb! I have read endless documentation and forum threads today, some of which detail similar problems. This would be an example:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304]
    This surely must be resolvable, but after much searching I've yet to find a solution. If it makes any difference, I ONLY want to write png image, and ONLY with an alpha channel (not ever without), in case there are optimisations that that makes possible.
    If anyone can tell me how to address this problem, I'd be very grateful.
    Many thanks, Robert Redwood.

    This isn't a solution, but rather a refinement of the issue.
    Some of the sources I was reading were implying that the long save time might be due to a CPU heavy conversion process that had to take place before the BufferedImage could be saved. I decided to investigate:
    I loaded back in one of the (slowly) saved PNG images using ImageIO.read(file). Sure enough, the BufferedImage returned differed from the BufferedImage I had created. The biggest difference was the color model, which was DirectColorModel on the image I was generating, and was ComponentColorModel on the image I was loading back in.
    So I decided to manually convert the image to be the same as how it seemed to end up anyway. I wrote the following code:
          * Takes a BufferedImage object, and if the color model is DirectColorModel,
          * converts it to be a ComponentColorModel suitable for fast PNG writing. If
          * the color model is any other color model than DirectColorModel, a
          * reference to the original image is simply returned.
          * @param source The source image.
          * @return The converted image.
         public static BufferedImage convertColorModelPNG(BufferedImage source)
              if (!(source.getColorModel() instanceof DirectColorModel))
                   return source;
              ICC_Profile newProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
              ICC_ColorSpace newSpace = new ICC_ColorSpace(newProfile);
              ComponentColorModel newModel = new ComponentColorModel(newSpace, true, false, ComponentColorModel.TRANSLUCENT, DataBuffer.TYPE_BYTE);
              PixelInterleavedSampleModel newSampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, source.getWidth(), source.getHeight(), 4, source.getWidth() * 4, new int[] { 0, 1, 2, 3 });
              DataBufferByte newDataBuffer = new DataBufferByte(source.getWidth() * source.getHeight() * 4);
              ByteInterleavedRaster newRaster = new ByteInterleavedRaster(newSampleModel, newDataBuffer, new Point(0, 0));
              BufferedImage dest = new BufferedImage(newModel, newRaster, false, new Hashtable());
              int[] srcData = ((DataBufferInt)source.getRaster().getDataBuffer()).getData();
              byte[] destData = newDataBuffer.getData();
              int j = 0;
              byte argb = 0;
              for (int i = 0; i < srcData.length; i++)
                   j = i * 4;
                   argb = (byte)(srcData[i] >> 24);
                   destData[j] = argb;
                   destData[j + 1] = 0;
                   destData[j + 2] = 0;
                   destData[j + 3] = 0;
              //Graphics2D g2 = dest.createGraphics();
              //g2.drawImage(source, 0, 0, null);
              //g2.dispose();
              return dest;
         }My apologies if that doesn't display correctly in the post.
    Basically, I create a BufferedImage the hard way, matching all the parameters of the image I get when I load in a PNG with alpha channel.
    The last bit, (for simplicity), just makes sure I copy over the alpha channel of old image to the new image, and assumes the color was black. This doesn't make any real speed difference.
    Now that runs lightning quick, but interestingly, see the bit I've commented out? The alternative to setting the ARGB values was to just draw the old image onto the new image. For a 640x512 image, this command (drawImage) took a whopping 36 SECONDS to complete! This may hint that the problem is to do with conversion.
    Anyhow, I got rather excited. The conversion went quickly. Here's the rub though, the image took 9 seconds to save using ImageIO.write, just the same as if I had never converted it. :(
    SOOOOOOOOOOOO... Why have I told you all this?
    Well, I guess I think it narrows dow the problem, but eliminates some solutions (to save people suggesting them).
    Bottom line, I still need to know why saving PNGs using ImageIO is so slow. Is there any other way to fix this, short of writing my own PNG writer, and indeed would THAT fix the issue?
    For the record, I have a piece of C code that does this in well under a second, so it can't JUST be a case of 'too much number-crunching'.
    I really would appreciate any help you can give on this. It's very frustrating.
    Thanks again. Robert Redwood.

  • Installing own kernel...

    I have no problem git cloning my kernel of choice and configuring. My question is when compiling a new video drivers or any other package that might be dependent on Linux sources. I usually use the /usr/src directory. I am having trouble with the PKGBUILD on kernel26zen-git. It fails at installing after compile.
    Is there a global symlink ?Like there is in Gentoo? Where, I can custom build my kernels, and not have to worry about when I install new Nvidia drivers from there website. I am just greatly disappointed in these custom PKGBUILDS, and I don't need a initrd package. Are there any special parameters I need to be aware of... such as any global symlinks?
    Am I going to have problems install drivers from Nvidia's site if I decide not use the kernel26 packages, or any other package that compiles against the kernel sources..?
    Here's the error I get from the PKGBUILD
    ==> ERROR: Failed... Your source tree might be broken. Run 'make mrproper' in src/kernel26zen to clean it up
    ==> ERROR: Build Failed.
    Aborting...
    Error: Makepkg was unable to build kernel26zen package
    Last edited by StanIsTheMan (2009-09-26 20:36:48)

    B wrote:
    The PKGBUILD seems to be pointing to his own kernel chanco, shouldn't be a problem.
    @ OP: did you try the suggestion the error is giving you? I.e. a
    make mproper
    in the source tree?
    I was going to ... but I decided on a static kernel. And since I used to write ebuilds for my own packages, I decided to take up the task of writing my own PKGBUILD /w a static kernel, using the zen-sources git tree.
    BTW, am I going to be running into any problems in the future when running updates through pacman /w the way my kernel is setup? That's ,my main concern, since I am using a static kernel.  Though I do use my own video drivers from the Nvidia site, so I am not worried about video drivers.
    I guess I became accustomed with gentoo, that so much of the transition has been different.  Though I like Arch and its ABS, and AUR, plus there are lot of packages available.
    Last edited by StanIsTheMan (2009-09-27 23:03:52)

Maybe you are looking for