Help me in building menus dynamically to database

i have the following code whic is developed normal html and .js and .css pages
i need to deploy all these in a webserver and make the menus dynamically
i am sending he following code plz help me
since i am new to java and jsf, jsp i am unable to perfrom the task
mainpage.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
     <head>
          <title></title>
     </head>
     <frameset rows="93,*" border="0" frameborder="0">
          <frame src="head.htm" name="top" scrolling="no">
                    <frameset cols="130,*" border="0" frameborder="0">
               <frame name="navi" id="navi" src="nag.htm" scrolling="no" border="0" noresize>
                    <frame name="main" id="main" src="welcome.htm" scrolling="no">
          </frameset>
     </frameset>
</html>
menupage.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head></head>
<body>
  <script type='text/javascript'>function Go(){return}</script>
  <script type='text/javascript' src='verticalmenu_var.js'></script>
  <script type='text/javascript' src='vermenu132_compact.js'></script>
  <noscript>Your browser does not support script</noscript>
</body>
</html>and two javascript files they also i am pasting plz help me out how to link up the menu with the database in JSF using the following and above said codes
verticalmenus.js
     var NoOffFirstLineMenus=9;               // Number of main menu  items
                              // Colorvariables:
                              // Color variables take HTML predefined color names or "#rrggbb" strings
                              //For transparency make colors and border color ""
     var LowBgColor="#336699";               // Background color when mouse is not over
     var HighBgColor="#009900";               // Background color when mouse is over
     var FontLowColor="#ffffff";               // Font color when mouse is not over
     var FontHighColor="#ffffff";               // Font color when mouse is over
     var BorderColor="#ffffff";               // Border color
     var BorderWidthMain=1;               // Border width main items
     var BorderWidthSub=1;               // Border width sub items
     var BorderBtwnMain=1;               // Borderwidth between elements
     var BorderBtwnSub=1;               // Borderwidth between elements sub items
     var FontFamily="arial,comic sans ms,technical";     // Font family menu items
     var FontSize=11;                    // Font size menu items
     var FontBold=1;                    // Bold menu items 1 or 0
     var FontItalic=0;                    // Italic menu items 1 or 0
     var MenuTextCentered="left";          // Item text position left, center or right
     var MenuCentered="left";               // Menu horizontal position can be: left, center, right
     var MenuVerticalCentered="top";          // Menu vertical position top, middle,bottom or static
     var ChildOverlap=0.2;               // horizontal overlap child/ parent
     var ChildVerticalOverlap=0.2;               // vertical overlap child/ parent
     var StartTop=50;                    // Menu offset x coordinate. If StartTop is between 0 and 1 StartTop is calculated as part of windowheight
     var StartLeft=0;                    // Menu offset y coordinate. If StartLeft is between 0 and 1 StartLeft is calculated as part of windowheight
     var VerCorrect=0;                    // Multiple frames y correction
     var HorCorrect=0;                    // Multiple frames x correction
     var DistFrmFrameBrdr=2;               // Distance between main menu and frame border
     var LeftPaddng=8;                    // Left padding
     var TopPaddng=2;               // Top padding. If set to -1 text is vertically centered
     var FirstLineHorizontal=0;               // Number defines to which level the menu must unfold horizontal; 0 is all vertical
     var MenuFramesVertical=1;               // Frames in cols or rows 1 or 0
     var DissapearDelay=1000;               // delay before menu folds in
     var UnfoldDelay=100;               // delay before sub unfolds     
     var TakeOverBgColor=1;               // Menu frame takes over background color subitem frame
     var FirstLineFrame="navi";               // Frame where first level appears
     var SecLineFrame="main";               // Frame where sub levels appear
     var DocTargetFrame="main";               // Frame where target documents appear
     var TargetLoc="";                    // span id for relative positioning
     var MenuWrap=1;                    // enables/ disables menu wrap 1 or 0
     var RightToLeft=0;                    // enables/ disables right to left unfold 1 or 0
     var BottomUp=0;                    // enables/ disables Bottom up unfold 1 or 0
     var UnfoldsOnClick=0;               // Level 1 unfolds onclick/ onmouseover
     var BaseHref="file:///C|/rao/projects/changedframework/WebRoot/pages";                    // BaseHref lets you specify the root directory for relative links.
                              // The script precedes your relative links with BaseHref
                              // For instance:
                              // when your BaseHref= "http://www.MyDomain/" and a link in the menu is "subdir/MyFile.htm",
                              // the script renders to: "http://www.MyDomain/subdir/MyFile.htm"
                              // Can also be used when you use images in the textfields of the menu
                              // "MenuX=new Array("<img src=\""+BaseHref+"MyImage\">"
                              // For testing on your harddisk use syntax like: BaseHref="file:///C|/MyFiles/Homepage/"
     //var Arrws=[BaseHref+"/resources/tri.gif",5,10,,,,BaseHref+"/resources/trileft.gif",5,10,BaseHref+"/resources/triup.gif",10,5];
                              // Arrow source, width and height.
                              // If arrow images are not needed keep source ""
     var MenuUsesFrames=1;               // MenuUsesFrames is only 0 when Main menu, submenus,
                              // document targets and script are in the same frame.
                              // In all other cases it must be 1
     var OverFormElements=1;               // Set this to 0 when the menu does not need to cover form elements.
     var RememberStatus=0;               // RememberStatus: When set to 1, menu unfolds to the presetted menu item.
     var BuildOnDemand=1;               // 1/0 When set to 1 the sub menus are build when the parent is moused over
     var BgImgLeftOffset=5;               // Only relevant when bg image is used as rollover
     var ScaleMenu=0;                    // 1/0 When set to 0 Menu scales with browser text size setting
                              // When set to 2 only the relevant main item stays highligthed
                              // The preset is done by setting a variable in the head section of the target document.
                              // <head>
                              //     <script type="text/javascript">var SetMenu="2_2_1";</script>
                              // </head>
                              // 2_2_1 represents the menu item Menu2_2_1=new Array(.......
     var HooverBold=0;                    // 1 or 0
     var HooverItalic=0;                    // 1 or 0
     var HooverUnderLine=0;               // 1 or 0
     var HooverTextSize=0;               // 0=off, number is font size difference on hoover
     var HooverVariant=0;               // 1 or 0
                              // Below some pretty useless effects, since only IE6+ supports them
                              // I provided 3 effects: MenuSlide, MenuShadow and MenuOpacity
                              // If you don't need MenuSlide just leave in the line var MenuSlide="";
                              // delete the other MenuSlide statements
                              // In general leave the MenuSlide you need in and delete the others.
                              // Above is also valid for MenuShadow and MenuOpacity
                              // You can also use other effects by specifying another filter for MenuShadow and MenuOpacity.
                              // You can add more filters by concanating the strings
     var MenuSlide="";
     //var MenuSlide="progid:DXImageTransform.Microsoft.RevealTrans(duration=.5, transition=19)";
     //var MenuSlide="progid:DXImageTransform.Microsoft.GradientWipe(duration=.5, wipeStyle=1)";
     var MenuShadow="";
     //var MenuShadow="progid:DXImageTransform.Microsoft.DropShadow(color=#888888, offX=2, offY=2, positive=1)";
     //var MenuShadow="progid:DXImageTransform.Microsoft.Shadow(color=#888888, direction=135, strength=3)";
     var MenuOpacity="";
     //var MenuOpacity="progid:DXImageTransform.Microsoft.Alpha(opacity=85)";
     //function BeforeStart(){return}
     //function AfterBuild(){return}
     //function BeforeFirstOpen(){return}
     //function AfterCloseAll(){return}
