Re: Using TRANSFORM PICTURE Crop in a Scaled to fit (Proportional) picture variable

2019-06-08 Thread JOHN BAUGHMAN via 4D_Tech
Keisuke, 

Thanks for the helpful response. I had not thought about scaling the image 
manually. It took awhile, but I finally got the math right…. It works!!

> is there a reason why your image is scaled on screen?

If I understand the question, a user is manually cropping the image 
using a marque tool and so needs to see the whole image at once without 
scrolling. 

> the scaling factor of a proportional image depends on its orientation and the 
> type of scaling you apply (e.g. xMidYMid):
> 
> c.f. 
> https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
>  
> 

Thanks for the link. While I did not understand it very well, it did 
remind me that the math is different depending on which is larger on the 
original picture, width or height.

> unlike resampling with CREATE THUMBNAIL,
> scaling with TRANSFORM PICTURE does not reduce the image quality.
> the result is the same as letting the form object do the scaling,
> except you have control over the ratio.

Yep. The results are great. 

Thanks again,

John




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Jörg Knebel via 4D_Tech
Hi JPR,

Thanks for all the additional input it helped a fair bit.

I try to be careful not to loose anything in regards of structures (DBs), 
passwords and pass phrases. ;-)

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Kirk Brooks via 4D_Tech
Jorg,
Sorry, I missed the bit about the compiled structure. Sounds like a
difficult situation. But if you have access to user mode exporting all the
data is as good a solution as any, really.

It's slow doing the export but you only have to do it once.

On Sat, Jun 8, 2019 at 6:31 PM Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hi Kirk,
>
> As mentioned in an other post the client has a compiled structure, but the
> guy the business was bought of refuses to hand over the source code. The
> funny thing is the business is based on and depends on that application,
> meaning no application/data no business.
> It is possible to go to the user environment and export all that stuff
> manually.
> But this is not my problem any more at least for a long time I hope.
>
>
> > On 9 Jun 2019, at 01:36 AEST, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > In general I think 4D's tightening up of data security is a good thing.
> Yes
> > it creates headaches when good people do stupid things but on the whole
> is
> > a better architecture by limiting opportunities for bad people to do bad
> > things by intent.
>
> I couldn’t agree more.
> I personally go a step further by not allowing the data to be opened on a
> different computer even if the structure is a 100% match.
>
> I like the prospect to be able to encrypt tables/content, as long as it is
> my choice what table(s) are to be encrypted.
> The idea to do such thing on record level is on my “to do later list” for
> a while now.
>
> Thanks again for all the input.
>
> Cheers
> Jörg
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Jörg Knebel via 4D_Tech
Hi Kirk,

As mentioned in an other post the client has a compiled structure, but the guy 
the business was bought of refuses to hand over the source code. The funny 
thing is the business is based on and depends on that application, meaning no 
application/data no business.
It is possible to go to the user environment and export all that stuff manually.
But this is not my problem any more at least for a long time I hope.


> On 9 Jun 2019, at 01:36 AEST, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> In general I think 4D's tightening up of data security is a good thing. Yes
> it creates headaches when good people do stupid things but on the whole is
> a better architecture by limiting opportunities for bad people to do bad
> things by intent.

I couldn’t agree more. 
I personally go a step further by not allowing the data to be opened on a 
different computer even if the structure is a 100% match.

I like the prospect to be able to encrypt tables/content, as long as it is my 
choice what table(s) are to be encrypted.
The idea to do such thing on record level is on my “to do later list” for a 
while now. 

Thanks again for all the input.

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Anyone using zipcodeapi

2019-06-08 Thread Sannyasin Siddhanathaswami via 4D_Tech
I’m playing with the Google Geocode too. It’s useful for certain things. It’s 
free for up to $200 worth or requests per month. That’s a lot for minor uses!



Sannyasin Siddhanathaswami
On Jun 8, 2019, 7:11 AM -1000, David Ringsmuth via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
John,

I’m using the Google Geocode API. It returns XML with street address info, 
which can be complicated….

It’s not free, but it is very in-expensive.

David Ringsmuth

From: JOHN BAUGHMAN via 4D_Tech
Sent: Saturday, June 1, 2019 8:07 PM
To: Ed Hammond via 4D_Tech
Cc: JOHN BAUGHMAN
Subject: Anyone using zipcodeapi

Is anyone using zipcodeapi.com  to fill in city and 
state fields in a 4D database? Would you be willing to share your code?

Thanks,

John


John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread JPR via 4D_Tech
[JPR]

Hi Jörg,

Kirk is right, the WEDD resource stands for Wedding, and it was just a resource 
used to open the proper data file when starting a structure file, there is 
nothing mysterious about it. The WEDD resource has been removed in 4D 2004, 15 
years ago. It's only use was to mary a 4DB with a 4DD.

