none
Get All Small Basic Forum Threads List RRS feed

  • General discussion

  • Currently small basic forum has over 4000 threads. When you search some word , many threads are shown . 20 titles are shown in a page. You must click "Next" until the title you want is shown.  

    1)This program lists  all thread titles in the  small basic forum up to Listbox. It takes about 5 minutes to get all the threads.  List is saved in the file.

    2)You can list the thread containing the search word from the list.

    3)If you click  any thread in the list,   its content is shown using IE(Edge etc).

         WPF111-1     (need Litdev extension)

     Use freely.

      Program updated  WPF111-1 
    Thursday, April 28, 2016 12:52 PM
    Answerer

All replies

  • Very nice. Brilliantly done.  :-)
    Thursday, April 28, 2016 4:24 PM
    Answerer
  • Nice one +1 - Useful.
    Thursday, April 28, 2016 5:40 PM
    Moderator
  • Thank you
    Thursday, April 28, 2016 11:50 PM
    Answerer
  • Thank you.

    Litdev ,  I found some problem.  

    LDlistbox can use SBarray but not LDarray. 

    SBarray doesn't have save command ( of course). LDarray has LDarray.save(very useful) command. this use LDarray. (not SBarray)

     

    So, Please add  like  LDarray.FromSBarray command  and  LDlistbox can use LDarray type array.

     

    Thursday, April 28, 2016 11:58 PM
    Answerer
  • Nice tool!  Thank you for sharing this, NaochanON.

    Nonki Takahashi

    Friday, April 29, 2016 10:35 AM
    Moderator
  • @NaochanON,

    You can save an SB array directly to a file with File.WriteContents.

    SBArray, LDList and LDArray do not all have obvious conversions.

    For example LDArray is 1D only, all indices must be contiguous integer values up to a maximum set when the LDArray is created.  So only SBArrays that exactly meet this could be converted. 

    LDList has no index values at all, or at least they may change internally when new elements are added or removed so conversion from SBArray to SBList would loose indices and subsequent conversion back to SBArray would be different from the original SBArray.

    So far I have tried not to add conversions where it is not clear what could be happening.

    Also many methods that use arrays as input I have generally only accepted SBArrays because they are the most general and most commonly used.

    I recognise the issue and have thought about it some before.

    I will think about it again and see what may be possible to do without introducing too much potential confusion.

    Friday, April 29, 2016 12:09 PM
    Moderator
  • Beta version uploaded where LDControls.AddListBox and LDControls.ListBoxContent can accept LDList and LDArray data.

    The listbox indices are the array indices even if some are blank "" - could be confusing if you have blank values in LDArray.  For LDList they are justthe currentt internal LDList order - so also may confuse in some circumstances.

    Still thinking about the conversions.

    My simple test program:

    data[1] = "A"
    data[2] = "B"
    lb = LDControls.AddListBox(data,200,200)
    
    Program.Delay(1000)
    
    data[1] = "C"
    data[2] = "D"
    LDControls.ListBoxContent(lb,data)
    
    Program.Delay(1000)
    
    arr = LDArray.Create(10)
    LDArray.SetValue(arr,1,"E")
    LDArray.SetValue(arr,2,"F")
    lb = LDControls.AddListBox(arr,200,200)
    
    Program.Delay(1000)
    
    LDArray.SetValue(arr,1,"G")
    LDArray.SetValue(arr,2,"H")
    LDControls.ListBoxContent(lb,arr)
    
    Program.Delay(1000)
    
    LDList.Add("list","I")
    LDList.Add("list","J")
    lb = LDControls.AddListBox("list",200,200)
    
    Program.Delay(1000)
    
    LDList.Clear("list")
    LDList.Add("list","K")
    LDList.Add("list","L")
    LDControls.ListBoxContent(lb,"list")
    I hope this helps!

    Friday, April 29, 2016 6:45 PM
    Moderator
  • CreateFromIndices and CreateFromValues methods added to LDList and LDArray in new beta upload.
    Saturday, April 30, 2016 8:11 AM
    Moderator
  • NaochanON,

    Nice program. I felt a need to see if the topics in the list are old or new, so I added a Sub to read the creationdate from the forum and added a [yymmdd] just after the name. If the topic is less than a day old, the date of today is used even if it is posted yesterday.
    In addition to the two subroutines below there are four changes to your program. These are given in the listing.

    You can also search for a given date.

    '      changes needed in WPF111
    '' add in Sub each_thread  just before the definition of  stp4=
    creaDate()    '  added WhTurner =======================================
    
    '' change in the same Sub    500 to 600 in the line:
        nameRD=  Text.GetSubText(RD,NameStP,600)    '================== 500 > 600
    
    '' in the same Sub change the line after NN=NN+1 to
    List[NN]=_name+" ["+creDat+"] , "+_title        'WhT  added  [creDat]
    
    '' add the following line as the last line in the Sub  GUI
    creaInit()    ' use today for topics less then 24 hours old,  added WhTurner
    
    ' add the following two Subs:
    Sub creaDate  '  reads creationdate of topic
      crePt= Text.GetIndexOf(nameRD,"timeago")
      _TIME=text.GetSubTextToEnd(nameRD,crePt)    
      crePt= Text.GetIndexOf(_TIME,",")
      If crePt>0 then   'date
        _TIME= Text.GetSubText(_TIME,crePt+3,20)
        creMo=Text.GetIndexOf("Xanebarprayunulugepctovec",Text.GetSubText(_TIME,1,2))*50
        crePt= Text.GetIndexOf(_TIME,",")
        creDy=Text.GetSubText(_TIME,crePt-2,2)   
        creYr=Text.GetSubText(_TIME,crePt+2,4)*10000
        creDat=creYr+creMo+creDy
        creDat=Text.GetSubTextToEnd(creDat,3)
      Else  ' hours ago
        creDat=curDate
      EndIf
    EndSub
    Sub creaInit   ' make string for today
      curDate=Clock.Year*10000
      curDate=Text.GetSubTextToEnd(curDate+100*clock.Month+Clock.Day,3)
    EndSub


    Jan [ WhTurner ] The Netherlands


    • Edited by WhTurner33Editor Saturday, April 30, 2016 4:50 PM added search remark
    Saturday, April 30, 2016 4:48 PM
    Answerer
  • when put in db interesting results come out:

    list of most active users and its threads...


    • Edited by Tryhest Sunday, May 1, 2016 3:55 AM
    Sunday, May 1, 2016 3:19 AM
  • Gorgeous utilities !! thanks

    work fine in my computer, took 4 minutes to retrieve (GET) all , and sort by date published.

    Sunday, May 1, 2016 3:55 PM
    Answerer
  • Litdev thank you your effort.  (Sorry reply is so late.  I was in vacation. Now i'm back.)

    I'll try above.   thank you again.

    Wednesday, May 4, 2016 8:04 AM
    Answerer
  • WhTurner33

    Thank you . Created date is useful to sort .  Please up your added code as WPF111-0.

        
    Wednesday, May 4, 2016 8:18 AM
    Answerer
  • Tryhest

    Nice work. I haven't ever tried LDdatabase method.

    Could you up the program?

    Wednesday, May 4, 2016 8:21 AM
    Answerer

  • Thank you . Created date is useful to sort .  Please up your added code as WPF111-0.

        
         Done.

    Jan [ WhTurner ] The Netherlands

    Wednesday, May 4, 2016 9:17 AM
    Answerer
  • WhTurner33   thank you.

    creMo=Text.GetIndexOf("Xanebarprayunulugepctovec",Text.GetSubText(_TIME,1,2))*50   is a nice idea!!

    Thursday, May 5, 2016 12:00 AM
    Answerer
  • CreateFromIndices and CreateFromValues methods added to LDList and LDArray in new beta upload.

    I tried.   This style works well.

    arr="1=A;2=BCD;3=efgh"
    arr[4]="ijk"
    larr= LDArray.CreateFromValues(arr)
    lb = LDControls.AddListBox(larr,200,200)
    TextWindow.WriteLine(arr)   '  <-- this shows    1=A;2=BCD;3=efgh;4=ijk;         ";" is added

    but this style doesn't work.

    arr="1=A;2=BCD;3=efgh;4=ijk"
    larr= LDArray.CreateFromValues(arr)     <---  error occurs
    lb = LDControls.AddListBox(larr,200,200)
    TextWindow.WriteLine(arr) '  <-- this shows    1=A;2=BCD;3=efgh;4=ijk     without ";"

    this style also doesn't work 

    arr="1=A;2=BCD;3=efgh;4=ijk;" <--  add ";"
    larr= LDArray.CreateFromValues(arr)   <---  error occurs
    lb = LDControls.AddListBox(larr,200,200)
    TextWindow.WriteLine(arr) '  <-- this shows    1=A;2=BCD;3=efgh;4=ijk;    

    Thursday, May 5, 2016 12:22 PM
    Answerer
  • Yes this doesn't surprise me - the SB arrays created with "1=x;" etc are not converted to internal array maps until they are accessed at least once in [] notation or have other array operations on them.  It is the array maps I use to do the conversion fast to LDArray and LDList.

    So I will mod to fix, but in the meantime, any [] operation after the array is created with string format will work, even arr[0]=arr[0]; where index 0 doesn't exist.

    There are also subtle cases I have seen in un-extensioned SB that see this effect.

    EDIT

    Uploaded a beta version with a fix for this and a couple otherplaces where this could occur.
    Thursday, May 5, 2016 12:46 PM
    Moderator