Validating user inputValidating a userFinding potential thread safety issues and race conditions in my multithreading codeScrubbing user inputValidating input against rulesDriver license program which grades an individual's responsesValidating input values in C#Validating integer or string inputValidating user input in C# coming from XAML controlsValidating input variablesValidating proper input

Schematic conventions for different supply rails

Be in awe of my brilliance!

Does splitting a potentially monolithic application into several smaller ones help prevent bugs?

Rules about breaking the rules. How do I do it well?

How do I hide Chekhov's Gun?

Calculus II Professor will not accept my correct integral evaluation that uses a different method, should I bring this up further?

How to generate globally unique ids for different tables of the same database?

Possible Leak In Concrete

Why must traveling waves have the same amplitude to form a standing wave?

Why are there 40 737 Max planes in flight when they have been grounded as not airworthy?

Why using two cd commands in bash script does not execute the second command

Old race car problem/puzzle

Dot in front of file

Life insurance that covers only simultaneous/dual deaths

Instead of Universal Basic Income, why not Universal Basic NEEDS?

Does the statement `int val = (++i > ++j) ? ++i : ++j;` invoke undefined behavior?

Humanity loses the vast majority of its technology, information, and population in the year 2122. How long does it take to rebuild itself?

How to deal with taxi scam when on vacation?

Using "wallow" verb with object

Ban on all campaign finance?

Why is "das Weib" grammatically neuter?

What does it mean to make a bootable LiveUSB?

How to answer questions about my characters?

Pinhole Camera with Instant Film



Validating user input


Validating a userFinding potential thread safety issues and race conditions in my multithreading codeScrubbing user inputValidating input against rulesDriver license program which grades an individual's responsesValidating input values in C#Validating integer or string inputValidating user input in C# coming from XAML controlsValidating input variablesValidating proper input













4












$begingroup$


I've written the below code to validate user input but I feel it's quite excessive for what seems to be a simple operation. I want to only accept non-negative integers or doubles as an input. This block of code is required three times in my program so I will need to put it into a method or something but in the mean time is there a simpler way to validate user input?



 Scanner input = new Scanner(System.in);

boolean validWidth = false;
double width = 0.0;;

do // do while runs until the input is validated

System.out.print("Enter width: ");
if (input.hasNextInt()) // we accept an int

width = input.nextInt();
if (width > 0) // we accept a non-negative

validWidth = true;

else // refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else if (input.hasNextDouble())// accept a double

width = input.nextDouble();
if (width > 0) // we accept a non-negative

validWidth = true;

else // and refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else

System.out.println("Input error. Try again.");
validInput = false;
input.next();

while (!(validWidth));









share|improve this question









New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
    $endgroup$
    – Zeta
    5 hours ago










  • $begingroup$
    Sorry, I have added those now.
    $endgroup$
    – PerfectContrast
    4 hours ago










  • $begingroup$
    Perfect, thanks. I hope that one of the Java devs will review your code soon.
    $endgroup$
    – Zeta
    4 hours ago















4












$begingroup$


I've written the below code to validate user input but I feel it's quite excessive for what seems to be a simple operation. I want to only accept non-negative integers or doubles as an input. This block of code is required three times in my program so I will need to put it into a method or something but in the mean time is there a simpler way to validate user input?



 Scanner input = new Scanner(System.in);

boolean validWidth = false;
double width = 0.0;;

do // do while runs until the input is validated

System.out.print("Enter width: ");
if (input.hasNextInt()) // we accept an int

width = input.nextInt();
if (width > 0) // we accept a non-negative

validWidth = true;

else // refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else if (input.hasNextDouble())// accept a double

width = input.nextDouble();
if (width > 0) // we accept a non-negative

validWidth = true;

else // and refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else

System.out.println("Input error. Try again.");
validInput = false;
input.next();

while (!(validWidth));









share|improve this question









New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
    $endgroup$
    – Zeta
    5 hours ago










  • $begingroup$
    Sorry, I have added those now.
    $endgroup$
    – PerfectContrast
    4 hours ago










  • $begingroup$
    Perfect, thanks. I hope that one of the Java devs will review your code soon.
    $endgroup$
    – Zeta
    4 hours ago













4












4








4





$begingroup$


I've written the below code to validate user input but I feel it's quite excessive for what seems to be a simple operation. I want to only accept non-negative integers or doubles as an input. This block of code is required three times in my program so I will need to put it into a method or something but in the mean time is there a simpler way to validate user input?



 Scanner input = new Scanner(System.in);

boolean validWidth = false;
double width = 0.0;;

do // do while runs until the input is validated

