String question ScriptUI Panel resources

I have created a small tool to use to keep my projects organized and want to create a drop down list that will contain the broad list of rendering templates I created. At the present time, for the trial (since I'm new on ExtendScript), I just trying to transmit a pre-created table of a function so that I can build in the code to display rendering models later.

{

function joshPipe (thisObj) {}

function joshPipe_buildUI (thisObj) {}

var pipePanel = (thisObj instanceof Panel)? thisObj: new window ("palette", "Josh Pipeline", undefined, {resizable: true} ");

var rsdPath = "workspace has not loaded ';

var presetList = ["make model 1', 'make model 2', 'make model 3'];

GetExtension() {} function

return 'project manager ';

}

function getPresets() {}

List = ['make model 1', 'make model 2', 'make model 3'];

back list;

}

queueTab = ' group {orientation: 'column', alignment: 'fill', alignChildren:------['fill ', ' fill'],} ".

Group0: group {orientation: 'column', alignChildren: 'fill'------}

loadPipeButton: button {text: 'Installation work space'}, \

},\

Group1: Panel {orientation: 'row', text: 'Render Settings', alignChildren: ["fill", "fill"],------}

group1_1: group {orientation: 'column', alignChildren: 'left',------}

fullRadioButton: RadioButton {text: 'Full (delivery)'}, \

halfRadioButton: RadioButton {text: "half (review)"},

},\

group1_2: group {orientation: 'column', alignment: 'just'------}

renderTemplateDD: DropDownList {properties: {items: ['model 1', '2 ', 'model 3']}}, \

},\

},\

Group 2: group {orientation: 'column', alignChildren: 'fill'------}

rsdString: StaticText {multiline: 'true', text: ' "+ rsdPath +" "},

renderButton: button {text: "Making Setup",},

},\

}}";

pipePanel.grp = pipePanel.add (queueTab);

var loadPipeCtrl = pipePanel.grp.group0.loadPipeButton;

var fullRenderSelCtrl = pipePanel.grp.group1.group1_1.fullRadioButton;

var halfRenderSelCtrl = pipePanel.grp.group1.group1_1.halfRadioButton;

var renderTemplateDDCtrl = pipePanel.grp.group1.group1_2.renderTemplateDD;

var rsdStringCtrl = pipePanel.grp.group2.rsdString;

var renderButtonCtrl = pipePanel.grp.group2.renderButton;

loadPipeCtrl.onClick = function() {}

rsdPath = GetExtension();

rsdStringCtrl.text = rsdPath;

renderTemplateDDCtrl.item [0] = 'yo momma';

}

renderButtonCtrl.onClick = function() {}

rsdStringCtrl.text = 'unloaded project. "

}

Default values

pipePanel.grp.group1.group1_2.renderTemplateDD.selection = 0;

size of the window

pipePanel.layout.layout (true);

pipePanel.grp.minimumSize = pipePanel.grp.size;

resize panels

pipePanel.layout.resize ();

pipePanel.onResizing = pipePanel.onResize = function() {this.layout.resize ()};

Return pipePanel;     Returns the final result of pipePanel

}

var pipeScriptPal = joshPipe_buildUI (thisObj);

If ((pipeScriptPal! = null) & & (pipeScriptPal instanceof window)) {}

pipeScriptPal.center ();

pipeScriptPal.show ();

}

}

joshPipe (this);

}

The problem is that want this tool to be a sign that I can anchor. Near as I can tell (using the Extendscript of David Torno series as my guide) I have to read in the user interface and its options initially as a string resource, and I cannot understand how to operate. Any suggestions?

It dawned on me that I needed to actually get a string with a different function, rather than a table.

var presetList = ["make model 1', 'make model 2", "make model 3", "make model 4"];

var presetString = getPresets();

function getPresets() {}

list = presetList;

tempString = "["; ".

for (var i = 0; i)< list.length;="">

tempString = tempString.concat("'",list[i],"'");

If (i<>

tempString = tempString.concat(",");

}

}

tempString = tempString.concat("]");

