Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.advocacy > #390344 > unrolled thread

Every OffLine hour of the day, last 15 months.

Started byJeff-Relf.Me <@.>
First post2017-01-19 00:57 -0800
Last post2017-01-21 17:57 +0000
Articles 20 on this page of 40 — 8 participants

Back to article view | Back to comp.os.linux.advocacy


Contents

  Every OffLine hour of the day, last 15 months. Jeff-Relf.Me <@.> - 2017-01-19 00:57 -0800
    Re: Every OffLine hour of the day, last 15 months. DFS <nospam@dfs.com> - 2017-01-19 22:12 -0500
      Re: Every OffLine hour of the day, last 15 months. deplorable owl <owl@rooftop.invalid> - 2017-01-20 03:16 +0000
        When I'm likely to be asleep. Jeff-Relf.Me <@.> - 2017-01-19 20:33 -0800
          Re: When I'm likely to be asleep. DFS <nospam@dfs.com> - 2017-01-21 15:58 -0500
            On SleepPat.HTM's yAxis:  Two rows = one hour. Jeff-Relf.Me <@.> - 2017-01-21 19:30 -0800
              On SleepPat.HTM's yAxis:  Two rows = one hour. Jeff-Relf.Me <@.> - 2017-01-24 13:01 -0800
                Re: On SleepPat.HTM's yAxis:  Two rows = one hour. deplorable owl <owl@rooftop.invalid> - 2017-01-24 21:26 +0000
                  A lot of it is just being OffLine, not sleeping. Jeff-Relf.Me <@.> - 2017-01-24 14:12 -0800
                    Re: A lot of it is just being OffLine, not sleeping. deplorable owl <owl@rooftop.invalid> - 2017-01-24 23:36 +0000
                      "Auto Sleep" is disabled, it can't happen. Jeff-Relf.Me <@.> - 2017-01-24 16:26 -0800
                        Re: "Auto Sleep" is disabled, it can't happen. deplorable owl <owl@rooftop.invalid> - 2017-01-27 03:33 +0000
                          Re: "Auto Sleep" is disabled, it can't happen. Me Sham <osirus47@yahoo.com> - 2017-01-26 19:51 -0800
                          SleepLog.TXT _is a series of time stamps. Jeff-Relf.Me <@.> - 2017-01-26 22:39 -0800
                            Re: SleepLog.TXT _is a series of time stamps. deplorable owl <owl@rooftop.invalid> - 2017-01-27 21:15 +0000
                              What's right with US-ASCII and Base10 ?  not much. Jeff-Relf.Me <@.> - 2017-01-27 13:48 -0800
                                Re: What's right with US-ASCII and Base10 ?  not much. deplorable owl <owl@rooftop.invalid> - 2017-01-28 00:38 +0000
                                  None of it is for you, all of it is for me. Jeff-Relf.Me <@.> - 2017-01-27 22:52 -0800
                                    Re: None of it is for you, all of it is for me. Steve Carroll <fretwizzer@gmail.com> - 2017-01-28 08:25 -0800
                                      Re: If you don't like it, try FaceBook or Reddit. Steve Carroll <fretwizzer@gmail.com> - 2017-01-28 09:36 -0800
                                      Re: None of it is for you, all of it is for me. Tattoo Vampire <sitting@this.computer> - 2017-01-29 09:24 -0500
                                        Re: None of it is for you, all of it is for me. Steve Carroll <fretwizzer@gmail.com> - 2017-01-29 08:36 -0800
                                          Re: I knew _exactly what everyone's response would be, all of it. Steve Carroll <fretwizzer@gmail.com> - 2017-01-29 12:33 -0800
                                            Re: I'm answering your questions, not begging for your attention. Steve Carroll <fretwizzer@gmail.com> - 2017-01-29 14:12 -0800
                                    Re: None of it is for you, all of it is for me. deplorable owl <owl@rooftop.invalid> - 2017-01-28 20:13 +0000
                                      Re: None of it is for you, all of it is for me. Snit <usenet@gallopinginsanity.com> - 2017-01-28 13:22 -0700
                                      "SleepPat.HTM" is _much cleaner now. Jeff-Relf.Me <@.> - 2017-01-29 04:34 -0800
                                        Re: "SleepPat.HTM" is _much cleaner now. deplorable owl <owl@rooftop.invalid> - 2017-01-29 19:38 +0000
                                          Re: "SleepPat.HTM" is _much cleaner now. Snit <usenet@gallopinginsanity.com> - 2017-01-29 13:38 -0700
                                          When will I wake up, most likely ? Jeff-Relf.Me <@.> - 2017-01-29 12:44 -0800
                    Now the text version also shows the percent OffLine. Jeff-Relf.Me <@.> - 2017-01-24 16:09 -0800
                      Re: Now the text version also shows the percent OffLine. DFS <nospam@dfs.com> - 2017-01-24 20:57 -0500
                        "SleepPat.HTM" is dense, rich and complex, like my source code. Jeff-Relf.Me <@.> - 2017-01-25 00:44 -0800
                          Re: "SleepPat.HTM" is dense, rich and complex, like my source code. DFS <nospam@dfs.com> - 2017-01-25 09:40 -0500
                            Look at the yAxis, MrDFS.  Two Rows = 1 hour. Jeff-Relf.Me <@.> - 2017-01-25 07:01 -0800
                Re: On SleepPat.HTM's yAxis: Two rows = one hour. DFS <nospam@dfs.com> - 2017-01-24 19:12 -0500
                  Now the percent OffLine number follows the date. Jeff-Relf.Me <@.> - 2017-01-24 16:17 -0800
      You can use SQL, Excel or Visual Basic, if you'd rather. Jeff-Relf.Me <@.> - 2017-01-19 20:20 -0800
        People woke me up; so I slept 4 hours today, twice, for a total of 8. Jeff-Relf.Me <@.> - 2017-01-21 04:44 -0800
          Re: People woke me up; so I slept 4 hours today, twice, for a total of 8. Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2017-01-21 17:57 +0000