// Menu tree:
// MenuX=new Array("ItemText","Link","background image",number of sub elements,height,width,"bgcolor","bghighcolor",
//     "fontcolor","fonthighcolor","bordercolor","fontfamily",fontsize,fontbold,fontitalic,"textalign","statustext");
// Color and font variables defined in the menu tree take precedence over the global variables
// Fontsize, fontbold and fontitalic are ignored when set to -1.
// For rollover images ItemText or background image format is:  "rollover?"+BaseHref+"Image1.jpg?"+BaseHref+"Image2.jpg"
Menu1=new Array("DataCollection","","",6,20,120,"","","","","","",-1,-1,-1,"","");
     Menu1_1=new Array("Record Based","","",3,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_1_1=new Array("Data Entry","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_1_2=new Array("Account","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_1_3=new Array("T","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu1_2=new Array("File Based","","",3,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","Nation");
          Menu1_2_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_2_2=new Array("Senarai ATR","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_2_3=new Array("Senarai Kertas Siasat","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu1_3=new Array("Auto Upload","ATR_Eksibit_Form.htm","",4,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_3_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_3_2=new Array("Senarai ATR","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_3_3=new Array("Senarai Kompaun","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_3_4=new Array("Senarai LJKR","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu1_4=new Array("Validation Failure","Permohonan_Keluar_Eksibit_Form.htm","",3,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_4_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","Football Every Day");
          Menu1_4_2=new Array("Senarai ATR","ATR_Eksibit_Form.htm","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_4_3=new Array("Senarai Eksibit","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu1_5=new Array("Pendakwaan","Permohonan_Keluar_Eksibit_Form.htm","",3,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_5_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_5_2=new Array("Senarai ATR","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
          Menu1_5_3=new Array("Senarai LKKP","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu1_6=new Array("OKT","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu2=new Array("Statistical Analysis","","",1,20,120,"","","","","","",-1,-1,-1,"","");
     Menu2_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu3=new Array("Discovery Analysis","","",1,20,120,"","","","","","",-1,-1,-1,"","");
     Menu3_1=new Array("Carian","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu4=new Array("Case Management","","",2,20,120,"","","","","","",-1,-1,-1,"","");
     Menu4_1=new Array("Operasi","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu4_2=new Array("Pengurusan","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu5=new Array("Content Management","","",3,20,120,"","","","","","",-1,-1,-1,"","");
     Menu5_1=new Array("e-LesenNiaga","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu5_2=new Array("e-Tribunal","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu5_3=new Array("e-Aduan","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu6=new Array("Audit log","","",0,20,120,"","","","","","",-1,-1,-1,"","");
Menu7=new Array("Administration","","",6,20,120,"","","","","","",-1,-1,-1,"","");
     Menu7_1=new Array("Akta","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu7_2=new Array("Jenis Cetak Rompak","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu7_3=new Array("Jenis Eksibit","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu7_4=new Array("Jenama","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu7_5=new Array("Karya Cetak Rompak","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
     Menu7_6=new Array("Kawasan","","",0,20,120,"#e1ffb3","#edf6d9","#404040","#0E61AE","#5eb101","",-1,0,-1,"left","");
Menu8=new Array("Pentadbiran","","",0,20,120,"","","","","","",-1,-1,-1,"","");
Menu9=new Array("Tukar Kata Laluan","","",0,20,120,"","","","","","",-1,-1,-1,"","");
plz help me out in doing so and save me
thank you

Please view open source JSF menu
http://myfaces.apache.org/tomahawk/jscookmenu.html

Similar Messages

  • How to  build a dynamic control  in 'as' file

    example :
    I want to build a dynamic CheckBox in as file (in
    flex2.0),who can help me! thanks

    thanks,i'm a chinese.I'm not be good at English.
    Now the problem have be settled.
    非常感谢你!

  • Connect Oracle Form Builder 10g to Oracle Database 10g Express

    Hi,
    I'm new to Oracle.
    I've installed both form builder and database 10g express.
    I tried to connect form builder to HR sample database in 10g express with the following:
    user name: hr
    password: hr
    database: hr
    but I received message: ora-12154: tns could not resolve the connect identifier specified.
    Can anyone help me on that? Do I need to change the tnsnames.ora?
    If yes, what should I need to change in order to connect to the HR sample?
    Thank you.

    Yes you need to have an entry in the tnsnames.ora file for you database service name or sid. The service name or sid is usually XE unless you changed it when you installed 10g express.

  • Application builder  icon disappeared from database home page

    i am wondering , is APPLICATION BUILDER ICON removed from database home page of all users or just mine. please i need help here..

    Do you mean the icon display, or the ability to use the app identified by the icon?
    (If just the display (it shows the empty box), there is a known problem with some images appearing broken. In which case, you can try forcing a reload form the server by adding a 'Shift' to your reload command (eg: use Shift-F5 in I.E. or Shift-Ctrl-R in Firefox)

  • Help needed to build simple BRF

    Hi,
    I am new to BRF and wanted some help from you building a simple BRF, say a look up from the database table.

    Hi,
    I guess you are trying to use BRF function from custom application and not talking about Process-Controlled Workflow.
    Yes. You can use BRF from custom application. BRF is just one of functions delivered in NetWeaver level.
    http://help.sap.com/saphelp_scm70/helpdata/EN/9a/6b67ce7c26446483af079719edf679/frameset.htm
    http://help.sap.com/saphelp_scm70/helpdata/EN/d6/38bb4006d9cc38e10000000a155106/frameset.htm
    Regards,
    Masa

  • Can anybody help me to build an interface that can work with this code

    please help me to build an interface that can work with this code
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("
    t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"key"
    b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    }... here's the head of my pirate_words_map.txt
    hello               ahoy
    hi                    yo-ho-ho
    pardon me       avast
    excuse me       arrr
    yes                 aye
    my                 me
    friend             me bucko
    sir                  matey
    madam           proud beauty
    miss comely    wench
    where             whar
    is                    be
    are                  be
    am                  be
    the                  th'
    you                 ye
    your                yer
    tell                be tellin'

    please help me i don t know how to go about this.my teacher ask me to build an interface that work with the code .
    Here is the interface i just build
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.awt.*;
    import javax.swing.*;
    public class boy extends JFrame
    JTextArea englishtxt;
    JLabel head,privatetxtwords;
    JButton translateengtoprivatewords;
    Container c1;
    public boy()
            super("HAKIMADE");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setBackground(Color.white);
            setLocationRelativeTo(null);
            c1 = getContentPane();
             head = new JLabel(" English to private talk Translator");
             englishtxt = new JTextArea("Type your text here", 10,50);
             translateengtoprivatewords = new JButton("Translate");
             privatetxtwords = new JLabel();
            JPanel headlabel = new JPanel();
            headlabel.setLayout(new FlowLayout(FlowLayout.CENTER));
            headlabel.add(head);
            JPanel englishtxtpanel = new JPanel();
            englishtxtpanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
            englishtxtpanel.add(englishtxt);
             JPanel panel1 = new JPanel();
             panel1.setLayout(new BorderLayout());
             panel1.add(headlabel,BorderLayout.NORTH);
             panel1.add(englishtxtpanel,BorderLayout.CENTER);
            JPanel translateengtoprivatewordspanel = new JPanel();
            translateengtoprivatewordspanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,40));
            translateengtoprivatewordspanel.add(translateengtoprivatewords);
             JPanel panel2 = new JPanel();
             panel2.setLayout(new BorderLayout());
             panel2.add(translateengtoprivatewordspanel,BorderLayout.NORTH);
             panel2.add(privatetxtwords,BorderLayout.CENTER);
             JPanel mainpanel = new JPanel();
             mainpanel.setLayout(new BorderLayout());
             mainpanel.add(panel1,BorderLayout.NORTH);
             mainpanel.add(panel2,BorderLayout.CENTER);
             c1.add(panel1, BorderLayout.NORTH);
             c1.add(panel2);
    public static void main(final String args[])
            boy  mp = new boy();
             mp.setVisible(true);
    }..............here is the code,please make this interface work with the code
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("
    t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"key"
    b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    }... here's the head of my pirate_words_map.txt
    hello               ahoy
    hi                    yo-ho-ho
    pardon me       avast
    excuse me       arrr
    yes                 aye
    my                 me
    friend             me bucko
    sir                  matey
    madam           proud beauty
    miss comely    wench
    where             whar
    is                    be
    are                  be
    am                  be
    the                  th'
    you                 ye
    your                yer
    tell                be tellin'

  • Hello can anybody  help me to build an interface

    hello can you help me to build an interface that can work with this english to private talk converter code
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("\\t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"+key+"\\b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    ... here's the head of my pirate_words_map.txt
    hello     ahoy
    hi     yo-ho-ho
    pardon me     avast
    excuse me     arrr
    yes     aye
    my     me
    friend     me bucko
    sir     matey
    madam     proud beauty
    miss     comely wench
    stranger     scurvy dog
    officer     foul blaggart
    where     whar
    is     be
    are     be
    am     be
    the     th'
    you     ye
    your     yer
    tell     be tellin'

    hakimade wrote:
    hello can you help me to build an interface that can work with this english to private talk converter codeYou might want to re-ask this question in such a way that it can be answered.
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag &#91;code] at the top of your block of code and the tag &#91;/code] at the bottom, like so:
    &#91;code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    &#91;/code]or
    {&#99;ode}
      // your code block goes here.
      // note here that the tags are the same.
    {&#99;ode}Good luck.

  • Error message in trying to use local content in Adobe Community Help of Flash Builder

    Hi,
    I have set my Adobe Community Help application preferences of Flash Builder to 'Display local content only'.to Yes.
    I also disabled my internet connection to use local help content only.
    I get the following error message when trying to access any of the links from Help home page.
    To view the requested page, connect to the Internet or deselect "Display Local Help content only" in Preferences.
    I understand this is due to all the links point online HTTP urls.
    But why cannot the local help content be accessed when it is already downloaded to local and the 'Display local content only' option is set to Yes?
    This saves me a lot ot time otherwise using Adobe Community Help is painful even for a short period of time.
    Thanks,
    Ram Manoj Kongara.

    Hi, Ram -
    To help troubleshoot your problem, can you please do the following:
    In the Adobe Community Help application, go to Edit > Preferences.
    Select Local Content.
    The list of Help packages downloaded locally appear. Make sure that the status of every Help packages reads “Current”. If the status of a Help package reads  "Out-of-Date”, select that Help package, and click Update to download the latest Help package. Note that to do this, you have to be connected to the Internet. Once you fully download the Help packages to your desktop, you can access Help offline.
    One other thing that I would want you to check is the Adobe Community Help Client version that you are using. To check that, in the Adobe Community Help application, go to File > About Adobe Help. The build version should be 3.2.0.610.
    Let me know if this helps. If the issue still persists, we can investigate further.
    Thanks,
    Mallika Yelandur
    Technical writer, Adobe Flash Builder

  • Need help for flash builder

    i need help for flash builder 4 and papervison 3d. I need to create a slider with it ranges of value from 10 to 50 to adjust the camera values for the camera.fov and also need to create it for the yaw of the object from 0 to 360. I try to look for any slider event and classes in this program but cant find any, btw, i need to use the AS only project file.
    here is my codes:
    can you please tell me how i should modify the codes?
    package
        import flash.display.BitmapData;
        import flash.display.Sprite;
        import flash.events.Event;
        import org.papervision3d.materials.BitmapFileMaterial;
        import org.papervision3d.materials.BitmapMaterial;
        import org.papervision3d.objects.primitives.Sphere;
        import org.papervision3d.view.BasicView;
        [SWF (width="800", height="600", backgroundColor="0x000000",frameRate="30")]
        public class EarthBitmap extends BasicView
            private var sphere:Sphere;
            public function EarthBitmap()
                super(800 , 600);
                var earthmaterial:BitmapFileMaterial = new BitmapFileMaterial("../assets/Earth.jpg");
                sphere = new Sphere(earthmaterial,100,20,18);
                camera.fov = 25;
                scene.addChild(sphere);
                addEventListener(Event.ENTER_FRAME,rotateSphere);
            public function rotateSphere(evt:Event):void
                sphere.yaw(0.2);
                singleRender();

    Turn the click handler into a full on separate function. Then store all the views in an array and use Math.rand() to randomly choose one.
    Something like this:
    <fx:Script>
         <![CDATA[
              var questionsArray:Array = {question2,question3,question5,questionRed,questionGeography};
              function buttonClickHandler(event:MouseEvent){
                   var randomProblem:int = Math.floor(Math.random()*(questionsArray.length));     //generates a random integer between 0 and the total number of questions in the array (arrays are 0-based)
                   navigator.pushView(questionsArray[randomProblem]);
         ]]>
    </fx:Script>
    <s:Button id="randomProblemButton" label="Next Problem" click="buttonClickHandler(event)" />
    Haven't tested that, but something along that line should work

  • Please Help me in Labview and MS Access Database Connective

    Please Help me in LabVIEW and MS Access Database Connective through an example . I am new to LabVIEW .I need simple example that take a data from a table and display it on front panel .
    thanks in advance .

    duplicate post

  • Please can someone help me to build a query

    Please can someone help me to build a query for getting the following results. I work with Oracle 9.
    My data is about this:
    Projectid / Activitycode / Act.DS / Earlystart / ActualStart
    {color:#ff0000}P001 / 110M / blabla / 1-1-08 / 1-1-08{color}
    {color:#3366ff}P001 / 230M / fdsfds / 31-1-09 / null{color}
    P001 / 450M / fsfsd / 1-4-09 / null
    P002 / null / null / 1-12-08 / 1-12-08
    {color:#3366ff}P002 / 110M / nhggh / 5-2-09 / null{color}
    P002 / 750M / wdwdwd / 5-2-09 / null
    P002 / 210M / plplplp / 31-12-08 / 31-12-08
    {color:#ff0000}P002 / 550M / ewdwd / 5-1-09 / null{color}
    I'd like to get one row for each Projectid with the {color:#3366ff}first next Early- or Actualstart{color} {color:#3366ff}after today{color} and one row with the {color:#ff0000}latest early-/actualstart before today{color}. When there are two or more rows with the same date then I want the first (minimum) Activitycode. This last condition makes it insoluble for me!
    I've tryed SQL with nested Select-statements in the Where-clause. But I've got still 2 rows per projectid because I select the min(nvl(Earlystart ,ActualStart ) I've tryed SQL with an Select in the FROM-claus with Partion BY, but I can't get it work right.
    Can someone show me the right way to solve my problem?

    How's this?
    with my_tab as (select 'P001' projectid,
                           '110M' activitycode,
                           'blabla' act_ds,
                           to_date('01/01/2008', 'dd/mm/yyyy') earlystart,
                           to_date('01/01/2008', 'dd/mm/yyyy') actualstart
                    from   dual
                    union all
                    select 'P001' projectid,
                           '230M' activitycode,
                           'fdsfds' act_ds,
                           to_date('31/01/2009', 'dd/mm/yyyy') earlystart,
                           null actualstart
                    from   dual
                    union all
                    select 'P001' projectid,
                           '450M' activitycode,
                           'fsfsd' act_ds,
                           to_date('01/04/2009', 'dd/mm/yyyy') earlystart,
                           null actualstart
                    from   dual
                    union all
                    select 'P002' projectid,
                           null activitycode,
                           null act_ds,
                           to_date('01/12/2008', 'dd/mm/yyyy') earlystart,
                           to_date('01/12/2008', 'dd/mm/yyyy') actualstart
                    from   dual
                    union all
                    select 'P002' projectid,
                           '110M' activitycode,
                           'nhggh' act_ds,
                           to_date('05/02/2009', 'dd/mm/yyyy') earlystart,
                           null actualstart
                    from   dual
                    union all
                    select 'P002' projectid,
                           '750M' activitycode,
                           'wdwdwd' act_ds,
                           to_date('05/02/2009', 'dd/mm/yyyy') earlystart,
                           null actualstart
                    from   dual
                    union all
                    select 'P002' projectid,
                           '210M' activitycode,
                           'plplplp' act_ds,
                           to_date('31/12/2008', 'dd/mm/yyyy') earlystart,
                           to_date('31/12/2008', 'dd/mm/yyyy') actualstart
                    from   dual
                    union all
                    select 'P002' projectid,
                           '550M' activitycode,
                           'ewdwd' act_ds,
                           to_date('05/01/2009', 'dd/mm/yyyy') earlystart,
                           null actualstart
                    from   dual)
    -- above mimics your table; main query is below:
    select mt2.projectid,
           mt2.activitycode,
           mt2.act_ds,
           mt2.earlystart,
           mt2.actualstart
    from   (select mt.projectid,
                   mt.activitycode,
                   mt.act_ds,
                   mt.earlystart,
                   mt.actualstart,
                   mt.date_col,
                   mt.before_after_today,
                   row_number() over (partition by mt.projectid, mt.before_after_today
                                      order by mt.date_col asc) rn_after,
                   row_number() over (partition by mt.projectid, mt.before_after_today
                                      order by mt.date_col desc) rn_before
            from   (select projectid,
                           activitycode,
                           act_ds,
                           earlystart,
                           actualstart,
                           coalesce(actualstart, earlystart, to_date('01/01/4000', 'dd/mm/yyyy')) date_col,
                           case when coalesce(actualstart,
                                              earlystart,
                                              to_date('01/01/4000', 'dd/mm/yyyy')) <= trunc(sysdate) then 1
                                else 2
                           end before_after_today
                    from   my_tab) mt) mt2,
            (select 1 id, 1 col_id from dual union all
             select 1 id, 2 col_id from dual) dummy
    where  dummy.id = case when mt2.before_after_today = 1 then rn_before
                           else rn_after
                      end
    and    mt2.before_after_today = dummy.col_id
    PROJECTID     ACTIVITYCODE     ACT_DS     EARLYSTART     ACTUALSTART
    P001     110M     blabla     01/01/2008     01/01/2008
    P001     230M     fdsfds     31/01/2009     
    P002     550M     ewdwd     05/01/2009     
    P002     110M     nhggh     05/02/2009     

  • Building OutlineFields dynamically

    Hi all,
    I need to build dynamically an OutlineField :
    Example : I have an Array of a class which contains an Array of
    TextData which I convert in an array of a class named "LineClass"
    inheriting of the DisplayNode class. What I want to do is to build an
    Array of OutlineColumnDesc which can map all attributes names of the
    class "LineClass". Then I could assign dynamically this Array to my
    OutlineField with the SetColumnList method. But the attribute "Name" of
    the OutlineColumnDesc class is read-only !
    Does anyone have ideas or experience about building OutlineFields
    dynamically ?
    Thanks.
    - Manuel -
    Manuel DEVEAUX
    Fort&eacute; Developer
    Mutuelle Pr&eacute;viade
    Nancy, FRANCE
    E-Mail : [email protected]
    -----------------------------------------

    Hi,
    Look bellow sample program
    report  ytest.
    data: lt_fieldcatalog type lvc_t_fcat.
    data: ls_fieldcatalog type lvc_s_fcat.
    field-symbols: <fs_data> type ref to data.
    field-symbols: <fs_1>.
    field-symbols: <fs_2> type any table.
    field-symbols: <fs_3> type ypoll.
    data: lt_data type ref to data.
    assign lt_data to <fs_data>.
    ls_fieldcatalog-fieldname = 'MANDT'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'POLLID'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'TEAM'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'INITIATOR'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'DESCRIPTION'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'APPROVED'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'INITIATED_DATE'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'END_DATE'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    ls_fieldcatalog-fieldname = 'WINNER'.
    ls_fieldcatalog-tabname   = 'LT_TAB'.
    append ls_fieldcatalog to lt_fieldcatalog.
    call method cl_alv_table_create=>create_dynamic_table
      exporting
        it_fieldcatalog           = lt_fieldcatalog
      importing
        ep_table                  = <fs_data>
      exceptions
        generate_subpool_dir_full = 1
        others                    = 2
    if sy-subrc <> 0.
    endif.
    assign <fs_data>->* to <fs_1>.
    assign <fs_1> to <fs_2>.
    loop at <fs_2> assigning <fs_3>.
      write: <fs_3>-pollid.
    endloop.
    Regards
    Gaurav

  • Help on Template Builder

    I need a place where I can get some help about templae builder. Specially a parent child report printing.

    Hi Syed,
    The easiest way is to look at an existing template and start playing with it...
    (if you create a master detail you'll see which template he uses)
    Do you know HTML and CSS?
    Thanks,
    Dimitri

  • Setting the Member & data build level dynamically

    Hello, I have got a situation where i need to set the Member & data build level dynamically based on the member. The option "Build Multidimensional down to here"(OLAPMetaoutline Menu)can be used,But when we use this option i could not perform my task as i need set the Build level dynamically based on the member level.I have to set the level dynamically for the following instance.Suppose My time dimension hierarchy is as follows: BY Year BY Quarter By Month If the year is say 1995,then quarter level & month level data is not required. If the year is say 1998,then quarter level & month level data is required. Could anyone provide a solution for dynamically setting the Member & data build level? Thanks,Sathyan

    Hi CTS,
    Thanks for ur repply,
    My source side i am having BANK_BRANCH_STATUS table has BRANCH_CODE and EOC_STATUS(possible values for this column is 'N','T','F','E' & 'B').
    The source table from which data has to tranform will be having BRANCH_CODE.
    i made odiwaitfordata as 1st step in package ,in this step the code looks like this
    OdiWaitForData "-CONTEXT=GLOBAL" "-GLOBAL_ROWCOUNT=1" "-LSCHEMA=ORACLE_FCSAILS" "-POLLINT=1000" "-RESUME_KEY_OPERATOR==" "-SQLFILTER=EOC_STATUS='E'" "-TIMEOUT=0" "-TIMEOUT_WITH_ROWS_OK=YES" "-UNIT_ROWCOUNT=>=1" "-INCREMENT_DETECTION=NO" "-TABLE_NAME=BANK_BRANCH_STATUS" "-OBJECT_TYPE=T"
    In the procedure,
    Source command-select branch_CODE from BANK_BRANCH_STATUS WHERE EOC_STATUS='E'
    Target command- Execute scenario for batch with branchid as a parameter... how to put up this in code form....could u suggest me?
    3) flag those which are executed so you don't wait for them again --how to put up this in code form....could u suggest me?
    Please sugest me,
    Thanks,
    MNK

  • Please help me to build the logic

    Hi All,
    Please help me to implement the following logic.
    The conditional statements should not only be executed in sequence, but also if any of them are true they should not be overridden by any subsequent conditional statements being true.
    When actual effort Accepted or Rejected for AST proposals and calculate a flag for “enhance to AST guideline” = Y/N as follows for each employee and display at the employee level
    1)If AST eligibility = N AND proposed AST % >0, then “N”
    2)Else If AST eligibility = N AND proposed AST % = 0 then “n/a”
    3)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST = 0 then “Y”
    4)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST >0 then “N”
    5)Else If AST eligibility = Y AND Act Rank = 2 AND proposed AST = 0 then “Y”
    6)Else If AST eligibility = Y AND AST % is greater than or equal to the AST guideline minimum AND less than or equal to the AST guideline maximum, then “Y”
    7)Else If AST eligibility = Y AND AST % is less than the minimum guideline OR greater than the maximum guideline, then “N”
    I tried the following code but I am not getting the expected result .
    Could you Please help me to build the logic.
    Your earliest response is very helpful to me.
    if (upper(P_stat)='ACCEPTED' or upper(P_stat) like 'REJECTED%') then
    else if NVL(P_elgi,'N') <> 'Y' AND P_prop > '0' then
    P_flag := 'N';
    else if(NVL(P_elgi,'N') <> 'Y' AND P_prop = '0') then
    P_flag := 'N/A';
    else if ((NVL(P_elgi,'N')='Y') AND P_rank = '3' AND P_prop = '0') then
    P_flag := 'Y';
    else if((NVL(P_elgi,'N')='Y') AND P_rank = '3' AND P_prop > '0') then
    P_flag := 'N';
    else if((NVL(P_elgi,'N')='Y') AND P_rank = '2' AND P_prop = '0') then
    P_flag := 'Y';
    Else if (P_prop >=ast_min_guide AND P_prop <= ast_max_guide ) then
    P_flag := 'Y';
    else
    ((P_prop < ast_min_guide) OR (P_prop > ast_max_guide)) then
    P_flag := 'N';
    end if;
    end if;

    Thanks for ur quick responce .
    When actual effort Accepted or Rejected for AST proposals and calculate a flag for “enhance to AST guideline” = Y/N
    Once the above condition is satisfied we have to check for remaing conditions
    if (upper(P_stat)='ACCEPTED' or upper(P_stat) like 'REJECTED%') then
    once it is satisfies then we have to go for remaing conditions.
    how can we do it in CASE statement.
    1)If AST eligibility = N AND proposed AST % >0, then “N”
    2)Else If AST eligibility = N AND proposed AST % = 0 then “n/a”
    3)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST = 0 then “Y”
    4)Else If AST eligibility = Y AND Act Rank = 3 AND proposed AST >0 then “N”
    5)Else If AST eligibility = Y AND Act Rank = 2 AND proposed AST = 0 then “Y”
    6)Else If AST eligibility = Y AND AST % is greater than or equal to the AST guideline minimum AND less than or equal to the AST guideline maximum, then “Y”
    7)Else If AST eligibility = Y AND AST % is less than the minimum guideline OR greater than the maximum guideline, then “N”
    I tried the following code but I am not getting the expected result .

Maybe you are looking for

  • Unable to find my InfoArea in Query Designer

    Hi all, Iu2019ve created an InfoObjectCatalog, InfoArea, DSO and an InfoCube. The data source, transformation,DTPs are all active and the flat file is loaded into the cube. I've the data also in the cube. I want to create a query out this cube that I

  • DVD player software problem

    Hi I have an imac G5 and I am having problems with my DVD player software - previously it had been working OK. When I try and play a DVD it starts slowly with no sound and then stops after about 10 seconds. I have tried trashing the DVD player prefer

  • FRM-10142 Forms error need help!

    Hi -- I am getting an error while trying to run a form in Oracle Forms Builder. The error is "FRM-10142 The HTTP listner is not running on (computer Name) at port 8888. Please start the listener or check your runtime preferences." My tnsnames file ha

  • Odd display problems [solved]

    I am running mythtv on arch, an nvidia GeForce 7600 GS video card, with a Panasonic Viera plasma TV as the display.  I've always had overscan problems (that I have not found a good answer for) but recently started having really strange video issues.

  • Ssis job hangs

    i am using ssis 2012 jobs hang randomly, today, when i ran the profiler, i found the below, please please guide on how to prevent hangs exec sp_executesql N'         --Preparing to access the Catalog object         DECLARE @t_catalogs TABLE (