Jump to content

drjdpowell

Members
  • Posts

    1,970
  • Joined

  • Last visited

  • Days Won

    172

Posts posted by drjdpowell

  1. I think this is a Windows touch-screen behaviour, due to Windows using press-and-hold to give a right click.  Windows waits for the release before sending "mouse down" so it can decide to make it a right click or not.  It's annoying but I have not found a way around this.

  2. A non-JSON option you could try is:

    CREATE TABLE TestData (
      Channel,
      Time, 
      Data,  -- individual reading at Time for Channel
      PRIMARY KEY (Channel,Time)
      ) WITHOUT ROWID

    This is every reading sorted by a Primary Key that is Channel+Time.  This makes looking up a specific channel in a specific Time Range fast.  

    BTW, you don't need to make an index on a Primary Key; there is already an implicit index . 

    You would select using something like:

    SELECT (Time/60)*60, Avg(Data) FROM TestData
       WHERE Channel=? 
       AND TIME BETWEEN ? AND 1717606846
       GROUP BY Time/60
    • Thanks 1
  3. 15 hours ago, Scatterplot said:

    Is there any reason to NOT want this behavior, by the way? 

    Not necessarily, but it is trickier than it looks because of those "multipoint paths" that unflatten does not support.  A path like $.a.[new,old].b[4].c.d, for example.  If all paths were straightforward like $.a.b.c.d then it would be easy.

    Although I use JSON for configuration, I'm not using it in the same way you are doing, so it hasn't motivated me to solve this issue. Sorry.

  4. 15 hours ago, Francois Aujard said:

    I have loops that start but how to transfer the data without going through global variables or FGV.... 

    Quite a lot of good architectures are based on using messages between semi-independent modules, with the modules being based on a standardized template.  There are a few such "frameworks" publicly available via vipm.io that you could look at.  Mine is "Messenger Library", which has some instructional videos.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.