Page 1 of 2  [1] 2  Next page →


#390344 — Every OffLine hour of the day, last 15 months.

FromJeff-Relf.Me <@.>
Date2017-01-19 00:57 -0800
SubjectEvery OffLine hour of the day, last 15 months.
Message-ID<Jeff-Relf.Me@Jan.19--0.57A.Seattle.2017>
Here's a challenge for you ( Mr. DFS ).
Given this input ( when my monitor was off ):

    http://Jeff-Relf.Me/SleepLog.TXT

Produce this output:

  A table showing every HalfHour of the day OffLine, last 15 months:

    http://Jeff-Relf.Me/SleepPat.HTM
    http://Jeff-Relf.Me/SleepPat.PNG

Here's how _I did it:

void SleepPat() { LnP HardOut = 
  L"  My 118 by 235 block of text is omitted here, for room.  \n"
  L"  See 'HardOut' in X.CPP in 'http://Jeff-Relf.Me/X.ZIP'   \n";
  L"  Help/Settings: 'http://Jeff-Relf.Me/X.HTM'              \n";

  //  "TurnHr" is when the day begins, 3 am:

  const int  TurnHr = 3, DaySecs = 24*60*60, Rows = 48, 
    TopLns = 57, LnLen = 236, Cols = LnLen - 8, Hrs = 48 ;  

  int rv, _Row, Day, xAxisDrawn, Bot, Dur, DateLine,
    Col, StartngRow, H, M ;

  float  fDur ;  LnA  LL ;  LnP  P, Tok, Date, _Out ;
  i64 aDate, TopDate ;  tm DayRec = {}, aRec;  char  _Month[8];  
  wchar Hex, ReHex, Ch, Ch2, sDay[8];

  if ( Diff_Load = 1, !Load_File( LocDir, L"SleepLog.TXT" ) ) { 
    Sh( L"-- Couldn't READ \"%s\".", TheOpenFile );  return;  }

  DayRec.tm_isdst = -1, TopDate = xAxisDrawn = 0;

  //  "_B_Sh" is a OneMeg+ dynamic buffer I use, occationally.
   _Out = _B_Sh, strCpy( _Out, HardOut );

  //  "fpLines" is the dynamic array of lines, from "Load_File()", above.
  { LoopPP( Ln, fpLines ) { 

      if ( LL = PP + 3, LL >= EE || !Eq( B + 19, L"offline:" ) )
        //  Get ( the line after ) the "offline:" line.
        continue;

      //  Get the Month, Day, and Year OffLine info:
      B = *LL, Date = B += 12 - B[-1], _Str( _Month, "%.3S", Date );
      LoopJ(12) if ( *pInt( _Month ) == Mos[ J ] ) break ;

      //  _Only tm's Month, Day, and Year fields are set/used:
      DayRec.tm_mon = J, DayRec.tm_mday = AtoI( Date + 4 );
      DayRec.tm_year = AtoI( Date + 18 ) - 1900, aDate = mktime( &DayRec );

      if ( !xAxisDrawn ) { 
        //  "TopDate" ( i64 seconds since 1900 ) is the most recent date.
        xAxisDrawn = 1, aRec = DayRec, TopDate = mktime( &aRec );
        LoopBot(2) { LoopBacCol( Cols ) { 
          //  Set the xAxis DayOfTheMonth labels:
          mktime( &aRec ), Day = --aRec.tm_mday, Str( sDay, L"%d ", Day + 1 );
          wmemmove( &Out( Rows + 1 + ( Day <= 27 ? Day%4 : 4 + Day - 28 ), 
            Col + 1 ), sDay, 2 );

          if ( !Day )  //  Set the Month Year labels:
            P = &Out( Rows, ER( 0, Col - 3 ) ), 
            P += Str( P, L" %s %d", MonthNyms[ aRec.tm_mon ], aRec.tm_year + 1900 ),
            *P = 32 ;   } } }

      //  Get the Hours/Mintues OffLine info:
      Date += 4, P = Date += *Date == 32 ;  To32;  
      DateLen = P - Date, *P++ = 0, P++ ;  To!32;
      Tok = P ;  LoopP( Ch != ':' );  *P++ = 0;  
      H = AtoI( Tok );  To!32;  Tok = P ;  
      if ( isDigit( *Tok ) ) { To32;  *P++ = 0;  }  
      M = AtoI( Tok );  if ( *P == 'P' ) H += 12 ;

      //  "Cols" is the far right column, the most recent day.
      //  "Col" is "Cols - DaysAgo"; one column per day.
      //   
      //  Normally, Midnight signals a new day, a new Col.
      //  
      //  We correct for this by decrementing Col for 12am to 3am
      //  data, and Row is decremented 3 hours; i.e. cut 3 hours
      //  off the top of the table and paste it to the bottom,
      //  shifted a day left.

      Col = Cols - ( TopDate - aDate )/DaySecs - ( H < TurnHr ), 

      //  Bot is true when using the bottom table.

      Bot = Col <= 0, Col += Bot*Cols ;

      if ( Col <= 0 ) 
        //  Only two tables, !Bot and Bot; so we're done.
        break ;

      //  "H - 3", the hour of the day, is -3 to 20.
      //  "Hrs" is 48, 2*24, one Row for each HalfHour.

      StartngRow = Hrs + 2*( H - TurnHr ) + M/30, StartngRow %= Hrs;
      fDur = AtoF( LL[-1] ), Dur = Round( fDur ); 

      //  Convert "Dur" ( Hours OffLine ) to a Hex digit.

      Hex = NtoHex( Dur ), ReHex = 0 ;

      { LoopRow( Round( 2*fDur ) + 2 ) { _Row = StartngRow + Row ;

          //  The char at the Row, Col; Col increments on overflow.

          wchar &Ch = Out( _Row%Rows, Col + ( _Row >= Rows ) );

          if ( ( ReHex = isHex( Ch ) ) || Row >= eRow ) {

            //  "ReHex" joins adjacent runs, just for run.

            ReHex = !ReHex ? 0 : NtoHex( HexToN( Ch ) + Dur - ( Row < eRow ) );
            break;  }  

          //  Put the digit into the table.
          Ch = Hex ;  } }
      
      if ( _Row = StartngRow - 1, ReHex ) LOOP {

        //  Join adjacent runs, give them a higher digit.
        ++_Row >= Rows && ( _Row = 0, Col++ );
        wchar &Ch = Out( _Row, Col );  
        if ( !isHex( Ch ) ) break ;  Ch = ReHex ;  } } }

  StartReport, Sh( L"%s\n%s\n%s", RptHdr, L"'C' (Hex) means my monitor"
  L" was off for 12 hours, starting at the yAxis time, on the xAxis Date."
  L"  Days start at 3am.\n", _Out );  SaveShowReport( L"SleepPat.HTM" );  }

