Code Protection

Curious what Adobe InMarket provides for code protection. I was hoping that we would be able to to encrypt our applications and have the licensing check built directly into the Air runtime. Is code obfuscation the best we can do at this time? Are their plans to add better security in future versions of Air?

I thought about this more and even having code protection built into the Air runtime someone would just create a hacked version. I think in the end the only way to combat piracy is to have a compelling product at a reasonable price that is easy to purchase. Adding cloud based services to an application that require a valid registration could also help.

Similar Messages

  • How to request APEX product enhancements (such as code protection)

    Have reviewed and there are posts that go back to at least 2009 inquiring how to protect apex code from being exported in attempt to protect licensed applications.
    As everyone is aware, there exists the ability to export an application read-only, but this does not prevent the APEX administrator from the licensee from changing to run and build once the code has been installed by the licensor. While the procedures and functions may be wrapped, there still exist no way of protecting APEX application code which will be the core work of the licensor.
    Sure there is the license agreement between the licensor and licensee, but how difficult could it possibly be to add an export option, such as 'export read-only protected', which would prevent modification to run and build at a later time by the licensee?
    An otherwise wonderful product still suffers with this major, yet seemingly easily corrected flaw.

    johnny wrote:
    how to request APEX product enhancements (such as code protection)
    Re: Apex 4.2 wish list, but apparently failed to read my follow-up:
    Have reviewed and there are posts that go back to at least 2009 inquiring how to protect apex code from being exported in attempt to protect licensed applications.If that's the criteria then Pagination Sub-template and table-less layouts and XHTML Validation and Accessibility would have 3 years priority on it.
    As everyone is aware, there exists the ability to export an application read-only, but this does not prevent the APEX administrator from the licensee from changing to run and build once the code has been installed by the licensor. While the procedures and functions may be wrapped, there still exist no way of protecting APEX application code which will be the core work of the licensor.
    Sure there is the license agreement between the licensor and licensee, but how difficult could it possibly be to add an export option, such as 'export read-only protected', which would prevent modification to run and build at a later time by the licensee?
    An otherwise wonderful product still suffers with this major, yet seemingly easily corrected flaw.However, as usual, the needs of corporate lawyers appear to count more than those of developers, as the Statement of Direction says that APEX 4.2 will include features to protect our rights to our non-standard and non-semantic apps.

  • Applet code protection

    Hi
    I'm developing a commercial web application, and I'd like some advices about applet code protection.
    This applet we need will allow the visual design of some hardware. The parameters that are used in its creation are all visible and user supplied, and those are the same that are communicated to the server to store the design data, so this is not the security issue.
    The main point is about mathematical formula, some static parameters (data tables) and a few algorithms used to turn the parameters into a visual representation (drawn in the applet) and discover a few more advanced hardware design data (like weight, volume, area) based on those input parameters. It is a quite complicated calculation, will be created for a dozens of different hardware types, we are putting a lot of effort into this, and don't want it to be stolen, once the application goes into production.
    Legal notices will be in place, but if someone steals the code, even legal actions will not undo the damage. Code techniques I know are checking the host (easy to bypass) and code obfuscation (makes the job harder, but thiefs are people with a lot of patience), and I'm not entirely happy with them, and I couldn't find any more good alternatives around.
    A very secure option is making all this sensitive code server side, request parameters and just send an image back to the user, but that would cripple the server with too much math processing and image generation, and much less responsive for the end user (a major issue as well)... those are the reasons I thought about applets in the first place.
    Another way that came to my mind was providing an applet just with drawing capabilities, and making it request the needed formula at runtime (our communication is HTTPS), but that does not avoid interception at code level.
    I'd appreciate any advice or suggestion you could give, protection approachs or changes.
    Many thanks!

    dev@java wrote:
    The main point is about mathematical formula, some static parameters (data tables) and a few algorithms used to turn the parameters into a visual representation (drawn in the applet) and discover a few more advanced hardware design data (like weight, volume, area) based on those input parameters. It is a quite complicated calculation, will be created for a dozens of different hardware types, we are putting a lot of effort into this, and don't want it to be stolen, once the application goes into production.
    Legal notices will be in place, but if someone steals the code, even legal actions will not undo the damage.In terms of risk analysis: exactly what damage could be done by somebody with your code? For example what could I do if I had a copy of your applet which would cause you harm? And what harm would that be?

  • Order Activity rules and status code protection

    Hi
    Just a quick question on status code protection settings with regards to order activity rules.
    If order activity rules are configured so that certain statusses can be bypassed. ie. (Approval of purchase orders for instance).
    Will status code protection when set active, prevent status codes from being bypassed in the order activity rules? In other words the Purchase order must follow the normal status codes as layed out in the order activity rules?
    Any reponse will be appreciated.

    In any case, you shouldn't be doing any includes in Application.cfc(side note: capital A). The application file is not meant for presenting CFM pages. Translate all such includes into logic involving, for example, cflocation.

  • Regarding code protection

    Hi,
    My requirement is For a customized tcode which I create I need to hide the code.
    If some one click on the program name to copy the code, it should say the code is protected.you can not see the code.
    Please suggest me how to do this.
    Swami.

    Hi,
    Please try this way from url: http://www.sap-img.com/abap/program-to-hide-abap-source-code-and-protects-it.htm
    regards,
    Thien

  • Program code protection

    Hi People,
    I'm wondering, how do you load a program into a card and make sure it can never be modified by anybody, not even myself. I just want it to stay there forever. of course, nobody should be able to see the code either.
    Do I need a manufacturer to do that?
    Thanks!

    You really need to read the Global Platform specifications throughly. Think of the Visa cards that are deployed at the moment. The issuing bank controls the keys so that noone can establish a secure channel to the cardmanager and remove the applet. Also it allows the issuing bank to control what goes onto the card.
    If I gave you my smart card, you can't remove the applets because you won't be able to esstablish a secure channel without my keys. If the issuing bank wanted to update the applet, trust me, they would rather me bring my card in instead of the cost of issuing a new card. It's not financially sound. So by design of the Global Platform, it's safe.
    You are incorrect in your assumption. If you are an applet developer your only focus is getting your applet onto a card. You can't control the card. The card issuer or card holder does.

  • How do I lock or pass code protect apps or folder of apps

    Hi
    How do I lock either a single app or folder of apps?
    Thanks

    The only way to lock an app is if that specic app has that capibility. Apple does not allow one app to control another app.

  • Display protected source code

    Hi All,
    We are facing the problem of source code protection because our ABAPer deceived us and left the company.
    Now we can not modify /  display any program developed by him. We are logging with his id also giving same message as displayed below.
    The source  is protected. See explanation in long text
    Message no. ED800
    Diagnosis
    The desired source text is protected by SAP because changing it could cause system errors.
    I hope we can view this code in any diffrent way as I forgot password which I used to protect it.
    Please suggest your expoert solutions.
    Regards,
    Ramesh.

    >
    ramesh_basis wrote:
    > Hi Volker,
    >
    > Can you please describe your solution in details as I never heard about HEX-Editor.
    >
    > Please tell me step by step.
    >
    > Regards,
    > Ramesh.
    You'll have to get your basis team involved to see the transport files. Which won't be a problem if the suggestions that it's actually you who've committed the crime are false, will it?

  • Crystal Reports 2008 - connection info in code not recognized

    Application is vb.net using dynamic cascading parms and has been runnning fine in Crystal XI using VS2005.  We upgraded to VS2008 and CR 2008 for compatibility with Windows 7.  Now all reports do not recognize the data connection assignment that takes place in the code (they revert to the connection used at design time). 
    We set the connection (ci) which is later referenced as myConnectionInfo
              With ci
                    .ServerName =
                    .UserID =
                    .Password =
                    .DatabaseName =
                    .IntegratedSecurity = False
                End With
    And loop thru the tables.
                For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables     
                    Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
                    myTableLogonInfo.ConnectionInfo = myConnectionInfo
                    myTable.ApplyLogOnInfo(myTableLogonInfo)               
                Next
    The connection passes a TestConnectivity test.  But rather than see the parameter form, a generic form displays with the ServerName filled and requests login info.  If you do enter that manually(not normal),  the CR parm form displays but dynamic parms do not have their combo box. 
    The report will run fine against the default data connection.  The problem is the report no longer recognizes the coded connection change which is critical to reporting the proper information.

    Hi Ludek,
    I too am facing the same problem. My environment detail is CR2008/VS2008 (Note I have no service pack installed yet). If I have a report with no dynamic parameter the report works fine with connection information provided in code but with dynamic parameter its not working even after the workaround you specified. I am getting the error
    CrystalDecisions.CrystalReports.Engine.InternalException - Failed to retrieve data from the database
    Here is my code:
    protected void logonReport(string dbServerName, string dbName,
                string dbUserId, string dbPwd)
                ConnectionInfo connInfo = null;
                TableLogOnInfo tblLogonInfo = null;
                Tables tbls = null;
                try
                    connInfo = new ConnectionInfo();
                    connInfo.ServerName = dbServerName;
                    connInfo.DatabaseName = dbName;          //not used for Oracle
                    connInfo.UserID = dbUserId;
                    connInfo.Password = dbPwd;
                    tbls = this._crReport.Database.Tables;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                    this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
                catch (Exception ex)
                    throw ex;
                finally
                    if (connInfo != null) connInfo = null;
    Thanks
    Kajal

  • How do I break my codes into classes??

    How do i break each tab into a class and call them inside a main program ??
    Please show me how thanks.
    import javax.swing.JTabbedPane;
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import javax.swing.BorderFactory;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import java.sql.*;
    import java.io.*;
    public class DatabaseApp extends JPanel {
         // declare the width and height of UI
         public static int WIDTH = 800;
         public static int HEIGHT = 600;
         // create textfield objects for user to enter the input
         TextField employeeID = new TextField(15);
         TextField name = new TextField(40);
         TextField address = new TextField(40);
         TextField suburb = new TextField(20);
         TextField state = new TextField(5);
         TextField pCode = new TextField(5);
         TextField dob = new TextField(15);
         TextField homePh = new TextField(15);
         TextField workPh = new TextField(15);
         TextField mobile = new TextField("0",15);
         TextField eMail = new TextField(30);
         TextField dbase = new TextField("employee",20);
         TextField report = new TextField(15);
         TextField query= new TextField(50);
         TextArea displayArea = new TextArea(16,80);
         TextArea helpArea = new TextArea(20,80);
         public static void main (String[] args) {
              JFrame frame = new JFrame ("S-League Management System");
              frame.addWindowListener(new WindowAdapter(){
                        public void windowClosing (WindowEvent e) {
                             System.exit(0);
              frame.getContentPane().add(new DatabaseApp(), BorderLayout.CENTER);
              frame.setSize(800,600);
              frame.setResizable(false);
              frame.setVisible(true);
              //centralise the screen
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension frameSize = frame.getSize();
              frame.setLocation((screenSize.width - frameSize.width) / 2,
                   (screenSize.height - frameSize.height) / 2);
         /** add buttons to the database form
         public JButton(String text,Icon icon)
         Creates a button with initial text and an icon.
         Parameters:
         text - the text of the button.
         icon - the Icon image to display on the button
         JButton newButton = new JButton (" New ", new ImageIcon(DatabaseApp.class.getResource("img/New.gif")));
         JButton addButton = new JButton (" Add ", new ImageIcon (DatabaseApp.class.getResource("img/Add.gif")));
         JButton findButton = new JButton (" Retrieve ", new ImageIcon (DatabaseApp.class.getResource("img/Find.gif")));
         JButton updateButton = new JButton (" Update ", new ImageIcon (DatabaseApp.class.getResource("img/Refresh.gif")));
         JButton deleteButton = new JButton (" Delete ", new ImageIcon (DatabaseApp.class.getResource("img/Delete.gif")));
         JButton submitButton = new JButton (" Submit Query ", new ImageIcon (DatabaseApp.class.getResource("img/Export.gif")));
         JButton reportButton = new JButton (" Report File ", new ImageIcon (DatabaseApp.class.getResource("img/AlignLeft.gif")));
         /** create tabbed pane for form
         * public void addTab(String title,Icon icon,Component component,String tip)
         * Parameters:
         * title - the title to be displayed in this tab
         * icon - the icon to be displayed in this tab
         * component - The component to be displayed when this tab is clicked.
         * tip - the tooltip to be displayed for this tab
         public DatabaseApp() {
              // create new tabbedPane object
              JTabbedPane tabbedPane = new JTabbedPane(){
                   ImageIcon imageIcon = new ImageIcon("img/logo.jpg");
                   Image image = imageIcon.getImage();
                   public void paintComponent (Graphics g) {
                        g.setColor(new Color(220,220,220));
                        g.fillRect(0,0,643,74);
                        g.drawImage(image, 0, 4, this);
                        super.paintComponent(g);
              tabbedPane.addTab(" Team Management ",null, buildQueryPanel(), "Team Management");
              tabbedPane.addTab(" Player Registration ",null, buildGeneralPanel(), "Player Registration");
              tabbedPane.addTab(" Author ",null, buildAuthorPanel(), "Author");
              // assign layout manager
              //setLayout(new GridLayout(1,1));
              tabbedPane.setSelectedIndex(1);
              tabbedPane.setBorder(BorderFactory.createEmptyBorder(78,0,0,0));
              add(tabbedPane);
         protected JPanel buildQueryPanel() {
              JPanel mainPane = new JPanel();
              // divided into three panes. these panes will be added to mainPanel
              JPanel westPane = new JPanel();
              JPanel centrePane = new JPanel();
              JPanel southPane = new JPanel();
              // assign the layout managers
              mainPane.setLayout(new BorderLayout());
              westPane.setLayout(new GridLayout(4,1));
              centrePane.setLayout(new GridLayout(4,1));
              // create array of Panels for label textfield and buttons and make them left align
              Panel labelPane[] = new Panel[4];
              Panel buttontxtPane[] = new Panel[4];
              Panel textPane[] = new Panel[1];
              for (int i=0; i < labelPane.length; ++i) {
                   labelPane[i] = new Panel();
                   labelPane.setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < buttontxtPane.length; ++i) {
                   buttontxtPane[i] = new Panel();
                   buttontxtPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < textPane.length; ++i) {
                   textPane[i] = new Panel();
                   textPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              // add different label to the labelPane
              labelPane[0].add(new JLabel("Database:"));
              labelPane[1].add(new JLabel("Query:"));
              labelPane[2].add(new JLabel("Report File:"));
              labelPane[3].add(new Label(""));
              // textfields
              buttontxtPane[0].add(dbase);
              buttontxtPane[1].add(query);
              buttontxtPane[2].add(report);
              // buttons
              buttontxtPane[3].add(submitButton);
              submitButton.setMnemonic('s');
              buttontxtPane[3].add(reportButton);
              reportButton.setMnemonic('r');
              // text area to view the result
              textPane[0].add(displayArea);
              // add action listener to buttons
              submitButton.addActionListener(new ButtonHandler());
              reportButton.addActionListener(new ButtonHandler());
              for(int i=0; i < labelPane.length; ++i)
                   westPane.add(labelPane[i]);
              for(int i=0; i < buttontxtPane.length; ++i)
                   centrePane.add(buttontxtPane[i]);
              for(int i=0; i < textPane.length; ++i)
                   southPane.add(textPane[i]);
              mainPane.add(westPane, BorderLayout.WEST);
              mainPane.add(centrePane, BorderLayout.CENTER);
              mainPane.add(southPane,BorderLayout.SOUTH);
              return mainPane;
         /**Create a JPanel for General tab, divide it into three JPanels for label, displaytext
         * and buttons.Assign a Flowlayout manager to each panel. Add label, textfield
         * and buttons to respective panel. following constructors will be used
         * for Jlabel
         * public JLabel(String text)
         * Creates a JLabel instance with the specified text. The label is aligned against the leading edge of its display area, and centered vertically.
         * Parameters:
         * text - The text to be displayed by the label.
         protected Component buildGeneralPanel() {
              // main panel
              JPanel mainPanel = new JPanel();
              // divided into three panes. these panes will be added to mainPanel
              JPanel westPane = new JPanel();
              JPanel centrePane = new JPanel();
              JPanel southPane = new JPanel();
              // assign the layout managers
              mainPanel.setLayout(new BorderLayout());
              westPane.setLayout(new GridLayout(12,1));
              centrePane.setLayout(new GridLayout(12,1));
              // create array of Panels for label textfield and buttons and make them left align
              Panel labelPane[] = new Panel[12];
              Panel textPane[] = new Panel[12];
              Panel buttonPane[] = new Panel[2];
              for (int i=0; i < labelPane.length; ++i) {
                   labelPane[i] = new Panel();
                   labelPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < textPane.length; ++i) {
                   textPane[i] = new Panel();
                   textPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < buttonPane.length; ++i) {
                   buttonPane[i] = new Panel();
                   buttonPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              // add different label to the labelPane
              labelPane[0].add(new JLabel("Employee No"));
              labelPane[1].add(new JLabel("Name"));
              labelPane[2].add(new JLabel("Address"));
              labelPane[3].add(new JLabel("Suburb"));
              labelPane[4].add(new JLabel("State"));
              labelPane[5].add(new JLabel("PostCode"));
              labelPane[6].add(new JLabel("Date of Birth"));
              labelPane[7].add(new JLabel("Home Phone"));
              labelPane[8].add(new JLabel("Work Phone"));
              labelPane[9].add(new JLabel("Mobile"));
              labelPane[10].add(new JLabel("E-mail"));
              // add textfield component to textPane
              textPane[0].add(employeeID);
              textPane[1].add(name);
              textPane[2].add(address);
              textPane[3].add(suburb);
              textPane[4].add(state);
              textPane[5].add(pCode);
              textPane[6].add(dob);
              textPane[7].add(homePh);
              textPane[8].add(workPh);
              textPane[9].add(mobile);
              textPane[10].add(eMail);
              // add button to buttonPane and assign keyboard key for shortcut e.g Alt + n
              buttonPane[0].add(newButton);
              newButton.setMnemonic('n');
              buttonPane[0].add(addButton);
              addButton.setMnemonic('a');
              buttonPane[0].add(findButton);
              findButton.setMnemonic('r');
              buttonPane[0].add(updateButton);
              updateButton.setMnemonic('u');
              buttonPane[0].add(deleteButton);
              deleteButton.setMnemonic('d');
              // add actionlistener to the buttons
              newButton.addActionListener(new ButtonHandler());
              addButton.addActionListener(new ButtonHandler());
              findButton.addActionListener(new ButtonHandler());
              updateButton.addActionListener(new ButtonHandler());
              deleteButton.addActionListener(new ButtonHandler());
              for (int i = 0; i < labelPane.length; ++i)
                   westPane.add(labelPane[i]);
              for (int i = 0; i < textPane.length; ++i)
                   centrePane.add(textPane[i]);
              for (int i = 0; i < buttonPane.length; ++i)
                   southPane.add(buttonPane[i]);
              mainPanel.add(westPane,BorderLayout.WEST);
              mainPanel.add(centrePane,BorderLayout.CENTER);
              mainPanel.add(southPane,BorderLayout.SOUTH);
              return mainPanel;
         protected JPanel buildAuthorPanel(){
              JPanel authorPanel = new JPanel();
              JPanel authorPane = new JPanel();
              authorPanel.setLayout(new BorderLayout());
              authorPane.setLayout(new GridLayout(9,1));
              Panel pane[] = new Panel[9];
              for (int i=0; i < pane.length; i++) {
                   pane[i] = new Panel();
                   pane[i].setLayout(new FlowLayout(FlowLayout.CENTER));
              pane[0].add(new JLabel(""));
              pane[1].add(new JLabel(""));
              pane[2].add(new JLabel(""));
              pane[3].add(new JLabel(""));
              pane[4].add(new JLabel("Name:Jasper Lim Jiqiang"));
              pane[5].add(new JLabel("Admin:992365G"));
              pane[6].add(new JLabel(""));
              pane[7].add(new JLabel(""));
              pane[8].add(new JLabel(""));
              for (int i=0; i < pane.length; i++)
                   authorPane.add(pane[i]);
              authorPanel.add(authorPane, BorderLayout.CENTER);
              return authorPanel;

    Maybe something like this:
    <code>
    JTabbedPane tabbedPane = new JTabbedPane();
              JPanel introPanel = new JPanel();
              introPanel.add(createIntroPanel());
              ImageIcon img = new ImageIcon(getResourceString("tabIconFile"));
              tabbedPane.addTab(getResourceString("introTab"), img, introPanel);
    </code>
    plus
    <code>
    protected JPanel createIntroPanel()
              JPanel pane = new IntroPanel();
              return pane;
    </code>
    Klint

  • How to lock the keypad with a code in Nokia E5?

    Hi,
    I have recently purchased E5 and even after entering lock code I am unable to lock my phone.
    If anybody knows how to then please tell me too?
    Thanks
    Solved!
    Go to Solution.

    The lock code protects your device against unauthorised use. The preset code is 12345.
    To lock the device, in the home screen, press the power key (red key), and select Lock phone.
    To unlock your device, select Unlock > OK, enter the lock code, and select OK.
    To change the lock code, press  :  Menu =>  Ctrl. panel => Settings => General > Security => Phone and SIM card => lock code.
    Enter the old code (if it was presetted than "enter 12345") and then the new code twice.
    enjoy with ure secure phone  

  • How to protect sourcecode

    How to protect sourcecode,i have seen,there are many programs,which can convert .Class files to .java files,ok,How to protect resourcecode.thanks

    Write your code in C++ and compile it using a good optimizing compiler, like icc (Intel C++ Compiler). (Hand-written assembly code is relatively simple to be decoded because it must be small and understandable by its writer, a human being; Microsoft C++ is a good compiler, but generates machine code that is very understandable by a human being - you don't need to be an unemployed Russian guy with a PhD in number theory to break the code - just being a normal guy that has a lot of time to spend is enough. Try reading the very contrived code that icc generates and compares it with the MSVC++ compiler generated code...)
    To make the C++ code being harder to be understood if disassembled, use the Standard C++ Library (STL) and use a lot of templatized code, but turn the optimization options to the maximum available.
    Java and .NET languages are not very amenable to source code protection. Obfuscating tools are available, but if you understand the subject of the code, you can easily guess the original source code. For instance, you can try to decompile the code of RSA JSafe that comes with the Sun JCE. Even obfuscated by Dash-O it is perfectly possible to understand what algorithms are implemented.

  • Help translating a servlet code to bean

    hi all
    i'd like to translate a servlet code to bean code
    the servlet, called from the <img src""> tag in my web page retrieves an images from a database and, setting the response content-type to "image" returns the image.
    i'd like to do it through the common getXxx/setXxx methods of a bean
    how to do it?
    that's the servlet's code:
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, java.io.IOException {
            response.setContentType("text/html");
            ServletOutputStream out = response.getOutputStream();
            try
                Connection connection=(Connection)getServletContext().getAttribute("connection");
                Statement s=connection.createStatement();
                response.setContentType("image/jpeg");           
                ResultSet rs=s.executeQuery("select "+request.getParameter("col")+" from products where id="+request.getParameter("id"));           
                while(rs.next())
                    out.write(rs.getBytes(request.getParameter("col")));
            catch(SQLException s)
                response.setContentType("text/html");           
            catch(NullPointerException n)
            out.close();
        } thanx in advance
    sandro

    try this:
    <%
    response.setContentType("text/html");
    try {
    Connection connection=(Connection)application.getAttribute"connection");
       Statement s=connection.createStatement();
       response.setContentType("image/jpeg");
       ResultSet rs=s.executeQuery("select "+
                  request.getParameter("col")+
                 " from products where id="+
                  request.getParameter("id"));
       while(rs.next()) {
    %>
          <%= rs.getBytes(request.getParameter"col"))) %>
    <%
    } catch(SQLException s) {
       response.setContentType("text/html");
    } catch(NullPointerException n) {
    %>

  • Equivalent code for this line?

    What is the equivalent to ---> String ss = s[i][j] == null ? "" : s[i][j];
    I have no idea what ---> ? "" : s[i][j] means. My friend added this to my nested loop for it too work. Is there another equivalent way of doing this that is understandable to the intermediate programmer. Thanks in Advance.
    Here is my code:
         protected void printTable (String[][] s, PrintStream ps)
              int[] maxLen = new int[s[0].length];
              for (int c = 0; c < s[0].length; c++)
                   maxLen[c] = 0;
                   for (int r = 0; r < s.length; r++)
                        String ss = s[r][c] == null ? "" : s[r][c];
                        maxLen[c] = Math.max (maxLen[c], ss.length ());
              for (int i = 0; i < s.length; i++)
                   for (int j = 0; j < s.length; j++)
                        String ss = s[i][j] == null ? "" : s[i][j];
                        ps.print (ss);
                        for (int k = ss.length (); k <= maxLen[j]; k++)
                             ps.print (" ");
                   ps.println ();
              ps.println ();

    String ss = s[j] == null ? "" : s[j];It does this,
    String ss;
    if (s[j] == null)
       ss = "";
    else
       ss = s[j];

  • Private protected - ?

    I guess I haven't looked at my Java language spec in awhile (or never did very closely), but I was surprised today to find out that the "protected" specifier allows subclasses as well as any classes in the same package. I feel this is a little too much access for my tastes.
    I guess the idea here is that one developer/group will be desigining a package as a whole and will not do anything advertant or malicious with another class' protected members.
    http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
    I noticed that in Java 1.0 also had a fifth specifier as "private protected" that is no longer supported. Was this the sought-after protection that I am looking for? What was the reason for not providing something like this?
    Btw, my C++ is also a little rusty around the details, but does the "protected" specifier do the same thing with namespaces or something?

    The point of such silly code (below) is simply to demonstrate that that no one should be allowed to change the key's code except the Key. If I want to subclass a Key, I shouldn't be forced to make "Key.Code" private and re-implement Code again in my subclass. From an object-oriented perspective, I still feel that "protected" should only be valid from within sub-classes and have a 5th specifier that specifies both package and subclass.
    A colleague of mine pointed out that the "package" specifier is horizontal (across the package), but there is no specifier that is just vertical (only subclasses).
    Is there anything stopping someone to add a package to a class and compile it? For that matter, they now have access to all the protected members of the package classes.
    All classes in the same package :
    package KeyLock;
    class Lock
      public String lockCode = "MySecretKey";
      public Lock(String code)
        lockCode = code;
      protected void tryLock(Key k)
        if(k.getCode().equals(lockCode)
          System.out.println("Success");
        else
          System.out.println("Failure");
    class Key
      protected String Code = "MySecretKey";
      public String getCode()
        return Code;
      public Key()
    public class BetterKey extends Key
      public BetterKey()
        Code = "EvenBetterKey";
    class LockPicker
      public LockPicker()
        Key key1 = new Key();
        Key key2 = new BetterKey();
        Lock lock = new Lock("UselessLock");
        key1.Code = "UselessLock";
        key2.Code = "UselessLock";
        lock.tryKey(key1);
        lock.tryKey(key2);
    }Maybe I'm just spun...

Maybe you are looking for

  • Unable to change Profile picture in Windows 8

    I recently upgraded to Windows 8.  The upgrade imported a picture from my Windows 7 Skype, and now I am unable to change the profile picture.  There is no menu at the top in Windows 8, which prevents me from changing the profile picture. What are my

  • External disk won't mount after 10.5.7 upgrade

    Hi, I know there's problem with Buffalo external HD; mine is Lexcron 3.5'' external case and it won't mount neither. I tried PRAM restart, and if I go to Disk Utility and try to repair, it gives me the following message: Verify and Repair volume "Dir

  • Blog page issues in IE

    I'm using iWeb and .mac to create a video game website. I put the game reviews and description on my blog pages. Recently people have informed me that they can only see half of my review page when using Internet Explorer. I have tried 3 different PCs

  • I have a video that is 1920 x 1080 14.99fps, when I load in Premiere 1080p30 it appears to be moving in slow motion, How do I fix that?

    I have a video that is 1920 x 1080 14.99fps, when I load in Premiere 1080p30 it appears to be moving in slow motion, How do I fix that?

  • Layout formula not displayed in web

    Hello all, I have a layout for forecasting so depending on the version the planner chooses i will have either 39 or 66 or 9+3. since i am dynamically populating my layouts i am not able to assign Q1,Q2,Q3,Q4 totals so in the 3rd layout screen I am wr