Skip to content

Instantly share code, notes, and snippets.

@valekask
valekask / test-gpt.md
Last active January 4, 2023 10:46
Asked ChatGPT to refactor code, because SonarQube's code scanner warnings that function returns true value twice

ME: I have the following typescript code and I need to refactor it to not returns true value twice:

validate(network: TimeseriesNetwork): boolean {
    this.axisSpacingValidated = true;
    this.axisLengthValidated = true;
    if (!this.axisSpacing && !this.axisLength) {
        return true;
    }
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Package Control",
"Pretty JSON",
"Sync Settings",
@valekask
valekask / index.html
Created April 17, 2018 14:48 — forked from chriswhong/index.html
D3 Sankey Link with Variable Width
<!DOCTYPE html>
<meta charset="utf-8">
<title>Variable Width Sankey Link</title>
<style>
path {
fill: steelblue;
}
</style>
@valekask
valekask / Maven_Phases__Commands.txt
Created February 27, 2018 08:34 — forked from P7h/Maven_Phases__Commands.txt
Maven Important commands and Lifecycle phases.
Lifecycle Phase Description
validate Validates whether project is correct and all necessary information is available to complete the build process.
initialize Initializes build state, for example set properties
generate-sources Generate any source code to be included in compilation phase.
process-sources Process the source code, for example, filter any value.
generate-resources Generate resources to be included in the package.
process-resources Copy and process the resources into the destination directory, ready for packaging phase.
compile Compile the source code of the project.
process-classes Post-process the generated files from compilation, for example to do bytecode enhancement/optimization on Java classes.
generate-test-sources Generate any test source code to be included in compilation phase.