Globals:

  typedef __int64  i64 ;  typedef int  *pInt ;
  typedef wchar_t  wchar ;  typedef wchar  *LnP ;  typedef  LnP  *LnA ; 

  #define  Eq  !strCmp
  #define  strCpy  wcscpy

  #define  MkInt( M )  *pInt( #M ) 

  LnP MonthNyms[]= { L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", 
    L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" };

  const int Mos[]= { MkInt( Jan ), MkInt( Feb ), MkInt( Mar ), 
    MkInt( Apr ), MkInt( May ), MkInt( Jun ), MkInt( Jul ), 
    MkInt( Aug ), MkInt( Sep ), MkInt( Oct ), MkInt( Nov ), MkInt( Dec ) };

  //  Access " _Out ", a One Dimensional array,
  //  as if it were a couple of 2D tables, top and bottom.

  #define  Out( Row, Col )  _Out[ ( ( Row ) + Bot*TopLns )*LnLen + ( Col ) ]

  //  Special Named loops, for clarity:

  #define  LoopBot( N )     int  eBot = N, Bot = -1 ; eBot-- ; while ( ++Bot <= eBot )
  #define  LoopBacCol( N )  int  Col =  N ;                    while ( --Col >= 0 )

  //  "LoopP()" loops P through a null terminated line.
  //  When "Bool" allows, it loops up to, and including, the null,
  //  setting Ch0, Ch, and Ch2 ( for Bool ), as it goes.

  #define  LoopP( Bool )  Ch = 1, Ch2 = 0, P-- ;  \
     while( ( Ch0 = Ch ) && ( Ch = *++P, Ch2 = !Ch ? 0 : P[1], Bool ) )

  //  "LoopPP()" loops PP through a (dynamic) array of lines,
  //  setting B and P (pointers) as it goes.

  #define  LoopPP( Tt, Xx )  Tt##P P = 0, B = 0 ;  \
    Tt##A BB = (Xx).BB, EE = (Xx).PP + 1, PP = BB - 1 ;  \
    if ( BB ) while( ++PP < EE ? ( B = P = *PP, 1 ) : 0 )

  #define  LoopJ( N )    int    J = -1,   eJ = ( N ) - 1 ; while ( ++J   <= eJ   )
  #define  LoopRow( N )  int  Row = -1, eRow = ( N ) - 1 ; while ( ++Row <= eRow )

  //  Sh() is like printf(), but to my custom console/Shell.
  int Sh( LnP S, ... )

  //  Marks off console lines, and saves them to a file:
  StartReport
  SaveShowReport( LnP S );

  //  Return the bigER one.
  int ER( int X, int Y ) { return X > Y ? X : Y ;  } 

  #define  Raise_Ch  towupper

  inline int RaisC( LnP P ) { return  *P = Raise_Ch( *P );  }

  inline int HexToN( wchar C ) { if ( isDigit( C ) ) return C - '0' ;
     if ( RaisC( & C ) >= 'A' && C <= 'F' )  return 10 + C - 'A' ; return -1 ;  }

  inline wchar NtoHex( int N ) { return N > 9 ? 'A' + N - 10 : '0' + N ;  }

[toc] | [next] | [standalone]


#390534

FromDFS <nospam@dfs.com>
Date2017-01-19 22:12 -0500
Message-ID<o5rv5b$vf8$2@dont-email.me>
In reply to#390344
On 1/19/2017 3:57 AM, Jeff-Relf.Me wrote:
> Here's a challenge for you ( Mr. DFS ). Given this input ( when my
> monitor was off ):
>
> http://Jeff-Relf.Me/SleepLog.TXT
>
> Produce this output:

