Search found 6 matches

by Topilno
Thu Feb 14, 2019 6:33 pm
Forum: Coding Questions
Topic: Interfacing with mongodb
Replies: 5
Views: 2267

Re: Interfacing with mongodb

You could consider accessing through an ODBC driver.

https://www.mongodb.com/blog/post/odbc- ... telligence
by Topilno
Tue Dec 08, 2015 12:20 am
Forum: Feature Requests and Wishlists
Topic: Select text / get selection for StringGadget/EditorGadget
Replies: 19
Views: 13564

Re: Select text / get selection for StringGadget/EditorGadge

paulr wrote:This thread is a wish list, this feature doesn't exist yet. We can only hope it will one day!

In the meantime, Shardik's link above is helpful.
Thank you very much. Googled the code, and it looked so real i didn't realize it was from a wishlist.
by Topilno
Mon Dec 07, 2015 11:49 pm
Forum: Feature Requests and Wishlists
Topic: Select text / get selection for StringGadget/EditorGadget
Replies: 19
Views: 13564

Re: Select text / get selection for StringGadget/EditorGadge


Set and get the selection for both, StringGadget and EditorGadget on all platforms.
GetGadgetAttribute(#Gadget,#PB_Editor_SelectionStart)
GetGadgetAttribute(#Gadget,#PB_Editor_SelectionEnd)
GetGadgetAttribute(#Gadget,#PB_Editor_SelectedText)

SetGadgetAttribute(#Gadget,#PB_Editor_SelectionStart ...
by Topilno
Thu Sep 25, 2008 1:00 pm
Forum: Coding Questions
Topic: Chess Moves in a byte
Replies: 55
Views: 15287

Helle wrote:216 moves:
White: Kf1, Qa3, Qb6, Qc4, Qd2, Qd7, Qe5, Qf3, Qg6, Qh4, Ra8, Rh8, Bb1, Bg1, Nc1, Nd1
Black: Ka1, Pa2, Pb2
White on move.

Gruss
Helle

P.S.: In many books are published 218 moves, but my program say also 216.
You both are right.
by Topilno
Wed Sep 24, 2008 9:45 pm
Forum: Coding Questions
Topic: Chess Moves in a byte
Replies: 55
Views: 15287


To clarify and restate what you said, you wouldn't store the move information, you would store an index into the possible moves for a position.

For any board position there are at most 216 possible moves. It will never be above 256 and so it would fit easily in a byte. This would be carried out ...
by Topilno
Mon Sep 22, 2008 8:52 pm
Forum: Coding Questions
Topic: Chess Moves in a byte
Replies: 55
Views: 15287

You theoretically could actually encode every single possible move into 8 bits. I'm pretty sure anyway. Though you may have a hard time if you encode moves that a pawn can make if it gets turned into a queen. You'd probably run over 0-255 limit in that case.

Example:

Pawn 1: Move 1 forward, Move ...