none
Your Program Database

    General discussion

  • I suggested to create your program database in Challenge of the Month - June 2014.

    In this thread, I'd like to introduce about making of my sample code for this challenge.

    General Planning

    I'm going to make following three programs for this challenge.

    1. Program Scanner - scans disk to collect information about your programs
    2. Program Database - has UI to update the database
    3. Program Folder Manager - saves folder names to be scanned into setting file

    Design for Data

    I'd like to create CSV (comma separated value) file for the database.  Because CSV format can be read from many kind of software such as Excel (spreadsheet).  And each record will have following items.

    • Program ID
    • Source Filename
    • Screen Shot (Filename)
    • Description
    • Last Update
    • Version
    • Author
    • (Number of ) Lines
    • Subroutines
    • Challenge

    Last item Challenge will include the year and the month if the program is introduced in Challenge of the Month.

    Latest Versions

    1. Program Scanner 0.3b - PMG585-1
    2. Program Database 0.5b - HMK932-1
    3. Program Folder Manager 0.41 - CRK000-2


    Nonki Takahashi





    Thursday, June 05, 2014 7:20 AM
    Moderator

All replies

  • This is the first try.  I created very simple version of Program Folder Manager: CRK000.  Before running this program, please remove comments automatically added.

    This program may be a good sample to understand setting file in Small Basic.


    Nonki Takahashi


    Thursday, June 05, 2014 7:39 AM
    Moderator
  • The next try is a beta version of Program Scanner: PMG585.  Please remove automated comments before running this program.  This program creates a file named ProgramDB.csv .

    Program Scanner 0.1b
    ' Abacus 0.61
    ' Copyright (c) 2012-2014 Nonki Takahashi.
    '
    ' Lisence:
    '  The MIT Lisence (MIT)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\Abacus06.smallbasic;4=Abacus;6=0.61;7=No
    nki;1=MNV389;9=CreateBead CreateBeam CreateRod DrawFrame MoveBeads OnMouseMove O
    nMouseDown OnMouseUp SB_Workaround;8=197;
    ' DONKEY KONG in the Small Basic World 0.91
    ' Small Basic version written by Nonki Takahashi.
    '
    ' History:
    '  0.91 2014-05-18 Added workaround for Silverlight. (FGM769-8)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\Donkey09.smallbasic;4=DONKEY KONG in the
     Small Basic World;6=0.91;7=Nonki;1=FGM769;9=Ending Closing Init OnKeyDown OnTic
    k Opening Barrel_Add Barrel_FindUsed Barrel_Motion Ladder_Add Mario_Add Mario_Mo
    tion Math_CartesianToPolar SB_RotateWorkaround SB_Workaround Shapes_Add Shapes_C
    alcRotatePos Shapes_CalcWidthAndHeight Shapes_Init Shapes_Move Shapes_Remove Sha
    pes_Rotate Slope_Add;8=800;
    ' Random 8-picture 55-card set (Dobble / Spot it!)
    ' Copyright (c) 2014 Nonki Takahashi
    '
    ' Lisence:
    '  The MIT Lisence (MIT)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\Double55.smallbasic;4=Random 8-picture 5
    5-card set (Dobble / Spot it!);7=Nonki;9=Append AreDup FindCard OnTick Print;8=1
    22;
    ' Every pair has only one same picture 8-picture 55-card set
    ' Copyright (c) 2014 Nonki Takahashi.
    '
    ' Lisence:
    '  The MIT Lisence (MIT)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\Double55E.smallbasic;4=Every pair has on
    ly one same picture 8-picture 55-card set;7=Nonki;9=Append BacktrackAppend Compl
    eteCard Remove AreDup Print;8=112;
    ' Program Folder Manager 0.1
    ' Copyright (c) 2014 Nonki Takahashi.
    '
    ' History:
    '  0.1 2014-06-04 Created. (CRK000)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\FolderManager01.smallbasic;4=Program Fol
    der Manager;6=0.1;7=Nonki;1=CRK000;9=Settings_GetFolder Settings_GetName Setting
    s_Read Settings_Write;8=39;
    ' Metronome for Sound.PlayMusic() - VPW885
    ' Copyright (c) 2014 Nonki Takahashi.  All rights reserved.
    '
    GraphicsWindow.Title = "Metronome for Sound.PlayMusic()"
    GraphicsWindow.BackgroundColor = "LightGray"
    2=C:\\Users\\Nonki\\Documents\\SB temp\\Metronome01.smallbasic;4=Metronome for S
    ound.PlayMusic() -;1=VPW885;7=Nonki;9=OnTextTyped OnTick Controls_AddLamp Contro
    ls_LampOn Controls_LampOff Controls_LampToggle;8=84;
    ' Program Database 0.1
    ' Copyright (c) 2014 Nonki Takahashi.
    '
    ' History:
    '  0.1 2014-06-04 Created. ()
    2=C:\\Users\\Nonki\\Documents\\SB temp\\ProgramDB01.smallbasic;4=Program Databas
    e;6=0.1;7=Nonki;9=CSV_GetName CSV_Read CSV_Write Settings_GetName Settings_Read
    Settings_Write;8=79;
    ' Program Scanner 0.1b
    ' Copyright (c) 2014 Nonki Takahashi.
    '
    ' History:
    '  0.1b 2014-06-05 Created. (PMG585)
    2=C:\\Users\\Nonki\\Documents\\SB temp\\ProgramScanner.smallbasic;4=Program Scan
    ner;6=0.1b;7=Nonki;1=PMG585;9=GetAuthor GetID GetInfoFromSBSourceFile GetName Ge
    tSub GetVersion RemoveTrailingSpace ScanFile SkipCopyright SkipSpace SkipYears F
    ile_Open File_ReadLine Settings_GetName Settings_Read Settings_Write;8=288;
    Press any key to continue...
    

    Nonki Takahashi



    Thursday, June 05, 2014 8:34 AM
    Moderator
  • By the way, these programs may be fake ones of database.  About real database, please read following blog article.

    Small Basic - Database Extension

    Thank you litdev for writing this great article.


    Nonki Takahashi

    Thursday, June 05, 2014 8:57 AM
    Moderator
  • Today I published the third program Program Database 0.1a as it's program ID HMK932.

    Screen shot of a program Program Database 0.1a

    This version is just alpha version and can show only UI image.  My intentions are:

    • Search condition can be input in textboxes above.
    • Search result will be appeared in bottom multi-line textbox as CSV format.

    Nonki Takahashi

    Monday, June 09, 2014 4:11 AM
    Moderator
  • Today I uploaded Program Folder Manager 0.3 as CRK000-1.  I added a routine to find sub folders to this tool. 

    And I gathered information with Program Scanner 0.2b about my 747 programs in my OneDrive.  Output of the scanner is a CSV file.  Then I made a Excel workbook from the CSV file.  I also upload the Excel workbook onto TechNet Gallery

    Screen shot of an Excel workbook ProgramDB.xlsx

    At this point, there are some known issues in Program Scanner 0.2b.

    • can get program id XXXnnn but not XXXnnn-n
    • can get only first name of author
    • CSV will break if comma is in a program title
    • assumes only CR+LF for new line in program source file (LF is bad case)
    • screen shot filename is not available yet

    Nonki Takahashi

    Friday, June 13, 2014 5:49 PM
    Moderator
  • In ProgramDB.xlsx described above has some zeroes in Lines column.  These source files be couldn't opened because of OneDrive (SkyDrive) error.

    OneDrive files accessed by Small Basic programs should be Available offline.  You can change the Availability of OneDrive files with File Explorer.


    Nonki Takahashi


    Friday, June 13, 2014 6:08 PM
    Moderator
  • I updated Program Database as 0.2a: HMK932-0.

    Screen shot of a program Program Database 0.2a

    This is still alpha version, so doesn't work.  But I changed UI (user interface) for this program.  Operators below became available that are used in WHERE clause in SQL (Structured Query Language).

    • =
    • >
    • <
    • >=
    • <=
    • <>
    • AND
    • OR
    • LIKE

    Nonki Takahashi

    Tuesday, June 24, 2014 2:07 AM
    Moderator
  • I uploaded some new versions of programs for this project into CodePlex.

    Please visit Program DB in Small Basic.  Thanks.


    Nonki Takahashi

    Monday, December 07, 2015 12:46 PM
    Moderator
  • Nonki,

    Your database samples would make a great blog topic (with update about CodePlex and anything else new).

    Would you like to blog about it, or should I?

    Thanks!


    Ed Price, Azure & Power BI Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Thursday, December 10, 2015 9:08 PM
    Owner
  • Let's sticky this for a week or so. This is amazing!

    Ed Price, Azure & Power BI Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Thursday, December 10, 2015 9:08 PM
    Owner
  • Nonki,

    Your database samples would make a great blog topic (with update about CodePlex and anything else new).

    Would you like to blog about it, or should I?

    Thanks!


    Ed Price, Azure & Power BI Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!


    I will blog. But now I'm writing the next version of this program. So it will not be the next one. Thanks.


    Nonki Takahashi

    Friday, December 11, 2015 9:33 AM
    Moderator
  • I uploaded Program Database 0.4a to CodePlex.

    • You can use [Search] command.
    • Only the first condition is available.
    • Following operations are available in the first condition.
      =, <>, <, >, LIKE
    • < and > work only for numbers (not text).
    • LIKE is just treated as Text.IsSubText() operation.

    Screen shot of a program Program Database 0.4a


    Nonki Takahashi



    Saturday, December 12, 2015 1:26 PM
    Moderator
  • I published Program Database 0.5b as HMK932-1.
    And also uploaded it's source code to CodePlex

    Screen shot of a program Program Database 0.5b

    Known Issue

    • LIKE is just treated as Text.IsSubText() operation.

    Nonki Takahashi

    Monday, December 14, 2015 2:42 PM
    Moderator