I might give it a shot, if you help me understand some things.



> A table showing every HalfHour of the day OffLine, last 15 months:
>
> http://Jeff-Relf.Me/SleepPat.HTM http://Jeff-Relf.Me/SleepPat.PNG
>
> Here's how _I did it:


The output is kind of interesting to look at, but I suggest you could
also put your sleep log entries in a database and much more easily draw
various plots and diagrams.  You could log the data in SQLite, and
probably plot it using R.


Questions:

Why do days begin at 3am?


The sleep log is inscrutable at first, but I see how most of it works.

======================================================
44.5 hour Day, 33% offline:

  8.5        Jan  9 {  9:49 A, 2017 }: 9       VаΓȻ
         .0  Jan  9 {  1:21 A, 2017 }: 9  157  VаɝΞ

   .2        Jan  9 {  1:18 A, 2017 }:32       VаɝW
        1.7  Jan  9 {  1: 7 A, 2017 }:27       Vаɛɗ

   .0        Jan  8 { 11:22 P, 2017 }:50    7  Vаȿа
        8.8  Jan  8 { 11:22 P, 2017 }:43       VаȿЩ
======================================================

44.5 hour day?

What kind of odd date format is:
Jan  9 {  9:49 A, 2017 }: 9

Is that 2017-01-09 09:49:09 ?  If so, why are you capturing seconds if
they're never used?

It looks like you're missing most but not all zeroes.  Intentional?

Why are the 2 columns at left staggered?

What do the 7 and 157 at right represent?

What's with the 4 characters at the end of each line?


To each his own, but it's like you go out of your way to make everything
different and weird.  To what end?

[toc] | [prev] | [next] | [standalone]


#390535

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-20 03:16 +0000
Message-ID<ahjbo03g08a.4@rooftop.invalid>
In reply to#390534
DFS <nospam@dfs.com> wrote:
> On 1/19/2017 3:57 AM, Jeff-Relf.Me wrote:
>> Here's a challenge for you ( Mr. DFS ). Given this input ( when my
>> monitor was off ):
>>
>> http://Jeff-Relf.Me/SleepLog.TXT
>>
>> Produce this output:
> 
> I might give it a shot, if you help me understand some things.
> 
> 
> 
>> A table showing every HalfHour of the day OffLine, last 15 months:
>>
>> http://Jeff-Relf.Me/SleepPat.HTM http://Jeff-Relf.Me/SleepPat.PNG
>>
>> Here's how _I did it:
> 
> 
> The output is kind of interesting to look at, but I suggest you could
> also put your sleep log entries in a database and much more easily draw
> various plots and diagrams.  You could log the data in SQLite, and
> probably plot it using R.
> 
> 
> Questions:
> 
> Why do days begin at 3am?
> 
> 
> The sleep log is inscrutable at first, but I see how most of it works.
> 
> ======================================================
> 44.5 hour Day, 33% offline:
> 
>  8.5        Jan  9 {  9:49 A, 2017 }: 9       VаΓȻ
>         .0  Jan  9 {  1:21 A, 2017 }: 9  157  VаɝΞ
> 
>   .2        Jan  9 {  1:18 A, 2017 }:32       VаɝW
>        1.7  Jan  9 {  1: 7 A, 2017 }:27       Vаɛɗ
> 
>   .0        Jan  8 { 11:22 P, 2017 }:50    7  Vаȿа
>        8.8  Jan  8 { 11:22 P, 2017 }:43       VаȿЩ
> ======================================================
> 
> 44.5 hour day?
> 
> What kind of odd date format is:
> Jan  9 {  9:49 A, 2017 }: 9
> 
> Is that 2017-01-09 09:49:09 ?  If so, why are you capturing seconds if
> they're never used?
> 
> It looks like you're missing most but not all zeroes.  Intentional?
> 
> Why are the 2 columns at left staggered?
> 
> What do the 7 and 157 at right represent?
> 
> What's with the 4 characters at the end of each line?
> 
> 
> To each his own, but it's like you go out of your way to make everything
> different and weird.  To what end?
> 

GIGO.

[toc] | [prev] | [next] | [standalone]


#390547 — When I'm likely to be asleep.

FromJeff-Relf.Me <@.>
Date2017-01-19 20:33 -0800
SubjectWhen I'm likely to be asleep.
Message-ID<Jeff-Relf.Me@Jan.19--8.33P.Seattle.2017>
In reply to#390535
Speaking of "http://Jeff-Relf.Me/SleepLog.TXT", someone wrote:
> GIGO.

Without this data, I wouldn't know when I'm likely to be asleep.

