Just Code Challenge Week 6 Projects

Post your Projects in this conversation!

It’s the 6th week of the Just Code Challenge! This time Paul made an iOS app to distract you…or your kids.

Read more about it: https://blog.xojo.com/2018/07/27/justcode-challenge-week-6-bubble-popper/
Download the project source or check it out on GitLab .

Please share your projects for week 6 of the Just Code challenge in this thread. Download other projects and discuss! Paul will be back Monday to answer any questions!

Well I finally managed to find some time, not enough time, but still…

The UI still needs work and the charts are not up to much, but it is a start.

The Github link is here.

This week I made a “helper” for people who do magic square numerology based on Julian Moore’s book, “Speed-Learning Numerology.” While the app itself is very niche, I used a bunch of control sets and a timer to sequentially fill the controls with a user-supplied number. (It’s just eye-candy – filling the controls all at once worked fine, but it’s a better user-experience I think when they’re spaced out.)

You can watch a short video that shows the app here:
https://youtu.be/fwxJ4ktWqmA

And you can download the project here:
http://jayjennings.com/justcode/LoShuNumerology.zip

Fireworks
This is simple example of a fireworks animation programmed in Xojo.
The inspiration for this project came from this JavaScript tutorial on Youtube:
https://www.youtube.com/watch?v=CKeyIbT3vXI

Download source

[quote]Christian’s Fireworks
[/quote]

I hope you don’t mind. But a static image is just not enough.

This week, I propose a utility to launch applications with keyboard shortcuts (Ctrl + Alt + F1 to F15). It stays in the traybar and waits for orders. It can easily be configured (trick: click = about / double click = configure). You can also launch the same application several times, with a delay of 1 second between two launches.

This application uses only ‘Keyboard.AsyncKeyDown’, including for Alt and Control (because of a bug in Xojo). However, key codes are not identical to those referenced in MSDN. So, I can not guarantee that the application will work with a keyboard other than French. Feel free to make some tests and to report me any problem.

Source and win32 exe are here:
https://www.ascinfo.fr/fichiers/justcodechallenge2018/KeyLaunch.zip

My post for this week is a simple mp3 audio player (desktop) using the standard Sound class of Xojo. Since this is the first time I’m using this class I learned that it’s good for playing some sound in an app, but as the basis for a real audio player at least the current play-position is missing. I’m thinking of replacing Sound by an external library like BASS, maybe with my next week app. The list on the bottom shows some ID3 tags of the mp3 files using taglib external library, both for OSX and Windows.

Hints: use dag&drop to add files/songs to the list, use Backspace/Delete keys to remove songs from the list, you have to start each song by clicking the Play button, there is no automatic play-next-song feature.

Download the project here.

I made a simple RSS Viewer to learn about XML. Enter your RSS URL and it populates a listbox with titles and descriptions. Click on a row and it opens the linked page. All in all took me less than two hours, most of which was sorting out Unicode and XML.

I also created a short method to replace Unicode with the proper characters to use in this app.

GitHub

For those interested with replacing Unicode with their referenced characters:

Public Function ReplaceUnicodeCharacters(Content as String) as String While Content.InStr( "&#" ) > 0 Dim start As Integer = Content.InStr( "&#" ) Dim stop As Integer = Content.InStr( start, ";" ) Dim rlen As Integer = stop - start + 1 Dim ulen As Integer = stop - start - 2 Dim rep As String = Content.Mid( start, rlen ) Dim ucode As String = Content.Mid( start + 2, ulen ) Content = Content.ReplaceAll( rep, Text.FromUnicodeCodepoint( ucode.Val ) ) Wend Return Content End Function

In my real job, I do a fair bit of microprocessor work, mostly with PIC processors. Microchip Inc’s free MPLAB-X development IDE is very good, but if you need to run a simulation over and over again with different inputs, it gets cumbersome. So, I’ve developed a XOJO project with a set of methods that emulate the instruction set of the PIC “midrange” processor line. These methods have the same names as the corresponding PIC instruction mnemonics, and so the calling syntax is identical in all but a few minor cases. As a result, I can write PIC assembly language code in XOJO and run it in XOJO. Plus, I can add some outer XOJO looping code to call the emulated PIC code over and over with varying input parameter values to give it a thorough test.

This has been a big help in debugging some complex code. The example that I’ve submitted this week, uses emulated PIC assembly language to perform rectangular to polar conversion using Volder’s CORDIC algorithm. To see what the assembly language code looks like, look at the method Rect2Polar in the project file. For the internals of an emulated instruction, have a look at method “addwf” (add register without carry) as an example. Also refer to app.RevisionNotes in the project file for more info.

Project file is here:
PICsim Project

We needed in this week in my company a program that checks us over 100 folders if files were stored there. Normally the first consideration would have been to use PowerShell. But since Code Challenge is, of course I programmed it with Xojo. The program is for the command line and I call it FolderChecker. In the INI file you can enter the folders to be checked, with reg_folderPath = and then the path. In addition, you can specify an email address and the SMTP server, then a report will also be sent by mail. We start the program with the task schedule every few hours and then receive a report by mail with the folders to be checked. A small tool, but very helpful for us.

Command Line Tool Download for Windows