System.out.print("Enter width: ");
if (input.hasNextInt()) // we accept an int

width = input.nextInt();
if (width > 0) // we accept a non-negative

validWidth = true;

else // refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else if (input.hasNextDouble())// accept a double

width = input.nextDouble();
if (width > 0) // we accept a non-negative

validWidth = true;

else // and refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else

System.out.println("Input error. Try again.");
validInput = false;
input.next();

while (!(validWidth));









share|improve this question









New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I've written the below code to validate user input but I feel it's quite excessive for what seems to be a simple operation. I want to only accept non-negative integers or doubles as an input. This block of code is required three times in my program so I will need to put it into a method or something but in the mean time is there a simpler way to validate user input?



 Scanner input = new Scanner(System.in);

boolean validWidth = false;
double width = 0.0;;

do // do while runs until the input is validated

System.out.print("Enter width: ");
if (input.hasNextInt()) // we accept an int

width = input.nextInt();
if (width > 0) // we accept a non-negative

validWidth = true;

else // refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else if (input.hasNextDouble())// accept a double

width = input.nextDouble();
if (width > 0) // we accept a non-negative

validWidth = true;

else // and refuse a negative

System.out.println("Input error. Try again.");
validWidth = false;


else

System.out.println("Input error. Try again.");
validInput = false;
input.next();

while (!(validWidth));






java validation






share|improve this question









New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 4 hours ago







PerfectContrast













New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









PerfectContrastPerfectContrast

235




235




New contributor




PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






PerfectContrast is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
    $endgroup$
    – Zeta
    5 hours ago










  • $begingroup$
    Sorry, I have added those now.
    $endgroup$
    – PerfectContrast
    4 hours ago










  • $begingroup$
    Perfect, thanks. I hope that one of the Java devs will review your code soon.
    $endgroup$
    – Zeta
    4 hours ago
















  • $begingroup$
    Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
    $endgroup$
    – Zeta
    5 hours ago










  • $begingroup$
    Sorry, I have added those now.
    $endgroup$
    – PerfectContrast
    4 hours ago










  • $begingroup$
    Perfect, thanks. I hope that one of the Java devs will review your code soon.
    $endgroup$
    – Zeta
    4 hours ago















$begingroup$
Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
$endgroup$
– Zeta
5 hours ago




$begingroup$
Welcome to Code Review. Unfortunately, your code is missing some important context, for example input's type, how it's initialized, and the declarations of the other variables. Keep in mind that It's fine to drop a lot of code here, as long as you properly explain it beforehand.
$endgroup$
– Zeta
5 hours ago












$begingroup$
Sorry, I have added those now.
$endgroup$
– PerfectContrast
4 hours ago




$begingroup$
Sorry, I have added those now.
$endgroup$
– PerfectContrast
4 hours ago












$begingroup$
Perfect, thanks. I hope that one of the Java devs will review your code soon.
$endgroup$
– Zeta
4 hours ago




$begingroup$
Perfect, thanks. I hope that one of the Java devs will review your code soon.
$endgroup$
– Zeta
4 hours ago










1 Answer
1






active

oldest

votes


















3












$begingroup$

You are distinguishing between hasNextInt() and hasNextDouble() in the input stream, but treating them identically afterwards. hasNextDouble() will return true if the next token is an integer, because integers can be successfully parsed as a double too.



So your loop could be simplified into:



double width = 0.0;

for(;;)
System.out.print("Enter width: ");
if (input.hasNextDouble())
width = input.nextDouble();
if (width > 0)
break;

System.out.println("Input error. Try again.");
input.nextLine();



A few notes:



  • The unnecessary validWidth variable has been removed. A break statement exits the infinite for(;;) loop, skipping over the "cleanup, try again" code.


  • .nextLine() is used to cleanup after invalid input. This is important, because if the user enters "one fish two fish red fish blue fish" instead of say -12, your current approach will print out "Input error. Try again" 8 times. Using .nextLine() discards everything up to and including the new line character. Which brings us to zero and negative numbers. If the user enters a valid integer/double, but not a positive one, your code didn't skip any tokens, where as my code (as mentioned above) will skip the remaining input up to and including the new line character. Assuming the next character was a new line (as in the user entered -12 and pressed the return key) the following .hasNextDouble() will skip over the new line (and any other blank space) looking for the next token, so the effect is approximately the same.


  • But my code performs differently if the user enters red 5. You original code will print "Invalid input. Try again.", and then immediately consume the 5 as valid input, where as my code will discard the remainder of the line, and wait for the user to enter another line.


Since you are using the code multiple places, putting it into a method is prudent. Here is one using a DoublePredicate functional interface in order to validate the input according to the caller's requirements:



double getDouble(Scanner input, String prompt, DoublePredicate validate) 
double value = 0.0;

for(;;)
System.out.print(prompt);
if (input.hasNextDouble())
value = input.nextDouble();
if (validate.test(value))
return value;

System.out.println("Input error. Try again.");
input.nextLine();




Which you could use with a lambda function like:



 double width = getDouble(input, "Enter width: ", x -> x > 0);





share|improve this answer









$endgroup$












    Your Answer





    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "196"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    PerfectContrast is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215452%2fvalidating-user-input%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    You are distinguishing between hasNextInt() and hasNextDouble() in the input stream, but treating them identically afterwards. hasNextDouble() will return true if the next token is an integer, because integers can be successfully parsed as a double too.



    So your loop could be simplified into:



    double width = 0.0;

    for(;;)
    System.out.print("Enter width: ");
    if (input.hasNextDouble())
    width = input.nextDouble();
    if (width > 0)
    break;

    System.out.println("Input error. Try again.");
    input.nextLine();



    A few notes:



    • The unnecessary validWidth variable has been removed. A break statement exits the infinite for(;;) loop, skipping over the "cleanup, try again" code.


    • .nextLine() is used to cleanup after invalid input. This is important, because if the user enters "one fish two fish red fish blue fish" instead of say -12, your current approach will print out "Input error. Try again" 8 times. Using .nextLine() discards everything up to and including the new line character. Which brings us to zero and negative numbers. If the user enters a valid integer/double, but not a positive one, your code didn't skip any tokens, where as my code (as mentioned above) will skip the remaining input up to and including the new line character. Assuming the next character was a new line (as in the user entered -12 and pressed the return key) the following .hasNextDouble() will skip over the new line (and any other blank space) looking for the next token, so the effect is approximately the same.


    • But my code performs differently if the user enters red 5. You original code will print "Invalid input. Try again.", and then immediately consume the 5 as valid input, where as my code will discard the remainder of the line, and wait for the user to enter another line.


    Since you are using the code multiple places, putting it into a method is prudent. Here is one using a DoublePredicate functional interface in order to validate the input according to the caller's requirements:



    double getDouble(Scanner input, String prompt, DoublePredicate validate) 
    double value = 0.0;

    for(;;)
    System.out.print(prompt);
    if (input.hasNextDouble())
    value = input.nextDouble();
    if (validate.test(value))
    return value;

    System.out.println("Input error. Try again.");
    input.nextLine();




    Which you could use with a lambda function like:



     double width = getDouble(input, "Enter width: ", x -> x > 0);





    share|improve this answer









    $endgroup$

















      3












      $begingroup$

      You are distinguishing between hasNextInt() and hasNextDouble() in the input stream, but treating them identically afterwards. hasNextDouble() will return true if the next token is an integer, because integers can be successfully parsed as a double too.



      So your loop could be simplified into:



      double width = 0.0;

      for(;;)
      System.out.print("Enter width: ");
      if (input.hasNextDouble())
      width = input.nextDouble();
      if (width > 0)
      break;

      System.out.println("Input error. Try again.");
      input.nextLine();



      A few notes:



      • The unnecessary validWidth variable has been removed. A break statement exits the infinite for(;;) loop, skipping over the "cleanup, try again" code.


      • .nextLine() is used to cleanup after invalid input. This is important, because if the user enters "one fish two fish red fish blue fish" instead of say -12, your current approach will print out "Input error. Try again" 8 times. Using .nextLine() discards everything up to and including the new line character. Which brings us to zero and negative numbers. If the user enters a valid integer/double, but not a positive one, your code didn't skip any tokens, where as my code (as mentioned above) will skip the remaining input up to and including the new line character. Assuming the next character was a new line (as in the user entered -12 and pressed the return key) the following .hasNextDouble() will skip over the new line (and any other blank space) looking for the next token, so the effect is approximately the same.


      • But my code performs differently if the user enters red 5. You original code will print "Invalid input. Try again.", and then immediately consume the 5 as valid input, where as my code will discard the remainder of the line, and wait for the user to enter another line.


      Since you are using the code multiple places, putting it into a method is prudent. Here is one using a DoublePredicate functional interface in order to validate the input according to the caller's requirements:



      double getDouble(Scanner input, String prompt, DoublePredicate validate) 
      double value = 0.0;

      for(;;)
      System.out.print(prompt);
      if (input.hasNextDouble())
      value = input.nextDouble();
      if (validate.test(value))
      return value;

      System.out.println("Input error. Try again.");
      input.nextLine();




      Which you could use with a lambda function like:



       double width = getDouble(input, "Enter width: ", x -> x > 0);





      share|improve this answer









      $endgroup$















        3












        3








        3





        $begingroup$

        You are distinguishing between hasNextInt() and hasNextDouble() in the input stream, but treating them identically afterwards. hasNextDouble() will return true if the next token is an integer, because integers can be successfully parsed as a double too.



        So your loop could be simplified into:



        double width = 0.0;

        for(;;)
        System.out.print("Enter width: ");
        if (input.hasNextDouble())
        width = input.nextDouble();
        if (width > 0)
        break;

        System.out.println("Input error. Try again.");
        input.nextLine();



        A few notes:



        • The unnecessary validWidth variable has been removed. A break statement exits the infinite for(;;) loop, skipping over the "cleanup, try again" code.


        • .nextLine() is used to cleanup after invalid input. This is important, because if the user enters "one fish two fish red fish blue fish" instead of say -12, your current approach will print out "Input error. Try again" 8 times. Using .nextLine() discards everything up to and including the new line character. Which brings us to zero and negative numbers. If the user enters a valid integer/double, but not a positive one, your code didn't skip any tokens, where as my code (as mentioned above) will skip the remaining input up to and including the new line character. Assuming the next character was a new line (as in the user entered -12 and pressed the return key) the following .hasNextDouble() will skip over the new line (and any other blank space) looking for the next token, so the effect is approximately the same.


        • But my code performs differently if the user enters red 5. You original code will print "Invalid input. Try again.", and then immediately consume the 5 as valid input, where as my code will discard the remainder of the line, and wait for the user to enter another line.


        Since you are using the code multiple places, putting it into a method is prudent. Here is one using a DoublePredicate functional interface in order to validate the input according to the caller's requirements:



        double getDouble(Scanner input, String prompt, DoublePredicate validate) 
        double value = 0.0;

        for(;;)
        System.out.print(prompt);
        if (input.hasNextDouble())
        value = input.nextDouble();
        if (validate.test(value))
        return value;

        System.out.println("Input error. Try again.");
        input.nextLine();




        Which you could use with a lambda function like:



         double width = getDouble(input, "Enter width: ", x -> x > 0);





        share|improve this answer









        $endgroup$



        You are distinguishing between hasNextInt() and hasNextDouble() in the input stream, but treating them identically afterwards. hasNextDouble() will return true if the next token is an integer, because integers can be successfully parsed as a double too.



        So your loop could be simplified into:



        double width = 0.0;

        for(;;)
        System.out.print("Enter width: ");
        if (input.hasNextDouble())
        width = input.nextDouble();
        if (width > 0)
        break;

        System.out.println("Input error. Try again.");
        input.nextLine();



        A few notes:



        • The unnecessary validWidth variable has been removed. A break statement exits the infinite for(;;) loop, skipping over the "cleanup, try again" code.


        • .nextLine() is used to cleanup after invalid input. This is important, because if the user enters "one fish two fish red fish blue fish" instead of say -12, your current approach will print out "Input error. Try again" 8 times. Using .nextLine() discards everything up to and including the new line character. Which brings us to zero and negative numbers. If the user enters a valid integer/double, but not a positive one, your code didn't skip any tokens, where as my code (as mentioned above) will skip the remaining input up to and including the new line character. Assuming the next character was a new line (as in the user entered -12 and pressed the return key) the following .hasNextDouble() will skip over the new line (and any other blank space) looking for the next token, so the effect is approximately the same.


        • But my code performs differently if the user enters red 5. You original code will print "Invalid input. Try again.", and then immediately consume the 5 as valid input, where as my code will discard the remainder of the line, and wait for the user to enter another line.


        Since you are using the code multiple places, putting it into a method is prudent. Here is one using a DoublePredicate functional interface in order to validate the input according to the caller's requirements:



        double getDouble(Scanner input, String prompt, DoublePredicate validate) 
        double value = 0.0;

        for(;;)
        System.out.print(prompt);
        if (input.hasNextDouble())
        value = input.nextDouble();
        if (validate.test(value))
        return value;

        System.out.println("Input error. Try again.");
        input.nextLine();




        Which you could use with a lambda function like:



         double width = getDouble(input, "Enter width: ", x -> x > 0);






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        AJNeufeldAJNeufeld

        6,1601520




        6,1601520




















            PerfectContrast is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            PerfectContrast is a new contributor. Be nice, and check out our Code of Conduct.












            PerfectContrast is a new contributor. Be nice, and check out our Code of Conduct.











            PerfectContrast is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Code Review Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215452%2fvalidating-user-input%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

            2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

            Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?