And he is also right saying that one man's 'data rescue' is another man's 'data 
breach'. As you know, data security is now under the full spotlights. It has 
always been an issue for every databases. It has always been possible to open 
any computer file (means also the 4D data files) brute force and try to analyse 
what's inside. This is why 4D has introduced encryption in V17R5, which is the 
only way to secure data.

It's possible to find the structure of any datafile with Data Analyzer, at 
least for me, for I wrote it. But, for safety reasons, we have put some 
security in it, like not distributing the source code.  Still, you can open any 
datafile and get the header information, described in detail in the 
documentation. What you cannot get if you have ONLY the .4DD file, is the names 
of Tables and Fields, which are save in other files (.4DB, .4DC, and .Match)

But I can tell you that I got many demands for help coming from developers who 
have lost the DB password,  or only have a compiled structure, but I NEVER got 
any demands coming from a total absence of structure file...

Just to be clear, I told during the Tour that IF you have used the encryption 
feature on some Tables, AND IF you have lost the Encryption Key, AND IF you 
have forgotten the PassPhrase, then there is nothing we can do for you, for the 
encryption is an actual strong encryption. In other cases, we have always been 
able to help recovering data.

> It doesn’t matter what algorithm and/or encryption is used by 4D to realise 
> that “New WEDD” function, disturbing is , that 4D did not inform the 
> developer community in detail about those changes.
There is no mystery about changing old resources into new ways, and we cannot 
tell developers in detail every minor changes made in 4D since V11, for there 
are too many. 

HTH,

My very best,

JPR

"Errare humanum est, perseverare diabolicum" (Seneca) 

> Message: 8
> Date: Sun, 9 Jun 2019 00:41:27 +1000
> From: Jörg Knebel 
> To: 4D Tech Mailing List Technical <4d_tech@lists.4d.com>
> Subject: Re: Open a v17 data file when Structure is unknown
> Message-ID:
>   <0206db74-5b10-49f3-a52c-5646831d9...@tttdatasystems.com.au>
> Content-Type: text/plain; charset=utf-8
> 
> Kirk,
> 
>> On 9 Jun 2019, at 24:01 AEST, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> As I recall the WEDD was a simple string supplied by the developer. I never
>> looked into how, or if, 4D used that string to create anything more complex
>> like a hash.
> 
> 
> Well, as a matter of fact, in pre v11 versions the developer was able to 
> “WEDD” structure and data with 4D-Tool(s) I think as he was pleased. 
> The rescue of data was always possible with a generic structure.
> 
> NOW, the new “WEDD” is integrated and the developer is fu, if he has to 
> do some kind of data rescue.
> 
> It doesn’t matter what algorithm and/or encryption is used by 4D to realise 
> that “New WEDD” function, disturbing is , that 4D did not inform the 
> developer community in detail about those changes.
> 
> At least it would be easier to tell potential clients to fuck off because 
> there is nothing you can do for them - it would save a lot of time to discuss 
> the question “How long is a piece of string”.
> 
> Anyway, now that I know those facts I can shorten phone requests about 
> similar projects.
> 
> Thanks 4D!
> 
> 
> Regards
> Jörg Knebel, M.Eng. - 4D Developer since 1991
> TTT Data Systems Pty Ltd
> Phone: +61 (0)2 6601 7453
> www.tttdatasystems.com.au 
> 
> 
> 

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Anyone using zipcodeapi

2019-06-08 Thread David Ringsmuth via 4D_Tech
John,

I’m using the Google Geocode API. It returns XML with street address info, 
which can be complicated….

It’s not free, but it is very in-expensive.

David Ringsmuth

From: JOHN BAUGHMAN via 4D_Tech
Sent: Saturday, June 1, 2019 8:07 PM
To: Ed Hammond via 4D_Tech
Cc: JOHN BAUGHMAN
Subject: Anyone using zipcodeapi

Is anyone using zipcodeapi.com  to fill in city and 
state fields in a 4D database? Would you be willing to share your code?

Thanks,

John


John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Using TRANSFORM PICTURE Crop in a Scaled to fit (Proportional) picture variable

2019-06-08 Thread Keisuke Miyako via 4D_Tech
Unfortunately TRANSFORM PICTURE applies the cropping coordinates to the full 
size picture not the scaled picture, which of course is way off

is there a reason why your image is scaled on screen?

did you scale the image with TRANSFORM PICTURE or are you relying on the 
image's form object property to apply the scaling?

if the area is fixed size,
it might make your maths more simple
if it the image were resampled with CREATE THUMBNAIL
as a bitmap thumbnail to fit the exact area.

also the form rendering would be faster if the object had no scaling property.

---

the scaling factor of a proportional image depends on its orientation and the 
type of scaling you apply (e.g. xMidYMid):

c.f. 
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio

---