I don't use alarm clocks, so it varies _a_lot;
at best, there's a trend I can follow; hence:

  http://Jeff-Relf.Me/SleepPat.HTM
  http://Jeff-Relf.Me/SleepPat.PNG

[toc] | [prev] | [next] | [standalone]


#390874 — Re: When I'm likely to be asleep.

FromDFS <nospam@dfs.com>
Date2017-01-21 15:58 -0500
SubjectRe: When I'm likely to be asleep.
Message-ID<o60hvf$i4a$2@dont-email.me>
In reply to#390547
On 1/19/2017 11:33 PM, Jeff-Relf.Me wrote:
> Speaking of "http://Jeff-Relf.Me/SleepLog.TXT", someone wrote:
>> GIGO.
>
> Without this data, I wouldn't know when I'm likely to be asleep.
>
> I don't use alarm clocks, so it varies _a_lot;
> at best, there's a trend I can follow; hence:
>
>   http://Jeff-Relf.Me/SleepPat.HTM
>   http://Jeff-Relf.Me/SleepPat.PNG


Using your sleeppat.htm file from a couple days ago:

* removed the month/date lines and the far right column
* counted the characters (1 to F = 1 hour to 15 hours)
* divided each count by (the character * 3) to show how many times you
   slept/offline for each N-hour period; that's in the Result column
   below.  3 characters are required to cover a 1-hour period in your
   pattern.


Tiny C Compiler 0.9.26 (x86-64 Win64)

$ tcc lettercount.c -o lettercount.exe

$ lettercount.exe relf_sleeppat.txt

Hrs   Hex   Count   Div   Result   Offline
------------------------------------------
   1    1       0     3      --        --
   2    2       0     6      --        --
   3    3       0     9      --        --
   4    4     343    12      28       112
   5    5     587    15      39       195
   6    6     920    18      51       306
   7    7    1287    21      61       427
   8    8    1672    24      69       552
   9    9    1242    27      46       414
  10    A     519    30      17       170
  11    B     297    33       9        99
  12    C     127    36       3        36
  13    D       0    39      --        --
  14    E       0    42      --        --
  15    F      30    45      --        --
------------------------------------------
  Totals     7024           323      2311


Based on the character counts in your sleeppat file, you were offline 
for 4 hours 28x = 112 hours, you were offline for 5 hours 39x = 195 
hours, etc.

Does your X.EXE program not log offline periods < 4 hours?

The only issue I see is that your log included the hex value F (=15 
hours offline) only 30 times, when it should have appeared a minimum of 
45 times (again, it takes 3 instances of the character to represent 1 
hour of offline time).


====================================================================
lettercount.c
====================================================================
#include <stdio.h>
#include <stdlib.h>
		
