Recent

Author Topic: CATWW  (Read 11181 times)

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #45 on: August 25, 2020, 12:53:17 am »
CATWW need data for time zone. Does anyone know where can we download the database and use it freely including for closed/commercial projects.
The IANA timezone database data-files are released as public domain. e.g. not restricted by copyright and can be used freely by others.

Having said that, there might be other sources (that I am not ware of).

And here is the slogan:

"CATWW - The World Wide Cat!"
I like it !  :)

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #46 on: August 25, 2020, 01:19:46 am »
Hi!

For small applications there is

http://worldtimeapi.org/

They have a API and you can free ask for timezones and daylight savings.
But it is only a little subset of the world.
New Zealand is missing.

Perhaps this is enough.

Winni

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: CATWW
« Reply #47 on: August 25, 2020, 01:49:34 am »
I'm in agreement for most of the discussion. However; I would like the option to allow  CATWW to be used in a commercial product with written permission.

I'm think of someone coming along who would like to use it in a product they sell or one of us wanting to use it in a product.

Maybe handako will come up with a game where he needs a clock or TRon comes up with a commercial program idea. Or just someone contacts us and wants to use it in a commercial product.     
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #48 on: August 25, 2020, 01:57:07 am »
Hi!

The clock is 4.000 years old.

And now you want a copyright.
Are we here at Rolex Industries?

Winni

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #49 on: August 25, 2020, 02:28:37 am »
For small applications there is http://worldtimeapi.org/

They have a API and you can free ask for timezones and daylight savings.
That is actually a very nice one. Finally an API that understands what you require and don't force you into expensive subscriptions.

Thank you for that winni.

Quote
But it is only a little subset of the world.
New Zealand is missing.
Huh ?

Code: [Select]
Pacific/Chatham
Pacific/Auckland

afaik those are the two time-zones used in New Zealand.

The clock is 4.000 years old.

And now you want a copyright.
Are we here at Rolex Industries?
LOL

Actually we should file a patent for the workings of the sun, moon and earth.... without them there wouldn't be a need for time to begin with... unless you are a flat-earth believer of course, for those we have a special lamp hanging from the ceiling  :)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: CATWW
« Reply #50 on: August 25, 2020, 04:15:14 am »
I was taking (literal) note of what Handoko wrote: Release now as GPL and later decide to make it proprietary. And imho that is something that is in fact prohibited as the GPL clearly states that all changes must be made public again.

Yes, but that applies only to licensed users. Authors are not limited in any way (except by contract, as happens in the cultural industry) by what their license to others says. There are plenty of examples out there where the initial license was GPL (or something similar) while the final version(s) were propietary. The usual end-results, of course, are that either the program is forgotten or someone forks the initial FOSS work to keep it open, which is one of the things why it makes little sense. but some people seem to think that it's a good idea ... mostly those that know nothing of the virtues of FOSS. ;)
« Last Edit: August 25, 2020, 04:17:07 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #51 on: August 25, 2020, 09:14:49 am »

Quote
But it is only a little subset of the world.
New Zealand is missing.
Huh ?

Code: [Select]
Pacific/Chatham
Pacific/Auckland

afaik those are the two time-zones used in New Zealand.



Hi!

Yes the list of timezones is complete.
So Pacific/Auckland is given.
But Auckland as city is missing!

Winni

PS.: Even Wellington as capital is missing.
« Last Edit: August 25, 2020, 09:23:20 am by winni »

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #52 on: August 27, 2020, 05:43:31 pm »
Yes, but that applies only to licensed users. Authors are not limited in any way ...
Arrgh. You are right lucamar. I was still looking at it from the other angle  :-[

:facepalm:

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #53 on: August 27, 2020, 11:18:17 pm »
Yes the list of timezones is complete.
Good ! ... You gave me a little scare there  :)

Quote
So Pacific/Auckland is given.
But Auckland as city is missing!

PS.: Even Wellington as capital is missing.
True, and currently also true for catww.

I am working on that part of the program but unfortunately there isn't much progress in that department atm.

Out of curiosity... what would (for you) be an acceptable list of cities (when talking about numbers) ?

Because if wanted I am able to list every parking-lot/shopping-mall that exists in the world but that would require a bit of bandwidth and storage space (over 2GB). But, I could perhaps store that into the exe as a resource ?  :D

