{"id":337,"date":"2020-03-07T23:16:00","date_gmt":"2020-03-07T23:16:00","guid":{"rendered":"https:\/\/alterego.cc\/wp\/?p=337"},"modified":"2022-10-17T20:11:13","modified_gmt":"2022-10-17T20:11:13","slug":"string-permutations-sample-code","status":"publish","type":"post","link":"https:\/\/alterego.cc\/wp\/2020\/03\/07\/string-permutations-sample-code\/","title":{"rendered":"String permutations sample code"},"content":{"rendered":"\n<p>For some reasons had to test how GitHub works and upload an application there. I do like to code simple applications in&nbsp;<a href=\"https:\/\/www.xojo.com\/\" target=\"_blank\" rel=\"noreferrer noopener external\" data-wpel-link=\"external\">Xojo<\/a>&nbsp;when I need to fill the gap and cannot find the right tool for what I need to do<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"392\" src=\"https:\/\/alterego.cc\/wp\/wp-content\/uploads\/2022\/02\/permutations.png\" alt=\"\" class=\"wp-image-339\" srcset=\"https:\/\/alterego.cc\/wp\/wp-content\/uploads\/2022\/02\/permutations.png 613w, https:\/\/alterego.cc\/wp\/wp-content\/uploads\/2022\/02\/permutations-300x192.png 300w, https:\/\/alterego.cc\/wp\/wp-content\/uploads\/2022\/02\/permutations-520x333.png 520w, https:\/\/alterego.cc\/wp\/wp-content\/uploads\/2022\/02\/permutations-320x205.png 320w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/figure>\n<\/div>\n\n\n<p>In this case I needed a simple program to calculate all the possible permutations of a given string. There are many examples of this simple exercise on the Internet. I started by looking at&nbsp;<a href=\"https:\/\/www.geeksforgeeks.org\/write-a-c-program-to-print-all-permutations-of-a-given-string\/\" target=\"_blank\" rel=\"noreferrer noopener external\" data-wpel-link=\"external\">these<\/a><\/p>\n\n\n\n<center>\n\n\n\n\n\n<\/center>\n\n\n\n<p>The Java version looked like a good candidate for \u201ctranslation\u201d, so I took inspiration from it. The code is well commented (or at least this is what I think). Xojo is free to download and test, so the project can be opened and checked without having to pay for the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Integrated_development_environment\" target=\"_blank\" rel=\"noreferrer noopener external\" data-wpel-link=\"external\">IDE<\/a>. I provided a compiled version as well. The setup is quite big because I had to include some Microsoft Windows runtime libraries but those won\u2019t get installed at all if you already have them on your system. The compiled version can be downloaded from&nbsp;<a href=\"https:\/\/github.com\/fabiolichinchi\/permute\/releases\" target=\"_blank\" rel=\"noreferrer noopener external\" data-wpel-link=\"external\">here<\/a>&nbsp;and the source code from&nbsp;<a href=\"https:\/\/github.com\/fabiolichinchi\/permute\" target=\"_blank\" rel=\"noreferrer noopener external\" data-wpel-link=\"external\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A really simple project in Xojo, just for fun and because I noticed there were examples of string permutations code in so many languages but Xojo. I fixed that. You are welcome<\/p>\n","protected":false},"author":1,"featured_media":339,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[64,43,50,51,52],"class_list":["post-337","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-english","tag-github","tag-permutations","tag-string","tag-xojo"],"_links":{"self":[{"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/posts\/337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":0,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/posts\/337\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/media\/339"}],"wp:attachment":[{"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/media?parent=337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/categories?post=337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alterego.cc\/wp\/wp-json\/wp\/v2\/tags?post=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}