How to make my code more efficient more readable

As you can see I use event.target.selectedItem. (mydata) 4 times.
I want to do something like this for the code readable and efficient.

var myData:? = event.target.selectedItem;

Philippe then able to get my 4 values to help
myData.url;
myData.name;

How can I do?
Thanks in advance

I don't know a lot about the guts of flex, but I guess that it is based on the design of Java, etc.

Storage event.target.selectedItem in an object should no longer be effective as calling event.target.selectedItem. The object will simply be a pointer of sorts of event.target.selectedItem. At no time in the call to event.target.selectedItem you doing a search, or something, in order to store the result will not result in big savings.

Now, if you were doing something like array.findItem (something) 4 times, then Yes, it would be to your advantage to store data.

Do not forget that event.target.selectedItem storage in an object will break no doubt... the links that may or may not be a problem. Object does not support binding. It is a subclass of the object that does, but I can't remember who.

Just a suggestion based on my knowledge of how the data is stored in an object-oriented... language is perhaps not the case in flex.

Tags: Flex

Similar Questions

  • How to make a program more former execution in windows 1.5 to enable my scanner HP scanner?

    I get an error message "incompatible application" when I try to scan on my HP Photosmart Plus B210 series.  I ran the troubleshooting and the supposed solution said to make older programs in this version (1.5) of Windows.  How to make a version more old execution?

    Hello

    Are you referring to Windows Azure 1.5 and if so you can post your question to:

    http://social.msdn.Microsoft.com/forums/en-us/windowsazuretroubleshooting/threads

  • How to make the query more efficient

    Hi all

    I use the following query in my app that works very well. Although I'm not an expert in PL/SQL, can someone please suggest how can I make the query more efficient? Because I use the same contract for every query table. Only difference is that in the name of the condition column. Again I am showing same column comments for each request. I was wondering if I can join these 3 and do 1 single request if possible

    DECLARE
    v_CONTRACTNO varchar2(100);
    v_CHILDCONTRACTNO varchar2(100);
    v_SOURCESYSTEM varchar2(100);
    
    BEGIN
    begin
    SELECT comments
    into v_CONTRACTNO
    from user_col_comments
      where TABLE_NAME = 'CONTRACT'
    and COLUMN_NAME = 'CONTRACTNO';
    end;
    begin
    SELECT comments
    into v_CHILDCONTRACTNO
    from user_col_comments
      where TABLE_NAME = 'CONTRACT'
    and COLUMN_NAME = 'CHILDCONTRACTNO';
    end;
    begin
    SELECT comments
    into v_SOURCESYSTEM
    from user_col_comments
      where TABLE_NAME = 'CONTRACT'
    and COLUMN_NAME = 'SOURCESYSTEM';
    end;
    END;
    

    Thanks in advance...

    Concerning

    Nabila

    Hi, Nabila,

    The nabila Islam wrote:

    Hi all

    I use the following query in my app that works very well. Although I'm not an expert in PL/SQL, can someone please suggest how can I make the query more efficient? Because I use the same contract for every query table. Only difference is that in the name of the condition column. Again I am showing same column comments for each request. I was wondering if I can join these 3 and do 1 single request if possible

    1. DECLARE
    2. v_CONTRACTNO varchar2 (100);
    3. v_CHILDCONTRACTNO varchar2 (100);
    4. v_SOURCESYSTEM varchar2 (100);
    5. BEGIN
    6. Start
    7. SOME comments
    8. in v_CONTRACTNO
    9. of user_col_comments
    10. where TABLE_NAME = 'CONTRACT '.
    11. and COLUMN_NAME = 'CONTRACTNO ';
    12. end;
    13. Start
    14. SOME comments
    15. in v_CHILDCONTRACTNO
    16. of user_col_comments
    17. where TABLE_NAME = 'CONTRACT '.
    18. and COLUMN_NAME = 'CHILDCONTRACTNO ';
    19. end;
    20. Start
    21. SOME comments
    22. in v_SOURCESYSTEM
    23. of user_col_comments
    24. where TABLE_NAME = 'CONTRACT '.
    25. and COLUMN_NAME = 'SOURCESYSTEM ';
    26. end;
    27. END;

    Thanks in advance...

    Concerning

    Nabila

    Of course, you can get all 3 values in a query.  Here's one way:

    SELECT contractno, childcontractno, sourcesystem

    IN v_contractno, v_childcontractno, v_sourcesystem

    Of user_col_comments

    PIVOT (MIN (comments)

    FOR column_name IN ('CONTRACTNO' AS contractno

    'CHILDCONTRACTNO' AS childcontractno

    'SOURCESYSTEM' AS sourcesystem

    )

    )

    WHERE table_name = 'CONTRACT '.

    ;

    But I doubt that it makes things very slow.   If your PL/SQL performance is poor, I suspect that the cause is somewhere that you haven't posted.

  • Box of text editing and how to make the files more small edge.js

    I have a project that contains 16 different text boxes. They are displayed or hidden depending on the button the user clicks. Everything works as expected, but look at the great edge.js file shows a LOT of redundant text formatting code. All the text boxes in exactly the same form, and each of them is a symbol.

    For example, the text box might look like this:

    First line

    Second line

    Third line

    Edge does not use anything other than a < p > or < div > don't tag for each line, i.e. no < ul > or < li > can be created directly on board.

    The corresponding part of the published edge.js file resulting looks like this:

    S104 = "< style p = \" margin: 0px; do-family: Arial, Helvetica, without serif. Police-weight: 400; make-style: normal; text-decoration: none; do-size: 12px; Color: rgb (0, 0, 0); background-color: rgba (0, 0, 0, 0); letter-spacing: 0px; text-transform: none; Word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal; ------"> first line < /p > < p = style-" margin: 0px; do-family: Arial, Helvetica, without serif. Police-weight: 400; make-style: normal; text-decoration: none; do-size: 12px; Color: rgb (0, 0, 0); background-color: rgba (0, 0, 0, 0); letter-spacing: 0px; text-transform: none; Word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal; ------"> second line < /p > < p = style-" margin: 0px; do-family: Arial, Helvetica, without serif. Police-weight: 400; make-style: normal; text-decoration: none; do-size: 12px; Color: rgb (0, 0, 0); background-color: rgba (0, 0, 0, 0); letter-spacing: 0px; text-transform: none; Word-spacing: 0px; text-align: start; text-indent: 0px; line-height: normal; ------"> third line < /p >"

    It's a LOT of unnecessary code. There must be a simple way to do it with CSS, like adding a class for each symbol - but this does not remove the inline style rules.

    You can that imagine how much space is consumed by these text boxes, many of which have more than 10 rows (< p > elements) each.

    Anyone know how to get around this problem?

    TIA!

    Even MORE interesting, is that I could take ALL this unnecessary inline using the waterfall style code for styling all those

    elements, simply by using a generic on their parent elements - works like a charm and the end result is that I cut the file size 88 KB to about 37 KB edge.js, while the associated HTML file went from 60 KB to 10 KB! I just took the pertinent information of ID and class of the HTML page. It seems a little counter-intuitive, but all this text style plain inline slowed the initial load to a significant degree. Be careful when you change something like that compressed, however.

    The generic switch I used was this:

    / * Text of the animation of edge

    only * /.

    div [id * = "_Text"] {p}

    do-family: Times New Roman, serif;

    font size: 1.1em;

    line-height:. 2;

    padding-left: .6em;

    }

  • How to make the cursor more visible healing

    Hello

    I ask your help to find the answers to 2 issues related both to Adobe Lightroom and Photoshop.

    1. I use the remove task L R and Spot healing in Photoshop.  A few times I'm going to remove a stain, and the background makes the cursor so light that it would be difficult to see.  I wonder if I can darken or change the color of the slider so it would be visible.

    2. when I remove a task in Photoshop, I can go over the same area that I removed a task and do more remove or modify.  In the case R L I need cancel first healing I did and start a new one.  It's a little irritating and I wonder if I can do the same thing in L R.

    Thank you all for your help and your support.

    MB

    You cannot change the cursor in LR, but if you press A, the tasks will be displayed in black & white. Press A again to disable the visualization.

    Every place you heal in Lightroom is represented by two circles - a place where you click and one for the source. To change a spot, click on the place, then it becomes active, and you can change the size, or drag the circle to the source somewhere else. You can also change the size, feather and opacity in the spot light modify Panel.

    Spot healing in Photoshop is done by changing the pixels, while in LR, it's done with metadata.

    Large healing spot in LR will be, as you may have noticed, slow LR to a crawl, so if you have many tasks in an image, it is best done in PS.

  • How to make my email more small it is too big for my screen and it too far on the right, it is when I click on create mail and it's huge

    How can I make my smaller email is too big and it was too long on the right side, it is when I click on create email and when it opens I do not have the right of it

    You can move the window by grabbing the title bar at the top. Once you have a visible advantage, place the cursor on the right on that edge, left click and drag it to the desired size. First close all other windows and the latter so that Windows remember their size.
     
  • Cannot make the code more far

    After you install adobe dreamweaver cs6 my code is too close to me, I can't move it to the left or to the right.

    Here is the image:

    check.PNG

    Yes tnx for any help

    Hey man, I disabled the back to the line and everything worked fine

  • How to make the image more dark?

    I have a slide show, and I need to my darker images, he...

    You need to do this, use an image editing software.

  • How to make soft code of the individual segments of API

    Hi gurus,

    Can you please tell me how to get soft coded individual segments and individual segments of combination of code for API. I am waiting for your answer!
    Thanks in advance!

    in the assignment of api there are has values such as segment1, segment2, segment3 etc. I fyou do not soft\_coding_keyflex_id you can pass values of segment.

    --
    -- ----------------------------------------------------------------------------
    -- |-------------------------< update_emp_asg_criteria="">----------------------|
    -- ----------------------------------------------------------------------------
    --
    -{Start of comments}
    /*#
    * This API updates the assignment of the employee attributes that affect the
    * criteria of law for any entry of the item.
    *
    *
    *

    Licensing

    * This version of the API is a license for the use of human resources.
    *
    *

    Prerequisites

    * The transfer must be an assignment of the employee. The assignment must exist as
    * of the entry into force of the amendment
    *
    *

    Success of the position

    * The API updates the assignment.
    *
    *

    Failure of the post

    * The API does not update the assignment and will raise an error.
    @param p_effective_date determines when the DateTrack operation into
    * force.
    @param p_datetrack_update_mode tells DateTrack how to use when
    * update of the registration. You must assign to each UPDATE, CORRECTION,
    * UPDATE_OVERRIDE or UPDATE_CHANGE_INSERT. Available modes for use with a
    * record depend on the dates of record previous changes and the
    * entry into force of this change.
    @param p_assignment_id identifies the registration of the assignment to change.
    @param p_validate if true, then the only validation will be performed and the
    * database remains unchanged. If false and any validation checks pass.
    * then the database is modified.
    @param p_called_from_mass_update true if the API is called from the
    The process of collective update. The default value of information use and organization of
    Position information, if the first two are not provided.
    @param p_grade_id identifies the category of the duty station
    @param p_position_id identifies the position of the assignment
    @param p_job_id identifies the work of the assignment
    @param p_payroll_id identifies the payroll of this assignment.
    @param p_location_id identifies the location of the assignment
    @param p_organization_id identifies the Organization of assignment
    @param p_pay_basis_id salary for the assignment
    @param p_segment1 key flexfield segment.
    @param p_segment2 key flexfield segment.
    @param p_segment3 key flexfield segment.
    @param p_segment4 key flexfield segment.
    @param p_segment5 key flexfield segment.
    @param p_segment6 key flexfield segment.
    @param p_segment7 key flexfield segment.
    @param p_segment8 key flexfield segment.
    @param p_segment9 key flexfield segment.
    @param p_segment10 key flexfield segment.
    @param p_segment11 key flexfield segment.
    @param p_segment12 key flexfield segment.
    @param p_segment13 key flexfield segment.
    @param p_segment14 key flexfield segment.
    @param p_segment15 key flexfield segment.
    @param p_segment16 key flexfield segment.
    @param p_segment17 key flexfield segment.
    @param p_segment18 key flexfield segment.
    @param p_segment19 key flexfield segment.
    @param p_segment20 key flexfield segment.
    @param p_segment21 key flexfield segment.
    @param p_segment22 key flexfield segment.
    @param p_segment23 key flexfield segment.
    @param p_segment24 key flexfield segment.
    @param p_segment25 key flexfield segment.
    @param p_segment26 key flexfield segment.
    @param p_segment27 key flexfield segment.
    @param p_segment28 key flexfield segment.
    @param p_segment29 key flexfield segment.
    @param p_segment30 key flexfield segment.
    @param p_employment_category job category. Valid values are defined
    * in the type of research EMP_CAT.
    @param p_concat_segments concatenated segments key Flexfield
    @param p_contract_id associated with this contract award
    @param p_establishment_id for French business groups, it identifies the
    * Creation of legal person for this mission.
    @param p_scl_segment1 first section between soft-coded key Flexfield.
    @param p_grade_ladder_pgm_id Grade scale for this mission
    assignment of the p_supervisor_assignment_id supervisor @param which is
    * responsible for overseeing this assignment.
    @param current Pass p_object_version_number in the version number of the
    * assignment to update. When IPY ends if p_validate is false,
    * will be the new version of the update assignment number. If
    * p_validate is true will have the same value that was passed in the value.
    @param p_special_ceiling_step_id going on in the highest market allowed for the
    * grade scale associated with the quality of the assignment. Will be set to null
    * If the year is updated to null. If p_validate is set to false, will be defined the
    the value of the step of the ceiling of the database. If p_validate is set to true will be
    * the value transmitted.
    @param p_people_group_id if a value is passed in this parameter, it
    identifies the an existing combination of people key Flexfield group to associate
    * with the assignment and segment values are ignored. If a value is not
    * happened, then the different segments of people provided key Flexfield group
    * will be used to choose an existing combination or create a new combination.
    * When the API ends, if p_validate is false, then this is only
    identify the combination of the people group key flexfield for
    * This assignment. If p_validate is set to true, then the null value.
    @param p_soft_coding_keyflex_id if a value is passed in this parameter,
    * It identifies an existing combination of soft-coded key Flexfield to associate
    * with the assignment and segment values are ignored. If a value is not
    * happened, then the different segments of the Soft coded key provided Flexfield
    * will be used to choose an existing combination or create a new combination.
    * When the API ends, if p_validate is false, then this is only
    identify the combination of the soft key coded to flexfield
    * This assignment. If p_validate is set to true, then the null value.
    @param p_group_name if p_validate is set to false, the value in the key group of people
    * Flexfield concatenated segments. If p_validate is set to true, the value is null.
    @param p_effective_start_date if p_validate is set to false, then the value the
    * start date effective on-line update of assignment that exists now as a
    * the date of entry into force. If p_validate is set to true, then the null value.
    @param p_effective_end_date if p_validate is set to false, then the value the
    * end date effective on-line update of assignment that exists now as the
    * entry into force. If p_validate is set to true, then the null value.
    @param p_org_now_no_manager_warning true if this transfer is one
    * Manager, the organization is updated and there is now no Manager in the
    * previous organization. False if another Manager is in the
    * previous organization.
    @param p_other_manager_warning if set to true, a manager has existed in the
    * before calling this API and the flag of Manager has the value
    * "Y" for Yes.
    @param p_spp_delete_warning set to true when grade step and point investments
    * date indeed completed or purged by this update. Both types of change
    * occur when the slope is modified and there are lines of investment of the spinal column point above
    update our. Set to false when there is no rank and point investments
    * are concerned.
    @param p_entries_changed_warning value 'Y' when one or several entries of item
    * are changed due to the change of assignment. The value of ' if at least a salary
    * entry item is affected. Room "is a more specific case of 'Y') value"n""
    * When no input item is changed.
    @param p_tax_district_changed_warning true if the assignment is for a
    * United Kingdom legislation and payroll has been changed such that. In the opposite case
    * set to false.
    @param p_concatenated_segments if p_validate is set to false, the encoded value button
    * Concatenated Flexfield segments, if p_validate is set to true, the null value.
    @param p_gsp_post_process_warning set to the name of a warning message of
    * Dictionary messages if any scale of Grade-related errors were
    * encountered during the execution of this API.
    * @rep: displayname Update employee award criteria
    * @rep: category BUSINESS_ENTITY PER_EMPLOYEE_ASG
    * @rep: category MISC_EXTENSIONS HR_DATAPUMP
    * @rep: category MISC_EXTENSIONS HR_USER_HOOKS
    * @rep: increased public
    * @rep: active life cycle
    * @rep: ihelp PER/@scalapi API in Oracle HRMS
    */
    --
    -{End of comments}
    --
    procedure update_emp_asg_criteria
    (p_effective_date dated
    p_datetrack_update_mode in varchar2
    p_assignment_id number
    p_validate in Boolean false by default
    p_called_from_mass_update in Boolean false by default
    p_grade_id in numbers by default hr_api.g_number
    p_position_id in numbers by default hr_api.g_number
    p_job_id in numbers by default hr_api.g_number
    p_payroll_id in numbers by default hr_api.g_number
    p_location_id in numbers by default hr_api.g_number
    p_organization_id in numbers by default hr_api.g_number
    p_pay_basis_id in numbers by default hr_api.g_number
    p_segment1 in varchar2 default hr_api.g_varchar2
    p_segment2 in varchar2 default hr_api.g_varchar2
    p_segment3 in varchar2 default hr_api.g_varchar2
    p_segment4 in varchar2 default hr_api.g_varchar2
    p_segment5 in varchar2 default hr_api.g_varchar2
    p_segment6 in varchar2 default hr_api.g_varchar2
    p_segment7 in varchar2 default hr_api.g_varchar2
    p_segment8 in varchar2 default hr_api.g_varchar2
    p_segment9 in varchar2 default hr_api.g_varchar2
    p_segment10 in varchar2 default hr_api.g_varchar2
    p_segment11 in varchar2 default hr_api.g_varchar2
    p_segment12 in varchar2 default hr_api.g_varchar2
    p_segment13 in varchar2 default hr_api.g_varchar2
    p_segment14 in varchar2 default hr_api.g_varchar2
    p_segment15 in varchar2 default hr_api.g_varchar2
    p_segment16 in varchar2 default hr_api.g_varchar2
    p_segment17 in varchar2 default hr_api.g_varchar2
    p_segment18 in varchar2 default hr_api.g_varchar2
    p_segment19 in varchar2 default hr_api.g_varchar2
    p_segment20 in varchar2 default hr_api.g_varchar2
    p_segment21 in varchar2 default hr_api.g_varchar2
    p_segment22 in varchar2 default hr_api.g_varchar2
    p_segment23 in varchar2 default hr_api.g_varchar2
    p_segment24 in varchar2 default hr_api.g_varchar2
    p_segment25 in varchar2 default hr_api.g_varchar2
    p_segment26 in varchar2 default hr_api.g_varchar2
    p_segment27 in varchar2 default hr_api.g_varchar2
    p_segment28 in varchar2 default hr_api.g_varchar2
    p_segment29 in varchar2 default hr_api.g_varchar2
    p_segment30 in varchar2 default hr_api.g_varchar2
    p_employment_category in varchar2 default hr_api.g_varchar2
    - Bug 944911
    -P_group_name changed to out
    -Added new param p_pgp_concat_segments to asg s procs
    -to add other p_concat_segments
    , p_concat_segments in varchar2 default hr_api.g_varchar2
    p_contract_id in hr_api.g_number by default- bug 2622747 number
    p_establishment_id in hr_api.g_number by default- bug 2622747 number
    p_scl_segment1 in varchar2 default hr_api.g_varchar2- bug 2622747
    p_grade_ladder_pgm_id in numbers by default hr_api.g_number
    p_supervisor_assignment_id in numbers by default hr_api.g_number
    p_object_version_number number nocopy
    p_special_ceiling_step_id number nocopy
    p_people_group_id number nocopy- bug 2359997
    p_soft_coding_keyflex_id number nocopy- bug 2622747
    , p_group_name out varchar2 nocopy
    p_effective_start_date date nocopy
    p_effective_end_date date nocopy
    , p_org_now_no_manager_warning out Boolean nocopy
    , p_other_manager_warning out Boolean nocopy
    , p_spp_delete_warning out Boolean nocopy
    , p_entries_changed_warning out varchar2 nocopy
    , p_tax_district_changed_warning out Boolean nocopy
    , p_concatenated_segments out nocopy varchar2- bug 2622747
    , p_gsp_post_process_warning out varchar2 nocopy
    );
    --

  • How to make the code comments?

    I don't know how make code comments, but I never really learned conventions for her. When should you comment on something? What is the standard allows you to comment on a field? A method?
    Ask him because this trig Solver in that I was average in the quarter got so much hand I'm lost in my own code and had to stop.

    As you can see no human being could possibly do anthing out of this without comment, that I was coding it I was fine. But when I woke up the next morning and has started again, I was lost.
    package trianglesolver;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.GroupLayout;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    
    public class Main {
    
        static boolean alreadyPressed = false;
    
        public static void main(String[] args) {
            JFrame mainFrame = new JFrame();
            mainFrame.setLocation(100, 100);
            mainFrame.setSize(480, 140);
            mainFrame.setTitle("Triangle Solver");
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            mainFrame.setResizable(false);
            JPanel mainPanel = new JPanel();
            mainFrame.add(mainPanel);
            GroupLayout grouplayout = new GroupLayout(mainPanel);
            grouplayout.setAutoCreateGaps(true);
            grouplayout.setAutoCreateContainerGaps(true);
            JMenuBar menuBar = new JMenuBar();
            JMenu file = new JMenu("File");
            menuBar.add(file);
            mainFrame.setJMenuBar(menuBar);
            JMenuItem exit = new JMenuItem("Exit");
            file.add(exit);
            mainFrame.setVisible(true);
            exit.addActionListener(new ActionListener() {
    
                public void actionPerformed(ActionEvent e) {
                    System.exit(0);
                }
            });
            JLabel angleA_Label = new JLabel("Angle A");
            final JTextField angleA = new JTextField("0", 8);
            JLabel angleB_Label = new JLabel("Angle B");
            final JTextField angleB = new JTextField("0", 8);
            JLabel angleC_Label = new JLabel("Angle C");
            final JTextField angleC = new JTextField("0", 8);
            JLabel sideA_Label = new JLabel("Side A");
            final JTextField sideA = new JTextField("0", 8);
            JLabel sideB_Label = new JLabel("Side B");
            final JTextField sideB = new JTextField("0", 8);
            JLabel sideC_Label = new JLabel("Side C");
            final JTextField sideC = new JTextField("0", 8);
            JButton solve = new JButton("Solve");
            solve.addActionListener(new ActionListener() {
    
                public void actionPerformed(ActionEvent e) throws NumberFormatException {
                    if (alreadyPressed == false) {
                        double A = Double.parseDouble(angleA.getText());
                        double B = Double.parseDouble(angleB.getText());
                        double C = Double.parseDouble(angleC.getText());
                        double a = Double.parseDouble(sideA.getText());
                        double b = Double.parseDouble(sideB.getText());
                        double c = Double.parseDouble(sideC.getText());
                        if (a != 0 & b != 0 & c != 0) {
                            A = Math.acos((Math.pow(a, 2) - Math.pow(b, 2) - Math.pow(c, 2)) / (-2 * b * c));
                            B = Math.asin((b * Math.sin(A)) / a);
                            angleA.setText(String.valueOf(Math.toDegrees(A)));
                            angleB.setText(String.valueOf(Math.toDegrees(B)));
                            angleC.setText(String.valueOf(180 - Math.toDegrees(A) - Math.toDegrees(B)));
                            angleA.setCaretPosition(0);
                            angleB.setCaretPosition(0);
                            angleC.setCaretPosition(0);
                        } else if (a != 0 & b != 0 & C != 0) {
                            c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(C)));
                            B = Math.asin((b * Math.sin(Math.toRadians(C))) / c);
                            sideC.setText(String.valueOf(c));
                            angleB.setText(String.valueOf(String.valueOf(Math.toDegrees(B))));
                            angleA.setText(String.valueOf(180 - Double.valueOf(angleB.getText()) - Double.valueOf(angleC.getText())));
                            sideC.setCaretPosition(0);
                            angleB.setCaretPosition(0);
                            angleA.setCaretPosition(0);
                        } else if (b != 0 & c != 0 & A != 0) {
                            a = Math.sqrt(Math.pow(b, 2) + Math.pow(c, 2) - 2 * b * c * Math.cos(Math.toRadians(A)));
                            B = Math.asin((a * Math.sin(Math.toRadians(A))) / a);
                            sideA.setText(String.valueOf(a));
                            angleB.setText(String.valueOf(String.valueOf(Math.toDegrees(B))));
                            angleC.setText(String.valueOf(180 - Math.toDegrees(B) - Double.valueOf(angleA.getText())));
                            sideA.setCaretPosition(0);
                            angleB.setCaretPosition(0);
                            angleC.setCaretPosition(0);
                        } else if (a != 0 & c != 0 & B != 0) {
                            b = Math.sqrt(Math.pow(a, 2) + Math.pow(c, 2) - 2 * a * c * Math.cos(Math.toRadians(B)));
                            C = Math.asin((c * Math.sin(Math.toRadians(B))) / b);
                            sideB.setText(String.valueOf(b));
                            angleC.setText(String.valueOf(String.valueOf(Math.toDegrees(C))));
                            angleA.setText(String.valueOf(180 - Double.valueOf(angleB.getText()) - Math.toDegrees(C)));
                            sideB.setCaretPosition(0);
                            angleC.setCaretPosition(0);
                            angleA.setCaretPosition(0);
                        }
                        alreadyPressed = true;
                    }
                }
            });
            grouplayout.setHorizontalGroup(
                    grouplayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(angleA_Label).addComponent(angleA).addComponent(angleB_Label).addComponent(angleB).addComponent(angleC_Label).addComponent(angleC).addComponent(sideA_Label).addComponent(sideA).addComponent(sideB_Label).addComponent(sideB).addComponent(sideC_Label).addComponent(sideC).addComponent(solve));
        }
    }

    Comments won't save sloppy code. Don't throw all your code in a method.

  • How to make QR codes work

    I recently had WhatsApp installed on my iphone 6 and satisfied with the ability to write texts on the screen of my Mac. However, I had problems with a PUPPY and in the process of fixing that, uninstalled WhatApp. He now works again but unable to tap on the screen of the computer. Signing in I see only and option to generate a QR code (that never happened originally) so does that, but then it's have no idea how to proceed.

    If someone kindly answer please treat me as quite inexperienced (I nearly 80) too so much technical jargon seems to have - with the best will in the world - fail to register.

    I'd appreciate help please because I find it frustrating because the tired hands prefer a keyboard to type.

    Tony

    I hope that the explanation for this page is quite clear.

    http://www.Macworld.co.UK/how-to/Mac-software/how-get-WhatsApp-on-Mac-Apple-what SAPP-web-official-app-3634119.

    The way I understand it (keep in mind that I have not used it):

    (1) you see the QR code launching the WhatsApp application on your Mac.

    (2) you open the iPhone application and follow the instructions above to get the iPhone app to scan the QR code from your mac screen

    (3) the two are now tied together so that you can use them interchangeably

  • How to make a code dreamwever show where a file is stored if it changes?

    OK, so if a website is built all offline and therefore the code indicates the files hosted on your computer and not your hosting account is an easy way to change it to the hosting account and to preserve the site dreamwever?

    You are welcome.  Good luck!

  • How to make SQL * more count the comment and blank line numbers?

    Hello

    Parameter
    Value of the parameter
    Oracle versionEnterprise Edition Release 11.2.0.1.0 - 64 bit
    OPERATING SYSTEMLinux Fedora Core 17 (X86_64)

    I would like to know, is it possible to force SQL * Plus to provide the number of the current in the source file line whenever there is an error? I often put in the first line of my script SQLBLANKLINES the VALUE ON that I may be able to put several consecutive blank lines in my code (I do that sometimes, when I find that it is appropriate to make my code more readable or a sequence of instructions which I believe make their logic more comprehensible for the reader of the Group)

    Now the problem is that SQL * Plus will ignore these empty lines and whenever there is an error, the line number in the error message does not match the actual line number in the source file, but it seems to be the last non-empty line in the file.  Consider the following example:

    SET SQLBLANKLINES ON;

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN


       
        var := 20
    END;
    /

    In the code above on line 9 (also counting blank lines), there is an error (no semicolon at the end of the var: = 20) but when I run the script

    SQL * also, here is the error message I get


    SQL > @myscript.sql;

    END;

    *

    ERROR on line 8:

    ORA-06550: line 8, column 1:

    PLS-00103: encountered the symbol "END" when expected in the following way:

    * & = - + ; <>/ is mod remains not rem

    < an exponent (*) > <>or! = or ~ = > = < = <>and like2 or

    like4 likec between | submultiset of type multiset Member

    The symbol ';' was replaced by 'END' continue.


    SQL >


    As you can see the error message indicates that the error was found on line 8, while in the file, it's really on line 9

    As long as the number of lines in the script is limited, this may not be a problem and we can quickly find the actual line number in the code that causes the error, but for a code, including hundreds (or even thousands) of lines and with many comments and blank lines, find line number given by SQL * error message more becomes complicated.

    So my question: is it possible to make SQ * more properly draw the line numbers, as they appear in the source file?

    Thanks in advance,

    Kind regards

    Dariyoosh

    Hi, Dariyoosh,

    The line numbers in error messages are always from the beginning of the statement, but not the file.  The back-end which checks the errors and generates the error message, has no idea if this statement has appeared in your file, even if the statement was in a file at all, or if it comes from multiple files, each with its own line 1.

    You can divide your scripts into parts, so that the long statements, which may lead to error messages, are each in a separate file, so the statement starts on the line 1 of the file.

    For example, you can call a script called fubar.sql, which looks like this:

    SET SQLBLANKLINES ON;
    
    @@fubar_1
    

    Which calls another script, called fubar_1.sql, located on the same directory as fubar.sql, that looks like this

    DECLARE
        var PLS_INTEGER := 10;
    BEGIN
    
        var := 20
    END;
    /
    

    You never call him directly fubar_1.

  • How to make a smaller image in my email address so I can see it, IT is too big

    How to make a picture more small in my e-mail so I can see it. This is great. It is in outlook express

    If you receive a great picture that you can't display, you will need to change and resize yourself. You do this with Outlook Express.

    You can use paint and resize the image to a smaller size.
    Or you can use download PowerToys, which has an Image Resizer utility.
    http://www.Microsoft.com/Indonesia/windowsxp/downloads/PowerToys/xppowertoys.aspx

    I hope this helps.

    Marilyn

  • How to make a shape to resemble the painting?

    Hello

    We hope that you do well.

    As you'll see in the attached photo, I try to make this bottle looks like a bowling ball. I draw two red lines and think they work fairly well, but still seem very "photoshopped". Someone at - it suggestions on how to make it look more realistic but still beautiful?

    Thank you very much.

    Reduce the opacity of the scratches and him apply a touch of 'glass' Frosted' distortion.

Maybe you are looking for