So, also there the question is really about the colour of the pasture  ;)

The numbers question is genuine though.... I really have no idea.

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: CATWW
« Reply #54 on: August 28, 2020, 12:12:46 am »
I woul think about 2000 cities. However it would be nice if a person could add the little Holt, Missouri or Lost Rock, Australia.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #55 on: August 28, 2020, 12:29:51 am »
Hi!

Even the producers  of globes have only a rule of thumb:

Fill empty space!
One the one hand they are are happy that there out in the wild near the Russian border in Northern Norway is Kirkenes. Only 5000 inhabitants. But they can draw something in this emptyness.
And on the other hand in the megacities there are medium cities missing: no space ...

I got a CSV base with 11 million geographical entries: Cities, villages, airports, mountain peaks, harbours, historical places, .....

Name UTF8, name ASCII, lat/log, country, timeszone, altitude, inhabitants ....
As you said: 1.3 GB

I would say: As much cities as possible so that a sequential search in a stringlist does not let the user too long wait.  That is around 50.000 entries - from my experience.
To start a DB is a sledgehammer for a little nail

Winni

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #56 on: August 28, 2020, 01:05:09 am »
@winni:
I do believe we are using the same database, or at the least very similar ;)

I would say: As much cities as possible so that a sequential search in a stringlist does not let the user too long wait.  That is around 50.000 entries - from my experience.
To start a DB is a sledgehammer for a little nail
I don't know if using a db would be a sledgehammer. It actually works quite fast and with a bit of thought also reasonably with regards of small memory footprint, but it does require some conversion (which does take up a lot of time).

The conversion/extraction would be required anyway, but could be done beforehand.

It does require some additional details for the city in order to be able to distinguish between them though... Wellington, for instance, being a good example.

I am currently working with a DB of approximately 25.000 cities for testing purpose.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #57 on: August 28, 2020, 01:48:46 am »
Hi!

Mine is no secret: allcities.zip from geonames.org .
Volunteers all around the world and allways growing.

I had too much to work on DBs in my former jobs - I hate them.
And I found an astonishing solution.
I have got a StringGrid with > 70.000 rows and 19 columns.
Quick  like hell. Colum sort in a second.
[QuickSort is Quick!!]
UTF8 search over 19 cols and 70.000 rows in less than a second.
So I don't need a DB

Think about it.

Winni

TRon

  • Hero Member
  • *****
  • Posts: 2435
Re: CATWW
« Reply #58 on: August 28, 2020, 05:32:17 pm »
Mine is no secret: allcities.zip from geonames.org .
Well, I did not say mine was a secret. It is the same DB  ;)

Quote
Volunteers all around the world and allways growing.
Yes, always growing, always in need for an (easy, painless, smooth) update  ;)

Quote
I have got a StringGrid with > 70.000 rows and 19 columns.
Quick  like hell. Colum sort in a second.
[QuickSort is Quick!!]
UTF8 search over 19 cols and 70.000 rows in less than a second.
So I don't need a DB
Just a quick question. How is filtering working for you ?  ;)

Quote
Think about it.
Oh, but I did  :)

I do not blame you, but you seem to have only a single green pasture that you are looking at ?

Processing of the data for 25.000 entries alone takes about 40-50 seconds at my dark brown coloured pasture.

And.. the thing is slow as f*ck on certain widgetsets/hw. I won't even mention the quirks it has.

And before asking, I am aware of the components that are around in the world and I would like to avoid them. Even more so in case it is possible to solve it in another way, using standard components.

And that is besides the fact that I do not wish to display the data, rather only make it possible for the user to select from a filtered subset (if the user chooses to). So in that case the stringgrid would only serve as a storage space, which seems a bit counter-intuitive to me.

fwiw: I can understand your dislike about db usage.

Just 2 cents.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: CATWW
« Reply #59 on: August 28, 2020, 07:29:24 pm »
Hi!

First: Concerning the StringGrid I can talk only about Linux/gtk. No experience how it behaves with other widget sets.

Just made a test with filtering:
Filtered a subset of 102 rows out of 70.000 in 1.5 seconds. The next filterings are always a little bit faster (why??) : 1.2 seconds.

It is important for sorting/searching/filtering that you disable all visual stuff with
BeginUpdate.

Winni

« Last Edit: August 28, 2020, 07:55:04 pm by winni »

 

TinyPortal © 2005-2018