{"id":21018044,"url":"https://github.com/othreecodes/raggedarray","last_synced_at":"2025-10-25T12:07:56.225Z","repository":{"id":119854560,"uuid":"65421495","full_name":"othreecodes/RaggedArray","owner":"othreecodes","description":"A simple implementation of Ragged Arrays with Java","archived":false,"fork":false,"pushed_at":"2016-08-10T23:11:33.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T17:19:09.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/othreecodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-10T22:49:00.000Z","updated_at":"2017-11-10T07:15:17.000Z","dependencies_parsed_at":"2023-06-03T09:45:09.516Z","dependency_job_id":null,"html_url":"https://github.com/othreecodes/RaggedArray","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/othreecodes/RaggedArray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othreecodes%2FRaggedArray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othreecodes%2FRaggedArray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othreecodes%2FRaggedArray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othreecodes%2FRaggedArray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/othreecodes","download_url":"https://codeload.github.com/othreecodes/RaggedArray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othreecodes%2FRaggedArray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280951887,"owners_count":26419127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T10:23:17.881Z","updated_at":"2025-10-25T12:07:56.185Z","avatar_url":"https://github.com/othreecodes.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RaggedArray\nA simple implementation of Ragged Arrays with Java\nPerfect for any hackathon question about RaggedArrays\nsee RaggedArray.java\n\n##TODO\n* Add Mean And Standard Deviation\n* Print dimention of array\n\n## About\nThis Example contains snippets that will create a CLI RaggedArray of any 2D size \nand calculate \n* Average\n* Total number of elements\n\n\n## Making use of simple control statements to take in the input\n```java\nstatic void collectInputForRow() {\n        System.out.println(\"Enter row \" + (ROW_LENGHT + 1) + \" data:\\nor n for save and go to next row and q if done\");\n        while (end == false) {\n            String reply = input.next();\n            if (reply.equals(\"q\")) {\n                System.out.println(\"\");\n                printArray();\n                end = true;\n\n            } else if (reply.equals(\"n\")) {\n\n                ROW_LENGHT++;\n                System.out.println(\"row \" + ROW_LENGHT + \" = \" + Arrays.toString(row));\n                resizeArray(ROW_LENGHT, row);\n                COLUMN_LENGHT = 0;\n                row = new int[0];\n                collectInputForRow();\n\n            } else {\n                int number = Integer.parseInt(reply);\n                COLUMN_LENGHT++;\n                createRow(number, COLUMN_LENGHT);\n            }\n\n        }\n    }\n```\n\n##The array is then resized according to the input given\n\n```java\n\n static void resizeArray(int ROW_LENGHT, int[] newRow) {\n        int arraytemp[][] = raggedArray;\n        raggedArray = new int[ROW_LENGHT][];\n        System.arraycopy(arraytemp, 0, raggedArray, 0, arraytemp.length);\n        raggedArray[arraytemp.length] = newRow;\n\n    }\n\n    private static void createRow(int number, int collenght) {\n        int temprow[] = row;\n        row = new int[collenght];\n        for (int i = 0; i \u003c temprow.length; i++) {\n            row[i] = temprow[i];\n    \n        }\n        row[temprow.length] = number;\n\n    }\n\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fothreecodes%2Fraggedarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fothreecodes%2Fraggedarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fothreecodes%2Fraggedarray/lists"}