unlike resampling with CREATE THUMBNAIL,
scaling with TRANSFORM PICTURE does not reduce the image quality.
the result is the same as letting the form object do the scaling,
except you have control over the ratio.

https://doc.4d.com/4Dv17/4D/17.1/TRANSFORM-PICTURE.301-4179105.en.html

---

but to answer you question,

Is there a mathematical way to do this? Or perhaps another way to get this 
cropping to work?

we have to figure out the maths.
there is no other way.



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Kirk Brooks via 4D_Tech
Jorg,
Well, one man's 'data rescue' is another man's 'data breach'. Frankly it
sounds a little hinky that a client would have a lone datafile and no clue
about where the structure file is or who created it. But I have run bars
and restaurants in my past and am suspicious of stories like that.

In general I think 4D's tightening up of data security is a good thing. Yes
it creates headaches when good people do stupid things but on the whole is
a better architecture by limiting opportunities for bad people to do bad
things by intent.

FWIW - I recall JPR admonishing us at a Summit a few years ago regarding
the 'security' of the proprietary datafile. To paraphrase, "you may think
your data is somehow encrypted in there. IT'S NOT!" So the file could be
analyzed and data recovered. This also changes in v17r5 (I think) where we
can now encrypt tables.

On Sat, Jun 8, 2019 at 7:41 AM Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> NOW, the new “WEDD” is integrated and the developer is fu, if he has
> to do some kind of data rescue.
>
> It doesn’t matter what algorithm and/or encryption is used by 4D to
> realise that “New WEDD” function, disturbing is , that 4D did not inform
> the developer community in detail about those changes.
>

-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Jörg Knebel via 4D_Tech
Kirk,

> On 9 Jun 2019, at 24:01 AEST, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> As I recall the WEDD was a simple string supplied by the developer. I never
> looked into how, or if, 4D used that string to create anything more complex
> like a hash.


Well, as a matter of fact, in pre v11 versions the developer was able to “WEDD” 
structure and data with 4D-Tool(s) I think as he was pleased. 
The rescue of data was always possible with a generic structure.

NOW, the new “WEDD” is integrated and the developer is fu, if he has to do 
some kind of data rescue.

It doesn’t matter what algorithm and/or encryption is used by 4D to realise 
that “New WEDD” function, disturbing is , that 4D did not inform the developer 
community in detail about those changes.

At least it would be easier to tell potential clients to fuck off because there 
is nothing you can do for them - it would save a lot of time to discuss the 
question “How long is a piece of string”.

Anyway, now that I know those facts I can shorten phone requests about similar 
projects.

Thanks 4D!


Regards
Jörg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6601 7453
www.tttdatasystems.com.au 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Kirk Brooks via 4D_Tech
Jorg,
As I recall the WEDD was a simple string supplied by the developer. I never
looked into how, or if, 4D used that string to create anything more complex
like a hash.

On Sat, Jun 8, 2019 at 12:37 AM Jörg Knebel via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Since this project turned into a kind of academic one, what is the “New
> WEDD Resource” based on or are these information classified as “Burn before
> reading”?
>

-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Using TRANSFORM PICTURE Crop in a Scaled to fit (Proportional) picture variable

2019-06-08 Thread JOHN BAUGHMAN via 4D_Tech
Ha anyone this and be willing to share their code”

I have been trying to relate a selected area on the scaled picture to unscaled 
picture without any success figuring out the math.

I am displaying the image in a fixed size variable on a form (819X550 odd 
numbers I know). The user selects the desired area to crop using a cropping 
tool I created on the scaled image. I read the coordinates from the cropping 
tool and then use TRANSFORM PICTUE to crop the image.

Unfortunately TRANSFORM PICTURE applies the cropping coordinates to the full 
size picture not the scaled picture, which of course is way off. So I figured I 
need to apply a factor to the cropping coordinate equal to the difference 
between the size of the Picture Variable and the original image size. NOT! I 
think the proportional throws everything off.

Is there a mathematical way to do this? Or perhaps another way to get this 
cropping to work?

Thanks,

John




John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Open a v17 data file when Structure is unknown

2019-06-08 Thread Jörg Knebel via 4D_Tech
Thanks Keisuke,


> On 7 Jun 2019, at 11:54 AEST, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> the data analyser written by JPR
> 
> https://kb.4d.com/assetid=77253 
> 
> had code that could essentially be used to retrieve structure information out 
> of a data file.
> 
> (but it's a compiled database)
> 
> I used it to write this tool to edit the UUID of a structure and data file 
> (was WEDD resource in v2004)
> 
> for support purposes (remember catalog.xml ?)
> 
> https://github.com/miyako/4d-utility-uuid-manager 
> 

I tried both tools on the datafile in question but was not successful.

Since this project turned into a kind of academic one, what is the “New WEDD 
Resource” based on or are these information classified as “Burn before reading”?

Cheers
Jörg
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**