Return tempString;

}

...

group1_2: group {orientation: 'column', alignment: 'just'------}

renderTemplateDD: DropDownList {properties: {elements: "+ presetString +"}},

Tags: After Effects

Similar Questions

  • ScriptUI Panel restores in ESTK but not in AE

    Hello

    I just watched the excellent tutorials from David Torno on development ScriptUI panels with Extendscript.  I followed all the directions, and the Panel do appear as expected in my ESTK, but when I save the .jsx in the ScriptUI folder in the directory Script of AE, the Panel appears, but none of the items I created to go in the Panel. It's very weird, maybe someone knows what I'm doing wrong?

    Here is my code, which is derived from the code example of David building ScriptUI panels with resource strings:

    {
    
        function templaterGUI(thisObj){
    
            function templater_buildGUI(thisObj){
    
                var templaterWindow = (thisObj instanceof Panel) ? thisObj : new Window('palette', 'Templater', undefined, {resizeable : true});
    
                gui = "Group{orientation: 'column', alignChildren: 'fill',\
                             settings: Group{orientation: 'row', alignChildren: 'fill',\
                                            pAssets: Panel{text: 'Assets'},\
                                            pOptions: Panel{text: 'Render Options'},\
                             },\
                             action: Button{text: 'Render Batch'},\
                             console: Panel{text: 'Status',\
                                            msg: StaticText{text: 'Currently Idle'}},\
                       }";
    
                templaterWindow.grp = templaterWindow.add(gui);
    
                return templaterWindow;
    
            }
    
            var templaterDock = templater_buildGUI(thisObj);
    
            if ((templaterDock != null) && (templaterDock instanceof Window)){
                    templaterDock.center();
                    templaterDock.show();
            }
    
        }
    
         templaterGUI(this);
    
    }
    

    Here's what it looks like when I run this code in ESTK:

    Screen Shot 2013-08-21 at 8.32.46 PM.png

    I placed the script in the "ScriptUI" folder in the application of AE CS6, and here's what it looks like when I invoke the same exact file .jsx in AE in the menu "window":

    Screen Shot 2013-08-21 at 8.34.03 PM.png

    Maybe I forgot something in the code that David has provided in his tutorial?  Can anyone offer suggestions for debugging / troubleshooting?

    Thank you for your time and help!

    What is lacking is the instructions of page layout.

    Add the line

    templaterWindow.layout.layout (true);

    before returning. He tells ScriptUI use an AutoLayoutManager to organize items in your control panel.

    Change from true to false indicates do not turn out to be a fit automatic, in which case you must specify locations/sizes or limits for all elements.

    You can also add the line

    templaterWindow.onResizing = templaterWindow.onResize = function () {this.layout.resize () ;}

    to say ScriptUi to revise the framework when the window is resized.

    Edit: layout is a property shared by window, group and group. It's an object with only 2 properties, the two methods above, layout(true/false) and resize(), so you don't have worry more about the page layout after that.

    It is also useful when you add / remove items from a container. In General, when you add / remove stuff, you... call layout.resize () to reorganize the window.

    Xavier

  • ScriptUI Panels error win me

    Hello

    ScriptUI Panels with resource string victory for me, need help. I put lines limit in a script and run and give me the error. I'd like to integrate inside after. If you don't mind fixed with an example that works in CS4

    Thank you for all

    ------------------------------------------------------------------------------------------ --------------------------

    res = "_panel:Panel {text: 'Ruta del Archivo', \}"

    _descrip:StaticText {text: ' Separa Campos con # con shark number, number of R, uno otro behind text ', properties: {scroll: false, multiline: false}},

    _name:group {orientation: 'row', \}

    _Ele_Archivo:button {text: 'Choice Archivo'}, \

    {{_Media_log:CheckBox {text: "Media LOG"}}},

    _panel2:Panel {text: "Ruta Archivo of the export of Media Log - TAB -", properties: {borderStyle: "engraved"}, enabled: 1, alignment: 'left',------}

    {_Ele_Media_log:Button {text: "Choice Archivo Media Log"}},

    _render_name:Panel {text: "Rendering Salida", properties: {borderStyle: "engraved"}, alignment: 'left',------}

    _name:group {orientation: 'row', \}

    _Crear:button {text: 'Crear Bandas go'}, \

    _Workinfo:DropDownList {title: 'outputModule', alignment: 'left'}, \

    {_Render:Button {text: "Renderizar"}},

    }, manolo:Progressbar {visible: ' 1', align: 'center', size: [300,20], labelPlacement: 'left', label: "Barra Progreso"} ';

    var my = cela;

    My.Add (res);

    I think the problem is that all this must be in a containing group. You have the debugger enabled in preferences? I was getting an error that "type of UI element ' _panel: 'is unknown or invalid in this context'.»

    A code here that works, when I put it in a standard script format.

    {

    function myScript (thisObj) {}

    var myScript_Data = new Object();

    myScript_Data.scriptName = "myscript";

    function myScript_buildUI (thisObj) {}

    var pal = (thisObj instanceof Panel)? thisObj: new window ("palette", myScript_Data.scriptName, undefined);

    If (pal! = null) {}

    var RES =

    "Group {orientation:"column",-}".

    _panel: Panel {text: "Ruta del Archivo",------}

    _descrip:StaticText {text: ' Separa Campos con # con shark number, number of R, uno otro behind text ', properties: {scroll: false, multiline: false}},

    _name:group {orientation: 'row', \}

    _Ele_Archivo:button {text: 'Choice Archivo'}, \

    _Media_log:checkbox {text: "Media LOG"},

    }, \

    }, \

    _panel2:Panel {text: "Ruta Archivo of the export of Media Log - TAB -", properties: {borderStyle: "engraved"}, enabled: 1, alignment: 'left',------}

    _Ele_Media_log:button {text: "Choice Archivo Media Log"},

    },\

    _render_name:Panel {text: "Rendering Salida", properties: {borderStyle: "engraved"}, alignment: 'left',------}

    _name:group {orientation: 'row', \}

    _Crear:button {text: 'Crear Bandas go'}, \

    _Workinfo:DropDownList {title: 'outputModule', alignment: 'left'}, \

    _Render:button {text: "Renderizar"},

    },\

    }, \

    Manolo: ProgressBar {visible: ' 1', align: 'center', size: [300,20], labelPlacement: 'left', label: "Barra Progreso"},

    }";

    PAL. GRP = pal.add (res);

    PAL. Layout.Layout (true);

    PAL. GRP._panel2. Text = "example to access user interface elements;

    return pal;

    }

    }

    If (parseFloat (app.version)< 8="" )="">

    Alert ("this script requires After Effects CS3 or later");

    } else {}

    Upright var = myScript_buildUI (thisObj);

    If (upright! = null) {}

    If {(upright instanceof window)

    myPal.center ();

    myPal.show ();

    }

    myPal.grp._panel2.text = 'another interface user access example ";

    }

    }

    }

    myScript (this);

    }

  • An error occurred when DNS was questioned about the resource record (SRV) service location used to locate a domain controller Active Directory (AD DC) for the domain 'HAMI. LOCAL ".

    An error occurred when DNS was questioned about the resource record (SRV) service location used to locate a domain controller Active Directory (AD DC) for the domain 'HAMI. LOCAL ".

    The error was: "an existing connection was to be closed by the remote host".
    (0 x 00002746 WSAECONNRESET error code)

    The query was for the SRV record for _ldap._tcp.dc._msdcs. HAMI. LOCAL

    Hello

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the Forums TechNet Windows 7 Technet.

    Here is the link:
    http://social.technet.Microsoft.com/forums/en-us/w7itpronetworking/threads

    Hope this helps

  • Two screen question: Control Panel appears on the screen 1 but the mouse is on the screen 2 and so I can't access

    I have a Sony Vaio laptop connected to a stand alone monitor. I don't use the laptop screen unless there is a problem and then I had to alternate between the two screens using Fn F7 key.

    A problem has occurred with the rundll32 process (which I'm trying to fix separately) and this led to the PC automatically flicking between screens and then stick with the independent monitor but in low resolution (so I couldn't access the tool bar along the bottom).

    I went to control panel to change the resolution to high, but the question of rundll32 kept close the process.

    This left me with icons on the desktop of the monitor stand alone, a white color on the laptop screen (it is normally black) and the ease of Fn F7 does not (said the service is not available).

    When I click on Control Panel on the screen of stand alone, it opens on the screen of the laptop, but I can't access it because the function of the mouse is on the screen to stand alone.

    Can someone help before I go out drinking?

    Thanks, Temp.

    I seem to have solved the problem. It seems that display order has been reversed and so I just had to move the mouse to the right of the screen to stand alone (I had been pushing against the left hand side) to move on the screen of the laptop. From there on, I played a bit with the display settings in the control panel and, although the issue of the always kept dllrun32 throw me out, seems to be back on the screen of stand-alone only, with the correct resolution and the Fn f7 works again. This means I can put the top back on bottle of vodka, at least until the next issue of dllrun32 arises.

  • Scrollable ScriptUI panels

    Hello

    I am trying to build a palette containing a list of text read from an external file.

    The Group of experts the text is taken in must be floating, but I can't seem to make this work.

    Here is a screenshot of what I build and a small part of the script...

    Screen Shot 2015-11-04 at 11.40.24 PM.png

    myPanel var = myTaskWindow.add ('panel', undefined, "TASKS");

    myPanel.maximumSize = [600 300];

    myPanel.scrolling = true;

    Does anyone have any suggestions on that?

    Thank you very much

    Roy

    A list box would be closer to what you wanted started as a dropdownlist control.

    ListBoxes can have several columns with headers or not.

    And ListItems (for list boxes and drop-down list) have a "checked" (read/write) property. It is not pulled unless you actually set to true/false, for example:

    true myListbox.add("item",_"item_1").checked;     point 1 will be checked

    myListbox.add("item",_"item_2").checked = false;     question 2 a box in front of her, unaudited

    Xavier.

  • Question Pool of resources with PowerCLI

    Hello world

    I'm trying to understand why I have these differences below:

    (1) when I ran this command console PowerCLI 'Get-ResourcePool 1_OVC01_GOLD. The result is:

    ID name
    ----                 --
    1_OVC01_GOLD ResourcePool-resgroup-3603

    (2) when I ran the same command from a PowerShell Script of PS1, the result is different:

    ParentId: ResourcePool-resgroup-411

    Parents: resources

    CpuSharesLevel: Custom

    NumCpuShares: 2000

    CpuReservationMHz: 0

    CpuExpandableReservation: true

    CpuLimitMHz:-1

    MemSharesLevel: Custom

    NumMemShares: 2000

    MemReservationMB: 1045

    MemExpandableReservation: true

    MemLimitMB:-1

    Name: 1_OVC01_GOLD

    CustomFields: {}

    ExtensionData: VMware.Vim.ResourcePool

    ID: ResourcePool-resgroup-3603

    Uid                      : [email protected] @amavcs01.am.lafargeone.net:443/ResourcePool=ResourcePool-resgroup-3603/

    (3) I would like to extract the values of NumCpuShares and NumMemShares on an outing, but the following comment does not work. Can someone explain to me why?

    Get-ResourcePool 1_OVC01_GOLD | Select-String - pattern "NumCpuShares".

    Get-ResourcePool 1_OVC01_GOLD | Select-String - pattern "NumMemShares".

    Thanks for your help.

    JEFF


    The object returned is the same in both cases, you can check by running at the prompt or in your script.

    Get-ResourcePool 1_OVC01_GOLD | Select *.

    The difference is there because of the way Manager PowerShell output shows you the object. To do this, the Manager uses the .ps1xml files. These define the properties of an object are displayed and in what format.

    To extract the values of these properties, you can do

    Get-ResourcePool 1_OVC01_GOLD | Select NumCpuShares - ExpandProperty

    Get-ResourcePool 1_OVC01_GOLD | Select NumMemShares - ExpandProperty

  • Question of Panel throw

    Hello

    When I close my program (QUIT button LabWindows) I thought that with the line "DiscardPanel (MainPanelHandle)"; the program is closed and the application is not running. But now I have seen that after this call every button I have in my application gets called and closed with the return 0. Can someone explain why I have this and if this is normal? Each button of my application works with the event "EVENT_COMMIT".

    Hope someone can help me.

    Best regards

    When you throw a Panel, each control (not only the buttons) receives an EVENT_DISCARD event: this is intended as a way for you to manage a gap of Panel where it is necessary to manage some special actions. For example, when it receives an event to a button that controls an external device could issue an order to stop at this device.

    Your checks should not receive any event EVENT_COMMIT: reminders that only manage this event should get called and immediately exit without doing anything: you can check this by placing a breakpoint in a reminder and step-track its behavior (F8 after break issues instructions one by one so that you can monitor exactly what happens).

  • Scan/Format in the string Question

    Refer to my attachment

    For string format, accuracy comes first and the width (including the point decimal, right?) coming in second.

    For a scan of the chain, it seems to be the opposite, width comes first and second precision.

    What I say is correct?  Why is it like this?

    If you right-click on the analysis of string or string format and choose change scanning channels or change the Format Strings (or read the help), you'll see that there is a difference.

    In the analysis of the chain, figures of precision is not used.  The number of width has different meanings between functions as well.  A string, this is the minimum field width.  In the analysis of the chain is the width.  So, in your analysis of the chain, %5.4f is equivalent ot % 5f, taking only the first 5 characters.  When you Format a string, %5.4f means the field width minimum is 5 and 4 digits you want.  You can see that you got really 7 characters, because he needed more than 5.

  • WHT part of the computer is the question Control Panel, I can not uninstall anything, never had a program before

    I'M TRYING TO UNINSTALL THE WEATHER MAX CHANNEL OFFICE AND REINSTALLED, BUT THE WIZARD WILL NOT UNINSTALL IT...

    I DELETED COOKIES, CLEANED THE REGISTRY, REBOOTED, WENT INTO SAFE MODE AND I TRIED TO UNINSTALL IT...

    GO TO START MENU AND TYPE IN WEATHER CHANNEL AND NOTHING NO SE PRESENT...

    I DON'T KNOW WHAT THAT I'MDOING BAD, NEVERHAD THIS PROBLEM BEFORE...

    Hi Samschuler,

    This can happen when the uninstall file is corrupted.

    I suggest to follow the steps below and we update on the State of the question.

    Method 1: Check out the following link to access the programs and features to uninstall the
    Office max.
    http://Windows.Microsoft.com/en-in/Windows7/uninstall-or-change-a-program

    If you are unable to uninstall programs and features, go back to the next method.

    Method 2: Run the following link and check.

    Solve problems with programs that cannot be installed or uninstalled

    http://support.Microsoft.com/mats/program_install_and_uninstall

    If you have additional questions, or if this problem persists, come in and we will be happy to help you.

  • 5.7 LIGHTROOM question! Panel 'Basic' missing from the Module Development on mac

    I need help! I'm in LIGHTROOM 5.7 and randomly the module 'Base' disappeared under my label to the point, and I'm not able to change the exposure or brightness. I have read several discussions on how to solve this problem and nothing works... someone can you please advise me on the best way to solve this problem? Thank you very much!

    Screenshot 2015-08-30 13.13.56.png

    Do Windows > panels > base.

  • Export-csv system.string [] question

    I have a powercli script I wrote to collect virtual switch information and portgroup.

    Most work however the information active and reserve nic shows in the console

    For example ActiveNic: {vmnic4}

    However, in the CSV file it shows up as @{ActiveNic = System.String []} without the information real vmnic

    Please let me know how to get the active and standby vmnic info in the CSV here is the script

    SE connect-VIServer vcenter

    $report = @)

    $ESXhosts = Get-VMHost

    {foreach ($esxhost to $ESXhosts)

    $Vswitches = $esxhost | Get-Virtualswitch

    {foreach ($vswitch to $vswitches)

    $Portgroups = $vswitch | Get-VirtualPortGroup

    {foreach ($portgroup to $Portgroups)

    $nicteam = Get-NicTeamingPolicy $portgroup

    $row = "" | Select Cluster, Vswitch, Portgroup, Vlan, ActiveNic, Esxhost, Standbynic

    $row. Cluster = $esxhost. Parent

    $row. ESxhost = $esxhost.name

    $row. Vswitch = $Vswitch.Name

    $row.portgroup = $portgroup.name

    $row. VLAN is $portgroup. VLANID

    $row. Activenic = $nicteam.activenic

    $row. Standbynic = $nicteam. StandbyNic

    {$report += $row}

    }

    }

    $report | Export-Csv c:\psresults\host_portgroups_clustr_standby.csv

    The Export-Csv cmdlet can manage properties that are arrays or complex objects correctly.

    A way around this is to convert the table into a single string.

    Something like that

    Connect-VIServer vcenter $report = @()
    $ESXhosts = Get-VMHost foreach ($esxhost in $ESXhosts) {
      $Vswitches = $esxhost | Get-Virtualswitch  foreach($vswitch in $vswitches){
        $Portgroups = $vswitch | Get-VirtualPortGroup    foreach ($portgroup in $Portgroups){
          $nicteam = Get-NicTeamingPolicy $portgroup      $row = "" | select Cluster, Esxhost, Vswitch, Portgroup,Vlan,ActiveNic,Standbynic      $row.Cluster = $esxhost.Parent      $row.ESxhost = $esxhost.name     $row.Vswitch = $Vswitch.Name      $row.portgroup = $portgroup.name      $row.Vlan = $portgroup.Vlanid      $row.Activenic= [string]::Join(',',$nicteam.activenic)
          $row.Standbynic=[string]::Join(',',$nicteam.StandbyNic)
          $report += $row}
      }
    }
    
    $report | Export-Csv c:\psresults\host_portgroups_clustr_standby.csv
    
  • Decryption XML string question - javax.crypto.IllegalBlockSizeException?

    I am new to this and try to encrypt and decrpyt one string XML with AES and Base64 en_decoder but I get the following error. I don't know what the problem is. Without using a decoder and encoder Base64, so it's good, but I need to.

    Error: javax.crypto.IllegalBlockSizeException: input length must be a multiple of 16 when with padded decrypting cipher

    Appreciate all the help!

    My simple program
    ===============
    Encryption by aesCipher;

    try {}

    Byte [secretKey] is Base64.decode ("fqqwZu9U1PCAZQUX + 3nUTA is");.
    SecretKeySpec keySpec = new SecretKeySpec (secretKey, "AES");

    Create the encryption algorithm
    aesCipher = Cipher.getInstance("AES/ECB/PKCS5Padding");

    Initialize the encryption for the encryption algorithm
    aesCipher.init (Cipher.ENCRYPT_MODE, keySpec);

    Byte [] plaintext = "< RQLastName > TESTLastname < / RQLastName > < RQFirstName > TestFirstName < / RQFirstName > '. getBytes();

    Encrypt the plaintext
    Byte [] ciphertext = aesCipher.doFinal (cleartext);

    Base64encodedCiphertext string = Base64.encode (ciphertext);

    System.out.println (base64encodedCiphertext);

    Initialize the same cipher for the decryption algorithm
    aesCipher.init (Cipher.DECRYPT_MODE, keySpec);

    Byte [] base64decodedCiphertext = Base64.decode (base64encodedCiphertext);

    Decrypt the ciphertext
    Byte [] cleartext1 = aesCipher.doFinal (base64decodedCiphertext); <-exception on that line

    System.out.println (new String (cleartext1));

    clear and cleartext1 are the same.
    }
    catch (Exception ex) {}
    ex.printStackTrace ();
    }

    ================
    I use Base64.java, written by Stephen investigation.

    public class {Base64
    public static byte [] encodeData;
    public static String charSet =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + /";

    {public static
    encodeData = new ubyte [64];
    for (int i = 0; i < 64; i ++) {}
    c byte = (bytes) charSet.charAt (i);
    encodeData [i] = c;
    }
    }

    private Base64() {}

    /**
    * base64 encode a string
    @param s the string ascii coding
    * @returns the base64 encoded result
    */

    Public Shared Function
    Encode(String s) throws Exception {}
    Return encodes (s.getBytes ("UTF8"));
    }

    /**
    * base64 encode a byte array
    @param CBC byte array to encode
    * @returns the base64 encoded result
    */

    Public Shared Function
    Encode (byte [] src) {}
    return encode (src, 0, src.length);
    }

    /**
    * base64 encode a byte array
    @param CBC byte array to encode
    @param start starting index
    @param len the number of bytes
    * @returns the base64 encoded result
    */

    Public Shared Function
    Encode (byte [], int start, int length src) {}
    Byte [] dst = new byte [(length+2)/3 * 4 + length: 72];
    int x = 0;
    int dstIndex = 0;
    Int State = 0;     What jacquard tank
    old int = 0;     previous byte
    int len = 0;     length decoded so far
    int max = length + start;
    for (int srcIndex = start; srcIndex < max; srcIndex ++) {}
    x = src [srcIndex];
    switch (++ State) {}
    case 1:
    DST [dstIndex ++] = encodeData [(x >> 2) & 0x3f];
    break;
    case 2:
    DST [dstIndex ++] = encodeData [((vieux << 4) & 0 x 30)]
    | [((x >> 4) & 0xf)] ;
    break;
    case 3:
    DST [dstIndex ++] = encodeData [((vieux << 2) & 0x3C)]
    | [((x >> 6) & 0x3)] ;
    DST [dstIndex ++] = encodeData [x & 0x3F;
    State = 0;
    break;
    }
    old = x;
    If (++ len > = 72) {}
    DST [dstIndex ++] = (byte) "\n";
    Len = 0;
    }
    }

    /*
    * now to clean the end bytes
    */

    switch (State) {}
    case 1: dst [dstIndex ++] = encodeData [(vieux << 4) & 0 x 30];
    DST [dstIndex ++] = (byte) '=';
    DST [dstIndex ++] = (byte) '=';
    break;
    case 2: dst [dstIndex ++] = encodeData [(vieux << 2) & 0x3c];
    DST [dstIndex ++] = (byte) '=';
    break;
    }
    return new String (dst);
    }

    /**
    * A Base64 decoder. This implementation is slow, and
    * does not handle wrapped lines.
    * The output is not set if there are errors in the entry.
    s @param a Base64 encoded string
    * @returns the byte array eith the decoded result
    */

    public static ubyte]
    Decode (String s) {}
    int end = 0;     final State
    If (s.endsWith ("=")) {}
    end ++;
    }
    If (s.endsWith ("is")) {}
    end ++;
    }
    int len = (s.length () + 3) / 4 * 3 - end;
    Byte [] result = new ubyte [len];
    int dst = 0;
    try {}
    for (CBC int = 0; src < s.length (); src ++) {}
    code int = charSet.indexOf (s.charAt (src));
    If (code ==-1) {}
    break;
    }
    switch (src %4) {}
    case 0:
    result [dst] = (byte) (code < < 2);
    break;
    case 1:
    result [dst ++] | = (byte) ((code >> 4) & 0x3);
    result [dst] = (byte) (code < < 4);
    break;
    case 2:
    result [dst ++] | = (byte) ((code >> 2) & 0xf);
    result [dst] = (byte) (code < < 6);
    break;
    case 3:
    result [dst ++] | = (byte) (code & 0x3f);
    break;
    }
    }
    } catch (ArrayIndexOutOfBoundsException e) {}
    return the result;
    }

    /**
    * Test the encoder and the decoder.
    * Call as < code > Base64 [channel] < code >.
    */

    public static void
    survey of hand (String [] args) {Exception
    System.out.println ("encode:" + args [0] + ""-> () "")
    + encode(args[0]) + ")");
    System.out.println ("decode:" + args [0] + ""-> () "")
    + New String (decode(args[0])) + ")");
    }
    }

    903857 wrote:
    I use Base64.java, written by Stephen investigation.

    Your code works when you use a decent Base64 encoder/decoder (for example http://commons.apache.org/codec/) then throw the investigation one.

    Note: block ECB is not secure because it allows counterfeit by splicing of the ciphertext. You must use one of the methods of feedback as a random IV with CBC.

    PS one obvious fault with the encoder/decoder Uhler Base64 is that the encoder adds a new line after 72 characters but the decoder does not correctly remove the new line. He is the likely cause of the IllegalBlockSizeException.

  • Question of Panel tabs

    I created a panel tabs on one of my pages.  It seems to work correctly in Design view, but when I saw in my browser, the only Panel that works is the (first) top of the page.  Here is a link to the page: www.robertmunozphotography.net/Muse/Places.html.  There should be a slide show in each Panel.

    Any ideas?

    Robert

    I think the juicebox inserted inside the widget gallery could interfere with the Panel in Firefox. I see a bunch of errors related to juicebox.js in the developer console when I load in Firefox, but not in Chrome. Is a panel tabs without the work of juicebox incorporated properly for you in Firefox?

  • XML as a string through OSB panels, how to send?

    I want to send an XML string to WebService via OSB producer, for example:

    < osb:sendStringXML xmlns:osb = "http://temp.openuri.org/OSB_String_param_as_XML.xsd" >
    < osb:strXML >
    * < myxml > *.
    * < str = 'test' > 123 name < / str > *.
    * < / myxml > *.
    < / osb:strXML >
    < / osb:sendStringXML >

    The needs of producers:
    * + < myxml > + *.
    * + < str = 'test' > 123 name < / str > + *.
    * + < / myxml > + *.

    but not:
    + 123 +.

    I tried [!] [CData [...]] -does not work!

    I tried to add the replace action in the rooting of the BSO and of Expression XQuery/XSLT editor:

    fn:replace($myXML,_<,_&lt) -, but it doesn't replace anything.

    Any suggestions?

    Thank you very much!

    Published by: George Moykin 2009-4-27 13:32

    Published by: George Moykin 2009-4-27 13:32

    Published by: George Moykin 2009-4-27 13:33

    Published by: George Moykin 2009-4-27 13:33

    George Moykin wrote:
    Yes, I tried with fn - bea:serialize($arg-items) but the function adds the namespaces in the nodes, for example:

    The XML is:
    **
    123
    *
    *

    and the producer receives:

    *http://temp.openuri.org/OSB_String_param_as_XML.xsd ">."
    *http://temp.openuri.org/OSB_String_param_as_XML.xsd "> 123."
    *
    *

    so I'm going to need to remove the + «xmlns...» "+ producer Analyzer does not expect tnem.
    Imagine having a hundred knots...

    I tried and his works not in my box local. I'm not a guru of xpath. It is not an optimized solution, but a working solution
    Assign $body to originalBody
    Replace the contents of the node of. in the body with $body / / myxml
    Replace the contents of the node of. in the body with fn: replace (fn - bea:serialize ($body), "xmlns:osb ="http://temp.openuri.org/OSB_String_param_as_XML.xsd"", "")

    Please escape the "in the second parameter to replace.
    Test input data:

         
         
         123
         

         

         

    Output

         
         123
         

         

    Published by: mneelapu on April 27, 2009 18:25

    Published by: mneelapu on April 27, 2009 18:26

    Published by: mneelapu on April 27, 2009 18:27

    Published by: mneelapu on April 27, 2009 18:29

    Published by: mneelapu on April 27, 2009 18:31

    Published by: mneelapu on April 27, 2009 18:33

Maybe you are looking for