int main(int argc, char *argv[]) {
	
	//must enter input file name
	if (argc < 2) {
		printf("Error: enter input file name\n");
		return -1;
	}
	
	//vars
	char ch, hex[1];	
	int i,cnt,div,res,off;
	int totcnt=0,totres=0,totoff=0;
	int countarr[16]={0};
	
	//count characters
	FILE *fp;
	fp=fopen(argv[1],"r");
	while ((ch = fgetc(fp)) != EOF) {
		if (ch >= '1' && ch <= '9') {
			countarr[ch-'1']++;
		}
		if (ch >= 'A' && ch <= 'F') {
			int i = (int)strtol(&ch, NULL, 16);
			countarr[i-1]++;
		}
	}
	fclose(fp);
	
	//print table
	printf("\nHrs   Hex   Count   Div   Result   Offline\n");
	printf("------------------------------------------ \n");
	
	for (int i=1; i<16; i++) {
		sprintf(hex, "%X", i);
		cnt = countarr[i-1];
		div = 3 * i;
		res = cnt/div;
		off = res * i;
		totcnt += cnt;
		totres += res;
		totoff += off;
		if(cnt == 0 || cnt < div) {printf(" %2d    %s    %4d    %2d      -- 
--\n", i, hex, cnt, div);}
		if(cnt > 0 && cnt >= div)  {printf(" %2d    %s    %4d    %2d      %2d 
   %4d\n", i, hex, cnt, div, res, off);}
	}
	
	printf("------------------------------------------ \n");
	printf(" Totals     %4d           %3d      %4d\n", totcnt,totres,totoff);
	
	return 0;
}
====================================================================


Next I'm working on code to read your sleep log and output a pattern 
similar to yours, but I'm putting time on the x-axis and date on the y-axis.

[toc] | [prev] | [next] | [standalone]


#390928 — On SleepPat.HTM's yAxis: Two rows = one hour.

FromJeff-Relf.Me <@.>
Date2017-01-21 19:30 -0800
SubjectOn SleepPat.HTM's yAxis: Two rows = one hour.
Message-ID<Jeff-Relf.Me@Jan.21--7.30P.Seattle.2017>
In reply to#390874
You ( DFS ) wrote:
> Does your X.EXE program not log offline periods < 4 hours?

SleepLog.TXT tracks _all off/on line durations, 
even when they're just seconds long.

SleepPat.HTM doesn't report anything less than 4 hours.

On SleepPat.HTM's yAxis:  Two rows = one hour.
The start and end times of a run can be off, due to rounding.

> Next I'm working on code to read your sleep log and output a pattern 
> similar to yours, but I'm putting time on the x-axis and date on the y-axis.

With my 4k monitor, 7.5 months fits on one page, no scrolling;
it's very panoramic.  Yet, at the same time, Today's data is quite clear.

[toc] | [prev] | [next] | [standalone]


#391652 — On SleepPat.HTM's yAxis: Two rows = one hour.

FromJeff-Relf.Me <@.>
Date2017-01-24 13:01 -0800
SubjectOn SleepPat.HTM's yAxis: Two rows = one hour.
Message-ID<Jeff-Relf.Me@Jan.24--1.01P.Seattle.2017>
In reply to#390928
I wrote:
> SleepPat.HTM doesn't report anything less than 4 hours.

Now it reports anything over a half hour;
and, now, the graphical version ( not text )
shows the percentage of the day spent OffLine:

  http://Jeff-Relf.Me/SleepPat.HTM
  http://Jeff-Relf.Me/SleepPat.PNG

[toc] | [prev] | [next] | [standalone]


#391664 — Re: On SleepPat.HTM's yAxis: Two rows = one hour.

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-24 21:26 +0000
SubjectRe: On SleepPat.HTM's yAxis: Two rows = one hour.
Message-ID<agjboi003.ag@rooftop.invalid>
In reply to#391652
Jeff-Relf.Me <@.> wrote:
> I wrote:
>> SleepPat.HTM doesn't report anything less than 4 hours.
> 
> Now it reports anything over a half hour;
> and, now, the graphical version ( not text )
> shows the percentage of the day spent OffLine:
> 
>   http://Jeff-Relf.Me/SleepPat.HTM
>   http://Jeff-Relf.Me/SleepPat.PNG

Is this the monitor sleeping, or you?

[toc] | [prev] | [next] | [standalone]


#391690 — A lot of it is just being OffLine, not sleeping.

FromJeff-Relf.Me <@.>
Date2017-01-24 14:12 -0800
SubjectA lot of it is just being OffLine, not sleeping.
Message-ID<Jeff-Relf.Me@Jan.24--2.12P.Seattle.2017>
In reply to#391664
You ( Owl ) replied ( to me ):
> > Now it reports anything over a half hour;
> > and, now, the graphical version ( not text )
> > shows the percentage of the day spent OffLine:
> > 
> >   http://Jeff-Relf.Me/SleepPat.HTM
> >   http://Jeff-Relf.Me/SleepPat.PNG
> 
> Is this the monitor sleeping, or you?

I turn the monitor off whenever I'm not using it;
"SleepPat.HTM" tracks when it's off.

A lot of it is just being OffLine, not sleeping;
still, the patterns let me know when I'm likely to sleep.

[toc] | [prev] | [next] | [standalone]


#391732 — Re: A lot of it is just being OffLine, not sleeping.

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-24 23:36 +0000
SubjectRe: A lot of it is just being OffLine, not sleeping.
Message-ID<ahbo4300b.a3@rooftop.invalid>
In reply to#391690
Jeff-Relf.Me <@.> wrote:
> You ( Owl ) replied ( to me ):
>> > Now it reports anything over a half hour;
>> > and, now, the graphical version ( not text )
>> > shows the percentage of the day spent OffLine:
>> > 
>> >   http://Jeff-Relf.Me/SleepPat.HTM
>> >   http://Jeff-Relf.Me/SleepPat.PNG
>> 
>> Is this the monitor sleeping, or you?
> 
> I turn the monitor off whenever I'm not using it;
> "SleepPat.HTM" tracks when it's off.
> 
> A lot of it is just being OffLine, not sleeping;
> still, the patterns let me know when I'm likely to sleep.

"when I'm likely to sleep."  So you're using your monitor's
sleep pattern to estimate your own sleep pattern?  Is there
really a correlation between the two?

[toc] | [prev] | [next] | [standalone]


#391770 — "Auto Sleep" is disabled, it can't happen.

FromJeff-Relf.Me <@.>
Date2017-01-24 16:26 -0800
Subject"Auto Sleep" is disabled, it can't happen.
Message-ID<Jeff-Relf.Me@Jan.24--4.26P.Seattle.2017>
In reply to#391732
You ( Owl ) replied ( to me ):
> > I turn the monitor off whenever I'm not using it;
> > "SleepPat.HTM" tracks when it's off.
> > 
> > A lot of it is just being OffLine, not sleeping;
> > still, the patterns let me know when I'm likely to sleep.
> 
> "when I'm likely to sleep."  So you're using your monitor's
> sleep pattern to estimate your own sleep pattern?  Is there
> really a correlation between the two?

I turn it off _manually only; 
"Auto Sleep" is disabled, it can't happen.

When I see long periods OffLine, last few days,
I know that that's when I'm likely to sleep.  It varies a lot.

[toc] | [prev] | [next] | [standalone]


#392176 — Re: "Auto Sleep" is disabled, it can't happen.

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-27 03:33 +0000
SubjectRe: "Auto Sleep" is disabled, it can't happen.
Message-ID<abja993.agh@rooftop.invalid>
In reply to#391770
Jeff-Relf.Me <@.> wrote:
> You ( Owl ) replied ( to me ):
>> > I turn the monitor off whenever I'm not using it;
>> > "SleepPat.HTM" tracks when it's off.
>> > 
>> > A lot of it is just being OffLine, not sleeping;
>> > still, the patterns let me know when I'm likely to sleep.
>> 
>> "when I'm likely to sleep."  So you're using your monitor's
>> sleep pattern to estimate your own sleep pattern?  Is there
>> really a correlation between the two?
> 
> I turn it off _manually only; 
> "Auto Sleep" is disabled, it can't happen.
> 
> When I see long periods OffLine, last few days,
> I know that that's when I'm likely to sleep.  It varies a lot.

Wouldn't output similar to this be easier to read?

http://i.imgur.com/3Sp5zo8.png

And wouldn't having the input data just be a text file of timestamps
allow for more flexibility in processing?

[toc] | [prev] | [next] | [standalone]


#392178 — Re: "Auto Sleep" is disabled, it can't happen.

FromMe Sham <osirus47@yahoo.com>
Date2017-01-26 19:51 -0800
SubjectRe: "Auto Sleep" is disabled, it can't happen.
Message-ID<8db567d8-165d-427b-96fd-e6022b8e74de@googlegroups.com>
In reply to#392176
Only to a sane man.

[toc] | [prev] | [next] | [standalone]


#392197 — SleepLog.TXT _is a series of time stamps.

FromJeff-Relf.Me <@.>
Date2017-01-26 22:39 -0800
SubjectSleepLog.TXT _is a series of time stamps.
Message-ID<Jeff-Relf.Me@Jan.26--10.39P.Seattle.2017>
In reply to#392176
You ( Owl ) replied ( to me ):
> Wouldn't output similar to this be easier to read?
> http://i.imgur.com/3Sp5zo8.png

That's basically how it is now, only I show the length of the runs;
e.g. 8 hours, starting at 1am and then wrapping at 3am to the next day.
7.5 months per table, top and bottom, for a total of 15 months.

> And wouldn't having the input data just be a text file of timestamps
> allow for more flexibility in processing?

SleepLog.TXT _is a series of time stamps, 
including i64 seconds since the start of 1970, in Base360.

The LeftMost column is "hours offline";
so you can tell at a glance what's what.

 http://Jeff-Relf.Me/SleepLog.TXT
 http://Jeff-Relf.Me/SleepPat.HTM
 http://Jeff-Relf.Me/SleepPat.PNG

[toc] | [prev] | [next] | [standalone]


#392313 — Re: SleepLog.TXT _is a series of time stamps.

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-27 21:15 +0000
SubjectRe: SleepLog.TXT _is a series of time stamps.
Message-ID<ab00ga.vh4r@rooftop.invalid>
In reply to#392197
Jeff-Relf.Me <@.> wrote:
> You ( Owl ) replied ( to me ):
>> Wouldn't output similar to this be easier to read?
>> http://i.imgur.com/3Sp5zo8.png
> 
> That's basically how it is now,


What you have now is nearly impossible to read.


> only I show the length of the runs;
> e.g. 8 hours, starting at 1am and then wrapping at 3am to the next day.
> 7.5 months per table, top and bottom, for a total of 15 months.
> 

Why 26 hour days?  Why 15 months?

>> And wouldn't having the input data just be a text file of timestamps
>> allow for more flexibility in processing?
> 
> SleepLog.TXT _is a series of time stamps, 
> including i64 seconds since the start of 1970, in Base360.
> 
> The LeftMost column is "hours offline";
> so you can tell at a glance what's what.
> 
>  http://Jeff-Relf.Me/SleepLog.TXT
>  http://Jeff-Relf.Me/SleepPat.HTM
>  http://Jeff-Relf.Me/SleepPat.PNG


Why is the input in UTF-16, and why is the timestamp converted to base 360?
What's wrong with ascii text and base 10?

[toc] | [prev] | [next] | [standalone]


#392320 — What's right with US-ASCII and Base10 ? not much.

FromJeff-Relf.Me <@.>
Date2017-01-27 13:48 -0800
SubjectWhat's right with US-ASCII and Base10 ? not much.
Message-ID<Jeff-Relf.Me@Jan.27--1.48P.Seattle.2017>
In reply to#392313
You ( Owl ) replied ( to me ):
> > > Wouldn't output similar to this be easier to read?
> > > http://i.imgur.com/3Sp5zo8.png
> > 
> > That's basically how it is now,
> 
> What you have now is nearly impossible to read.

I can read it, so it's fine.

> > only I show the length of the runs;
> > e.g. 8 hours, starting at 1am and then wrapping at 3am to the next day.
> > 7.5 months per table, top and bottom, for a total of 15 months.
> 
> Why 26 hour days?  Why 15 months?

No, each day is 24 hours, starting at 3am.
15 months is more than a year; 
so I can compare this winter vs last winter.

> >  http://Jeff-Relf.Me/SleepLog.TXT
> >  http://Jeff-Relf.Me/SleepPat.HTM
> >  http://Jeff-Relf.Me/SleepPat.PNG
> 
> Why is the input in UTF-16, 

Because that's how it is in memory ( RAM );
I didn't feel like converting it to UTF-8.

> and why is the timestamp converted to base 360?

Base360 uses less screenspace, fewer columns.

> What's wrong with ascii text and base 10?

What's right with US-ASCII and Base10 ?  not much.

[toc] | [prev] | [next] | [standalone]


#392344 — Re: What's right with US-ASCII and Base10 ? not much.

Fromdeplorable owl <owl@rooftop.invalid>
Date2017-01-28 00:38 +0000
SubjectRe: What's right with US-ASCII and Base10 ? not much.
Message-ID<aob003g.ub0h@rooftop.invalid>
In reply to#392320
Jeff-Relf.Me <@.> wrote:
> You ( Owl ) replied ( to me ):
>> > > Wouldn't output similar to this be easier to read?
>> > > http://i.imgur.com/3Sp5zo8.png
>> > 
>> > That's basically how it is now,
>> 
>> What you have now is nearly impossible to read.
> 
> I can read it, so it's fine.
> 

It's useless for anybody else though, yet you chose to share it
in that form.

>> > only I show the length of the runs;
>> > e.g. 8 hours, starting at 1am and then wrapping at 3am to the next day.
>> > 7.5 months per table, top and bottom, for a total of 15 months.
>> 
>> Why 26 hour days?  Why 15 months?
> 
> No, each day is 24 hours, starting at 3am.
> 15 months is more than a year; 
> so I can compare this winter vs last winter.
> 
>> >  http://Jeff-Relf.Me/SleepLog.TXT
>> >  http://Jeff-Relf.Me/SleepPat.HTM
>> >  http://Jeff-Relf.Me/SleepPat.PNG
>> 
>> Why is the input in UTF-16, 
> 
> Because that's how it is in memory ( RAM );
> I didn't feel like converting it to UTF-8.
> 

UTF-8 even?  Why not ascii?  All you need for
input is a list of timestamps like:

1483228800
1483228801
1483228802
1483228803
1483228804
1483315195
1483315196
1483315197
1483315198
1483315199
1483315200
1483315201
1483315202
1483315203
1483315204

There won't be an entry unless it toggles the state.
Easy to translate into any date/time format you want
with common utilities and pass to gnuplot or something.


>> and why is the timestamp converted to base 360?
> 
> Base360 uses less screenspace, fewer columns.
> 
>> What's wrong with ascii text and base 10?
> 
> What's right with US-ASCII and Base10 ?  not much.

You're kidding, right?  A huge number of text processing
utilities work with both without requiring conversion.
I don't know of a single one that expects numeric input
to be in base 360.

[toc] | [prev] | [next] | [standalone]


#392489 — None of it is for you, all of it is for me.

FromJeff-Relf.Me <@.>
Date2017-01-27 22:52 -0800
SubjectNone of it is for you, all of it is for me.
Message-ID<Jeff-Relf.Me@Jan.27--10.52P.Seattle.2017>
In reply to#392344
I post lots of code here,
none of it is for you, all of it is for me.

You are a commandline jocky, I am not.

Everything I write is mega custom, for me.

You like:

  1483228800
  1483228801
  1483228802
  1483228803
  1483228804
  1483315195
  1483315196
  1483315197
  1483315198
  1483315199

I prefer:

  24.4 hour Day, 81% offline:

   8.5        Jan 27 { 10:33 P, 2017 }:32       Vмпν
          .9  Jan 27 {  2: 3 P, 2017 }:51       Vмυϗ

   2.0        Jan 27 {  1:11 P, 2017 }:13       Vмμч
          .2  Jan 27 { 11:14 A, 2017 }: 4       VмΡɼ

   1.9        Jan 27 { 11:   A, 2017 }:34       VмΟY
          .3  Jan 27 {  9: 4 A, 2017 }:19       VмʪБ

   3.7        Jan 27 {  8:43 A, 2017 }:31       Vмʧɛ
         2.6  Jan 27 {  5:   A, 2017 }:31       VмʂV

   3.6        Jan 27 {  2:22 A, 2017 }:58       Vмɧи
          .6  Jan 26 { 10:45 P, 2017 }:15       VмȹΥ

Because, then, I know at glance how long I've been offline.

[toc] | [prev] | [next] | [standalone]


#392559 — Re: None of it is for you, all of it is for me.

FromSteve Carroll <fretwizzer@gmail.com>
Date2017-01-28 08:25 -0800
SubjectRe: None of it is for you, all of it is for me.
Message-ID<0884275f-da08-44c6-a26e-a79f38324283@googlegroups.com>
In reply to#392489
On Friday, January 27, 2017 at 11:52:06 PM UTC-7, Jeff-Relf.Me wrote:
> I post lots of code here,
> none of it is for you, all of it is for me.

Again  (I asked you this long ago), so why post it publicly? 

[toc] | [prev] | [next] | [standalone]


#392568 — Re: If you don't like it, try FaceBook or Reddit.

FromSteve Carroll <fretwizzer@gmail.com>
Date2017-01-28 09:36 -0800
SubjectRe: If you don't like it, try FaceBook or Reddit.
Message-ID<effa5b16-c6c4-4982-b2b4-fa050eaf4dae@googlegroups.com>
In reply to#392559
On Saturday, January 28, 2017 at 9:58:15 AM UTC-7, Jeff-Relf.Me wrote:
> You ( SteveCarroll ) replied ( to me ):
> > > I post lots of code here,
> > > none of it is for you, all of it is for me.
> > 
> > Again  (I asked you this long ago), so why post it publicly? 
> 
> Again, it helps me focus.

I still don't get it, how does posting it publicly help you (more) with focus?

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.os.linux.advocacy


csiph-web