Re: Question about PaySimple http request

2017-08-02 Thread Bruno LEGAY via 4D_Tech
Hi,

I haven't done  paysimple but I have done similar web service auth in the past.

I would advise you not to use php unless you can't avoid it for this purpose 
(because php fast cgi is not always playing well when running several instances 
of 4D because of port issues).

For the CRC_hmacSha2_256Blob and HTTP_timestampIso8601 functions, take a look 
at this component :
https://github.com/blegay/aws_component


I think the code should look like this :

  C_TEXT($vt_endpoint)
  // sandbox
$vt_endpoint:="https://sandbox-api.paysimple.com;
$vt_username:=""
$vt_secretCode:=""

  // production
  //$vt_endpoint:="https://api.paysimple.com;
  //$vt_username:=""
  //$vt_secretCode:=""

ARRAY TEXT($tt_headerKeys;0)
ARRAY TEXT($tt_headerValues;0)

APPEND TO ARRAY($tt_headerKeys;"Authorization")
APPEND TO ARRAY($tt_headerValues;paySimpleAuth($vt_username;$vt_secretCode))

C_BLOB($vx_request;$vx_response)
C_LONGINT($vl_httpStatus)
$vl_httpStatus:=HTTP Request(HTTP post 
method;$vt_endpoint;$vx_request;$vx_response;$tt_headerKeys;$tt_headerValues)



  
//
  //@4ddoc-start : en
  //@name : paySimpleAuth
  //@scope : public
  //@deprecated : no
  //@description : This function return the auth string for paysimple service
  //@parameter[0-OUT-authString-TEXT] : auth string for paysimple service (e.g. 
"PSSERVER AccessId... ")
  //@parameter[1-IN-username-TEXT] : paysimple user name
  //@parameter[2-IN-secretCode-TEXT] : paysimple secret code
  //@parameter[3-IN-timestampIso8601-TEXT] : timestamp in ISO-8601, for unit 
testing only (optional, default value : current time timestamp)
  //@notes :
  // https://developer.paysimple.com/documentation.html#certification
  //@example : paySimpleAuth 
  //@see : 
  //@version : 1.00.00
  //@author : Bruno LEGAY (BLE) - Copyrights A Consulting - 2008
  //@history : CREATION : Bruno LEGAY (BLE) - 03/08/2017, 06:34:46 - v1.00.00
  //@4ddoc-end
  
//

C_TEXT($0;$vt_authString)  // auth string for paysimple service (e.g. "PSSERVER 
AccessId... ")
C_TEXT($1;$vt_username)  // paysimple user name
C_TEXT($2;$vt_secretCode)  // paysimple secret code
C_TEXT($3;$vt_timestampIso8601)  // for unit testing (e.g. "20150321T075240Z")

$vt_authString:=""

C_LONGINT($vl_nbParam)
$vl_nbParam:=Count parameters
If ($vl_nbParam>1)
$vt_username:=$1
$vt_secretCode:=$2

  // get a timestamp in ISO-8601 format
Case of 
: ($vl_nbParam=2)
$vt_timestampIso8601:=HTTP_timestampIso8601 
Else 
$vt_timestampIso8601:=$3
End case 

  // generate a hmac sha2 256 with timestamp as "data" and secret code as "key"
  // get the hmac into base 64
C_BLOB($vx_data;$vx_key)
SET BLOB SIZE($vx_data;0)
SET BLOB SIZE($vx_key;0)
CONVERT FROM TEXT($vt_timestampIso8601;"UTF-8";$vx_data)
CONVERT FROM TEXT($vt_secretCode;"UTF-8";$vx_key)

  // generate hmac => 32 bytes
C_BLOB($vx_hmac)
SET BLOB SIZE($vx_hmac;0)
$vx_hmac:=CRC_hmacSha2_256Blob (->$vx_data;->$vx_key)
SET BLOB SIZE($vx_data;0)
SET BLOB SIZE($vx_key;0)

  // convert binary hmac into base64 => 44 chars
C_TEXT($vt_hmacBase64)
BASE64 ENCODE($vx_hmac;$vt_hmacBase64)  // $vt_md5Base64 is 24 base64 char long 
e.g. "zjOP5omXeKrPwoQU8tlJiw=="
SET BLOB SIZE($vx_hmac;0)

  //TXT_base64Clean (->$vt_hmacBase64)

$vt_authString:="PSSERVER AccessId = "+$vt_username+"; Timestamp = 
"+$vt_timestampIso8601+"; Signature = "+$vt_hmacBase64
End if 

$0:=$vt_authString



// Unit test :

ASSERT(paySimpleAuth ("";"";"20150321T075240Z")="PSSERVER AccessId = ; Timestamp = 
20150321T075240Z; Signature = 8MBIsWosagCVIMoehR2FE4ay66hmyqDFoANgvBFx3+4=")


You can contact me privately if you need more help

HTH

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

Re: Listbox Printing

2017-08-02 Thread Keisuke Miyako via 4D_Tech
https://github.com/miyako/4d-tips-print-form-print-object-combo

2017/08/03 12:34、miyako > 
のメール:
I don't see any reasons why they won't work in tandem.


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

Re: Listbox Printing

2017-08-02 Thread James Crate via 4D_Tech
I had forgotten about Print Object. However, this is a listbox embedded in a 
form with lots of other fields/variables, it doesn’t look like Print Object can 
work in combination with Print Form. 

I did figure out how to fake it. There will normally be 4-8 rows, the space can 
accommodate 12 rows, and when there were fewer than 12 the listbox shrank, 
leaving a big gap on the page. I just made the arrays have 12 elements, and I 
get the right length. The downside is that I can’t use display formats, and I 
have to manage totals myself instead of using the listbox footer calculations 
which were so convenient. At least it’s still better than the way it was, which 
was 5+ objects per row for 12 rows to manually create a table that fills a 
space.

If listboxes are actually intended to be printed, there should be an option to 
print fixed size, and they should receive some kind of form event. This one 
does not receive On Load when printing and has no options for printing events.

Jim Crate

> On Aug 2, 2017, at 8:27 PM, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> have you looked into "Print object"?
> 
> http://doc.4d.com/4Dv16/4D/16/Print-object.301-3035768.en.html
> 
>> 2017/08/03 3:18、James Crate via 4D_Tech <4d_tech@lists.4d.com> のメール:
>> 
>> I am printing a listbox on a form which just has a detail section (i.e. 
>> Print Form). The listbox is printing, but variable sized according to the 
>> arrays, and I’d like fixed size with empty rows. There isn’t much 
>> documentation on printing listboxes, there’s no “Print variable frame” 
>> checkbox like text areas, and they don’t even receive the normal printing 
>> events. Is there a way to accomplish this?
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: Listbox Printing

2017-08-02 Thread John Baughman via 4D_Tech

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

Re: Encrypted Data at Rest

2017-08-02 Thread Tim Nevels via 4D_Tech
On Aug 2, 2017, at 7:35 PM,Richard Wright wrote:

> Not sure why you say for personal use only. FileVault supports 256 AES and 
> benefits from hardware acceleration in the CPU. I’ve never done timing 
> comparisons but there are no noticeable performance effects at all. Some 
> people have tested, years ago, and found at most only 2-3% degradation.

That sounds fantastic. I had no idea it was so good. And it’s free!

From what you say it sounds like it is ready for use in any and all situations 
where you need to encrypt data on macOS. 

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Re: Is there a way to put a separator line in a macro list?

2017-08-02 Thread Tim Nevels via 4D_Tech
On Aug 2, 2017, at 7:35 PM,David Adams wrote:

> On more macro question, it seems that the file reloads after editing as
> soon as you switch back to 4D. Is this a reliable feature, or am I just
> getting lucky? Images in the Resources folder work this way, custom
> constants do not...so I ask.

Yes. Every time 4D switches from background to frontmost application it does a 
reload.

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Re: Listbox Printing

2017-08-02 Thread Keisuke Miyako via 4D_Tech
have you looked into "Print object"?

http://doc.4d.com/4Dv16/4D/16/Print-object.301-3035768.en.html

> 2017/08/03 3:18、James Crate via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> I am printing a listbox on a form which just has a detail section (i.e. Print 
> Form). The listbox is printing, but variable sized according to the arrays, 
> and I’d like fixed size with empty rows. There isn’t much documentation on 
> printing listboxes, there’s no “Print variable frame” checkbox like text 
> areas, and they don’t even receive the normal printing events. Is there a way 
> to accomplish this?




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

Re: Is there a way to put a separator line in a macro list?

2017-08-02 Thread David Adams via 4D_Tech
Kirk,

Thanks, that works great!
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Is there a way to put a separator line in a macro list?

2017-08-02 Thread Kirk Brooks via 4D_Tech
I've never tested it but has never failed to reload for me - or throw an
error.

On Wed, Aug 2, 2017 at 3:04 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> On more macro question, it seems that the file reloads after editing as
> soon as you switch back to 4D. Is this a reliable feature, or am I just
> getting lucky? Images in the Resources folder work this way, custom
> constants do not...so I ask.
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>



-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: Is there a way to put a separator line in a macro list?

2017-08-02 Thread David Adams via 4D_Tech
On more macro question, it seems that the file reloads after editing as
soon as you switch back to 4D. Is this a reliable feature, or am I just
getting lucky? Images in the Resources folder work this way, custom
constants do not...so I ask.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Is there a way to put a separator line in a macro list?

2017-08-02 Thread Kirk Brooks via 4D_Tech
  

On Wed, Aug 2, 2017 at 3:02 PM, David Adams via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Just learned by example about how cool it is to call a custom method from a
> macro. So cool.
>
> Anyway, now that I've got religion about macros, I'd also like to get
> organized. With that in mind, I'd like to group them visually. Is there a
> way to put an inactive line-break in the list of macros? I didn't see a
> mention of such a thing in the manual:
>
> http://doc.4d.com/4Dv16/4D/16.1/Creating-and-using-macros.
> 300-3373341.en.html
>
> Also, the little gear thingy in the method toolbar - if seems like it
> remembers the last selected macro and runs it when you click. Is that a
> reliable feature? I like it, so I hope so.
>
> Thanks
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Is there a way to put a separator line in a macro list?

2017-08-02 Thread David Adams via 4D_Tech
Just learned by example about how cool it is to call a custom method from a
macro. So cool.

Anyway, now that I've got religion about macros, I'd also like to get
organized. With that in mind, I'd like to group them visually. Is there a
way to put an inactive line-break in the list of macros? I didn't see a
mention of such a thing in the manual:

http://doc.4d.com/4Dv16/4D/16.1/Creating-and-using-macros.300-3373341.en.html

Also, the little gear thingy in the method toolbar - if seems like it
remembers the last selected macro and runs it when you click. Is that a
reliable feature? I like it, so I hope so.

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

Question about PaySimple http request

2017-08-02 Thread Michael Ferguson via 4D_Tech
Hi,

I have set up a test account with PaySimple but I am having trouble sending a 
test request to add a customer. I get a 500 error returned by the server on the 
Http request. It may have to do with an improperly prepared authorization 
header. I use php calls to prepare the hashes required.

If anyone could provide an example creation and http request call to PaySimple, 
I’d appreciate it.

$l_Status:=HTTP Request(HTTP post 
method;"https://sandbox-api.paysimple.com/v4/customer";t_Request;t_Response;headernames_at;headervalues_at)

t_Request is properly formatted JSON text
headernames_at{1} := “Authorization”
$headervalues_at{1}:=Authorization: PSSERVER access 
id=myUserID;timestamp=$t_ISO_TimeStamp;signature=hashed t_API_Signature 



Thanks,

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

Re: Listbox Printing

2017-08-02 Thread Nigel Greenlee via 4D_Tech
Jim

FYI. If you want to print a list box The code is rather slow. Its actually 
better to convert it to a Quick report.

The following code will print any listbox area. As you can see I have not 
optimised this for V16. I need to look at the way it is setting the font and 
size etc, it also uses some formats from my system -should not take much to 
adapt this to your needs.(I tried it with a million rows i think and it was 
pretty impressive)

ARRAY TEXT($arrColNames;0)  
ARRAY TEXT($arrHeaderNames;0)
ARRAY POINTER($arrColVars;0)
ARRAY POINTER($arrHeaderVars;0)
ARRAY BOOLEAN($arrColsVisible;0)
ARRAY POINTER($arrStyles;0)

C_LONGINT($left;$Top;$Right;$Bottom;$MaxRows;$MaxPortrait;$MaxHeight;$MaxWidth)


LISTBOX GET 
ARRAYS(DB_b_OutputArrays;$arrColNames;$arrHeaderNames;$arrColVars;$arrHeaderVars;$arrColsVisible;$arrStyles)<—use
 your listbox area reference here
$TotalWidth:=0
For ($i;1;Size of array($arrColNames))
$TotalWidth:=$TotalWidth+LISTBOX Get column 
width(*;$arrColNames{$i})

End for 
//$OK:=PRINT_SetSIZE ("A4";"P”)<—This is  piece of code  i have 
that sets the print size-its 


$QRarea:=QR New offscreen area  
QR SET REPORT TABLE($QRarea;DB_l_CurrentDisplayedForm)
$ColumnNumber:=0
For ($i;1;Size of array($arrColNames))

RESOLVE 
POINTER($arrColVars{$i};$vsVarName;$vlTableNum;$vlFieldNum)
If ($vlTableNum>0) | ($vsVarName#"")
$ColumnNumber:=$ColumnNumber+1
If ($vlTableNum>0)

$Field:=Field($vlTableNum;$vlFieldNum)
Else 
$Field:=Get pointer($vsVarName)
End if 
$HeadVar:=$arrHeaderVars{$i}
QR INSERT 
COLUMN($QRarea;$ColumnNumber;$Field)
C_TEXT($title;$displayFormat)
C_LONGINT($hide;$repeatedValue)
C_LONGINT($size)

$type:=Type(($Field)->)
$Format:=""
  //LB_SetFormat ($Area;1;"";$i;$i;3)
Case of 
: (($type=1)) & ($Format="")
$Format:="|AccountsNZ"
: (($Type=8)) & ($Format="")
$Format:="|integers"
: (($type=9)) & ($Format="")
$Format:="|Longint"

: ($type=Is time) & 
($Format="")  
$Format:="&/5"
: ($type=4) & ($Format="")
$Format:=""

Else 
$Format:=""
End case 

C_TEXT($object)
QR GET INFO 
COLUMN($QRarea;$ColumnNumber;$title;$object;$hide;$size;$repeatedValue;$displayFormat)
$ColumnWidth:=LISTBOX Get column 
width(*;$arrColNames{$i})
$Hide:=Num(($ColumnWidth=0) | 
($arrColsVisible{$i}=False))

$ColumnTitle:=OBJECT Get 
title($HeadVar->)

QR SET INFO 
COLUMN($QRarea;$ColumnNumber;$ColumnTitle;$object;$Hide;$ColumnWidth;1;$Format)
If (True)
QR SET TEXT 
PROPERTY($QRarea;$ColumnNumber;qr title;_O_qr font;_o_Font number(<>FontBold))

QR SET TEXT 
PROPERTY($QRarea;$ColumnNumber;qr title;qr font size;<>FontDefaultBoldSize)
QR SET TEXT 
PROPERTY($QRarea;1;-1;qr bold;1)
  //QR SET TEXT 
PROPERTY($QRarea;1;-1;qr text color;0xFF00)

QR SET TEXT 
PROPERTY($QRarea;$ColumnNumber;qr detail;_O_qr font;_o_Font number(<>FontPlain))
 

Re: Encrypted Data at Rest

2017-08-02 Thread Richard Wright via 4D_Tech
Not sure why you say for personal use only. FileVault supports 256 AES and 
benefits from hardware acceleration in the CPU. I’ve never done timing 
comparisons but there are no noticeable performance effects at all. Some people 
have tested, years ago, and found at most only 2-3% degradation.


> Date: Wed, 02 Aug 2017 13:21:09 -0500
> From: Tim Nevels 
> 
> On Aug 2, 2017, at 12:51 PM,Chip Scheide wrote:
> 
>> depending on the computer system.
>> This is built into (software) OS X it is called 'FileVault'.
>> I believe that Windows 7+ has a similar feature, but this might not be 
>> true at all, or only for newer (8 and or 10).
>> 
>> I do not have explicit experience (I'm sure Jody does), i would expect 
>> there to be some performance hit with Filevault, as it is software.
> 
> Remember that what Jody is talking about the encryption is handled in 
> hardware by the drive controller so performance hit is negligible as they 
> say. Don’t confuse the issue by including consumer level software encryption 
> like FileVault. FileVault is for personal use only.
> 
> Just making the point for any amateurs out there reading this thread. The 
> people running 4D Server on a Mac Mini and they think “I’ll be more secure 
> and put my data file in FileVault." Yeah, it should work. But I think you 
> would be hard pressed to find anyone that would recommend doing that. 
> 
> And also keep in mind that drive level encryption has no impact on database 
> performance when you are accessing the data cache. No encryption of the data 
> cache and memory. So the negligible decryption performance hit only impacts 
> the first read from disk to load the data cache. And there is a negligible 
> encryption performance hit when writing to disk. But that only happens when 
> the cache is flushed. And the flush happens in a separate thread on a 
> separate core on 4D Server. So that makes it super negligible.
> 
> Tim
> 
> 
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> 

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

Re: Encrypted Data at Rest

2017-08-02 Thread Milan Adamov via 4D_Tech
FileVault 2, or just FileVault since Mountain Lion, is drive level encryption.

Milan

Sent from my iPad

> On Aug 2, 2017, at 21:21, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
>> On Aug 2, 2017, at 12:51 PM,Chip Scheide wrote:
>> 
>> depending on the computer system.
>> This is built into (software) OS X it is called 'FileVault'.
>> I believe that Windows 7+ has a similar feature, but this might not be 
>> true at all, or only for newer (8 and or 10).
>> 
>> I do not have explicit experience (I'm sure Jody does), i would expect 
>> there to be some performance hit with Filevault, as it is software.
> 
> Remember that what Jody is talking about the encryption is handled in 
> hardware by the drive controller so performance hit is negligible as they 
> say. Don’t confuse the issue by including consumer level software encryption 
> like FileVault. FileVault is for personal use only.
> 
> Just making the point for any amateurs out there reading this thread. The 
> people running 4D Server on a Mac Mini and they think “I’ll be more secure 
> and put my data file in FileVault." Yeah, it should work. But I think you 
> would be hard pressed to find anyone that would recommend doing that. 
> 
> And also keep in mind that drive level encryption has no impact on database 
> performance when you are accessing the data cache. No encryption of the data 
> cache and memory. So the negligible decryption performance hit only impacts 
> the first read from disk to load the data cache. And there is a negligible 
> encryption performance hit when writing to disk. But that only happens when 
> the cache is flushed. And the flush happens in a separate thread on a 
> separate core on 4D Server. So that makes it super negligible.
> 
> 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Blob to Record

2017-08-02 Thread Douglas von Roeder via 4D_Tech
API Pack has Record to BLOB and BLOB to record.


--
Douglas von Roeder
949-336-2902

On Wed, Aug 2, 2017 at 11:20 AM, Chip Scheide via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> is there simple way to move an entire (arbitrary) record to a blob?
>
> I was hoping for a simple command like:
> Record to blob([table];Blob)
>
> rather then
> for(records)
>   for(number of fields)
> convert to text(field)
> append text to blob
>   end for
>   next
> end for
>
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Encrypted Data at Rest

2017-08-02 Thread Tim Nevels via 4D_Tech
On Aug 2, 2017, at 12:51 PM,Chip Scheide wrote:

> depending on the computer system.
> This is built into (software) OS X it is called 'FileVault'.
> I believe that Windows 7+ has a similar feature, but this might not be 
> true at all, or only for newer (8 and or 10).
> 
> I do not have explicit experience (I'm sure Jody does), i would expect 
> there to be some performance hit with Filevault, as it is software.

Remember that what Jody is talking about the encryption is handled in hardware 
by the drive controller so performance hit is negligible as they say. Don’t 
confuse the issue by including consumer level software encryption like 
FileVault. FileVault is for personal use only.

Just making the point for any amateurs out there reading this thread. The 
people running 4D Server on a Mac Mini and they think “I’ll be more secure and 
put my data file in FileVault." Yeah, it should work. But I think you would be 
hard pressed to find anyone that would recommend doing that. 

And also keep in mind that drive level encryption has no impact on database 
performance when you are accessing the data cache. No encryption of the data 
cache and memory. So the negligible decryption performance hit only impacts the 
first read from disk to load the data cache. And there is a negligible 
encryption performance hit when writing to disk. But that only happens when the 
cache is flushed. And the flush happens in a separate thread on a separate core 
on 4D Server. So that makes it super negligible.

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Listbox Printing

2017-08-02 Thread James Crate via 4D_Tech
I am printing a listbox on a form which just has a detail section (i.e. Print 
Form). The listbox is printing, but variable sized according to the arrays, and 
I’d like fixed size with empty rows. There isn’t much documentation on printing 
listboxes, there’s no “Print variable frame” checkbox like text areas, and they 
don’t even receive the normal printing events. Is there a way to accomplish 
this?

Jim Crate

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

Blob to Record

2017-08-02 Thread Chip Scheide via 4D_Tech
is there simple way to move an entire (arbitrary) record to a blob?

I was hoping for a simple command like:
Record to blob([table];Blob)

rather then
for(records)
  for(number of fields)
convert to text(field)
append text to blob  
  end for
  next
end for

---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread David Adams via 4D_Tech
On Wed, Aug 2, 2017 at 10:51 AM, Jody Bevan via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> David:
>
> Of your four options I choose #1.  ;-)
>

I think that we all do ;-)

Short of 4D improving the language & compiler, I think the least-worst
option is rolling your own code scanner. Such an effort would also be
likely to make it easier to automate test case generation. I spent about 5
months checking these ideas out in a 4D context in the past year, and
that's where I landed.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Encrypted Data at Rest

2017-08-02 Thread Justin Will via 4D_Tech
I don't believe that FileVault and Windows built in encryption is sufficient 
enough.  I need to comply with NIST Special Publication 800-57.  I believe it 
will have to be hardware based with some sort of special key management.  
Honestly it's all pretty foreign to me.

Justin

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

Re: Encrypted Data at Rest

2017-08-02 Thread Keith Culotta via 4D_Tech
FileVault 2 was a big improvement over Apple's first attempt.
This link describes the performance impact:
http://osxdaily.com/2011/08/10/filevault-2-benchmarks-disk-encryption-faster-mac-os-x-lion/

Keith - CDI


> On Aug 2, 2017, at 12:47 PM, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Chip:
> 
> Even longer than the hardware/firmware solutions there has been software to 
> do this. The performance hit is substantial though. I remember testing out a 
> software solution about 15 years ago with a compiled standalone version of 
> our application. Essentially with these they intercept the writing to the 
> hard drive for certain applications so that you do not have to do this for 
> all applications. It was substantially slower. Of course that was 15 years 
> ago, so this could have speeded up since then, especially with SSD. Still 
> though the hardware/firmware solution I could not see a difference in 
> performance between with it and without it.
> 
> Jody
> 
> 
>> On Aug 2, 2017, at 9:07 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> depending on the computer system.
>> This is built into (software) OS X it is called 'FileVault'.
>> I believe that Windows 7+ has a similar feature, but this might not be 
>> true at all, or only for newer (8 and or 10).
>> 
>> I do not have explicit experience (I'm sure Jody does), i would expect 
>> there to be some performance hit with Filevault, as it is software.
>> 
>> 
>> her is a link to an ARsTechnica thread about SSD encryption
>> https://arstechnica.com/civis/viewtopic.php?t=1243475
>> 

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

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread Jody Bevan via 4D_Tech
David:

Of your four options I choose #1.  ;-)





Jody Bevan
ARGUS Productions Inc.
Developer
Argus Productions Inc. 




> On Aug 2, 2017, at 11:34 AM, David Adams via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 
> Without compile-time verification of source code errors, you're left with
> these options:
> 
> * Write perfect code every time.
> 
> * Write you own code scanner. Parse your code and process whatever tests
> and checks you can use. This is very fruitful, but a ton of work. It's hard
> to see anyone but a highly motivated individual or a large team doing it.
> 
> * Write very thorough test cases to generate realistic runtime conditions
> to test your code. 4D doesn't have any real test harness available and it's
> not the simplest environment to test anyway. I've seen some good efforts
> and devoted quite a bit of time to this sort of thing myself. Again, price
> of entry is higher than nearly any 4D shop can pay. (Yes, there is a
> UnitTester component from V12 that can be converted...but it only aims to
> solve some problems and you'll still need to retrofit zillions of white box
> tests.)
> 
> * Run you code and deal with the errors when they crop up. At your
> customers.

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

Re: Encrypted Data at Rest

2017-08-02 Thread Jody Bevan via 4D_Tech
Chip:

Even longer than the hardware/firmware solutions there has been software to do 
this. The performance hit is substantial though. I remember testing out a 
software solution about 15 years ago with a compiled standalone version of our 
application. Essentially with these they intercept the writing to the hard 
drive for certain applications so that you do not have to do this for all 
applications. It was substantially slower. Of course that was 15 years ago, so 
this could have speeded up since then, especially with SSD. Still though the 
hardware/firmware solution I could not see a difference in performance between 
with it and without it.

Jody


> On Aug 2, 2017, at 9:07 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> depending on the computer system.
> This is built into (software) OS X it is called 'FileVault'.
> I believe that Windows 7+ has a similar feature, but this might not be 
> true at all, or only for newer (8 and or 10).
> 
> I do not have explicit experience (I'm sure Jody does), i would expect 
> there to be some performance hit with Filevault, as it is software.
> 
> 
> her is a link to an ARsTechnica thread about SSD encryption
> https://arstechnica.com/civis/viewtopic.php?t=1243475
> 

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

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread David Adams via 4D_Tech
All of the new features look great and will be most welcome. I'm on R3 now
so R4 should hopefully be an easy transition. For people on 16.1, the new
features won't appear until 17.0.

Dots will definitely make it easier to work with known element names, so
that's great.

I haven't looked at JSON Validate closely yet, but it's leveraging a draft
standard named JSON Schema:

http://json-schema.org/latest/json-schema-validation.html#rfc.section.6

Complicated. Hopefully, it will provide the kind of validation options that
we've been missing. Also hopefully, someone will break it down a bit and
write a tool to compose schemas. Ideally, from a schema you'll be able to
generate new objects generically. Meaning, pass in a schema and get out a
conformant starter object. (Without that, the feature really misses one of
the better pieces of low-hanging fruit.)

Unfortunately, JSON Validate is a *runtime* tool, so it's nothing like a
replacement for a *compiler* improvement. I don't know about you, but I
would greatly prefer to see validation performed on my code "at rest" than
at runtime. Runtime validation has it's place and I'm all for tools that
support it - but that's not ideal for anything but objects that are truly
dynamic and defined at runtime. If they're defined in the code and
accessible to the compiler should check. Sadly, this doesn't seem to be
what 4D's going to do. (Compiler improvements are rare in this respect, the
compiler doesn't test parameter lists thoroughly, doesn't recognize methods
parameters as such, etc.)

Without compile-time verification of source code errors, you're left with
these options:

* Write perfect code every time.

* Write you own code scanner. Parse your code and process whatever tests
and checks you can use. This is very fruitful, but a ton of work. It's hard
to see anyone but a highly motivated individual or a large team doing it.

* Write very thorough test cases to generate realistic runtime conditions
to test your code. 4D doesn't have any real test harness available and it's
not the simplest environment to test anyway. I've seen some good efforts
and devoted quite a bit of time to this sort of thing myself. Again, price
of entry is higher than nearly any 4D shop can pay. (Yes, there is a
UnitTester component from V12 that can be converted...but it only aims to
solve some problems and you'll still need to retrofit zillions of white box
tests.)

* Run you code and deal with the errors when they crop up. At your
customers.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Converting Quick Reports from 4D 2004 to Modern Version

2017-08-02 Thread Douglas von Roeder via 4D_Tech
Tom:


Thank you for posting this info!


I'll run up a copy of V11 and convert them.




--
Douglas von Roeder
949-336-2902

On Wed, Aug 2, 2017 at 8:11 AM, Tom DeMeo via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Hi Doug,
>
>
> I had a conversion with this problem going from v11 to v15. There were
> numerous quick reports that were written in 2004 and were being used, but
> not re-saved in v11.
>
> Quick Reports written in 2004 would open v11 but not v15. If they are
> saved in v11, we found you can then open them in v15. I don’t know about
> v12-14, but some or all of those  might serve to bridge this gap too.
>
> We did not automate conversions because we had lots of users who stored
> quick report files locally. We sent out notes to have them prep their
> reports for the conversion.
>
>
>
> Tom DeMeo
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
>
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON Tools Was: Re: C-objects and memory use

2017-08-02 Thread Tom Swenson via 4D_Tech

FWIW, it sounds like the object notation in v16r4 is going to alleviate much of 
the pain in dealing with JSON objects..

JSON Validate, Collections and a NULL command!

http://blog.4d.com/en-whats-new-in-4d-v16-r4/




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

Re: Converting Quick Reports from 4D 2004 to Modern Version

2017-08-02 Thread Tom DeMeo via 4D_Tech
Hi Doug,


I had a conversion with this problem going from v11 to v15. There were numerous 
quick reports that were written in 2004 and were being used, but not re-saved 
in v11.

Quick Reports written in 2004 would open v11 but not v15. If they are saved in 
v11, we found you can then open them in v15. I don’t know about v12-14, but 
some or all of those  might serve to bridge this gap too.

We did not automate conversions because we had lots of users who stored quick 
report files locally. We sent out notes to have them prep their reports for the 
conversion.



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

RE: Encrypted Data at Rest

2017-08-02 Thread Chip Scheide via 4D_Tech
depending on the computer system.
This is built into (software) OS X it is called 'FileVault'.
I believe that Windows 7+ has a similar feature, but this might not be 
true at all, or only for newer (8 and or 10).

I do not have explicit experience (I'm sure Jody does), i would expect 
there to be some performance hit with Filevault, as it is software.


her is a link to an ARsTechnica thread about SSD encryption
https://arstechnica.com/civis/viewtopic.php?t=1243475

On Wed, 2 Aug 2017 14:50:24 +, Justin Will via 4D_Tech wrote:
> Jody,
> 
> Do you have a recommendation on a controller that does this well?
> 
> Thanks
> Justin
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Encrypted Data at Rest

2017-08-02 Thread Jody Bevan via 4D_Tech
Justin:

That is a requirement of Health Care Systems in Canada for more than 15 years. 
It is actually a good idea. Fortunately there is an ‘easy’ way to do it and it 
does not take once ounce of programming (not good for billable hours). The 
clients purchase the drive controllers and drives (if using existing servers) 
that encrypt all data on the drive. All servers we purchase now, have this 
hardware feature in them. This works with SSDs as well.

The speed is such that there even large sites do not notice a reduction of 
performance of the system.


Jody Bevan
ARGUS Productions Inc.
Developer

Argus Productions Inc. 


> On Aug 2, 2017, at 8:22 AM, Justin Will via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have had a request to have a system have all data at rest encrypted.  My 
> understanding is that they actually want the 4D datafile and backups 
> encrypted at all times.  Have others had to deal with this and if so what 
> options did you find available and what did you choose as your solution?
> 
> Thanks
> Justin Will

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

RE: Encrypted Data at Rest

2017-08-02 Thread Dennis, Neil via 4D_Tech
>  Have others had to deal with this and if so what options did you find 
> available and what did you choose as your solution?

The easiest is to turn on the drive encryption. However I also selectively 
encrypt more sensitive information so it is double encrypted.

Neil










Privacy Disclaimer: This message contains confidential information and is 
intended only for the named addressee. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please delete this email 
from your system and notify the sender immediately by replying to this email.  
If you are not the intended recipient you are notified that disclosing, 
copying, distributing or taking any action in reliance on the contents of this 
information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range 
of services to hedge funds, funds of funds and private equity funds.  Any tax 
advice in this communication is not intended to be used, and cannot be used, by 
a client or any other person or entity for the purpose of (a) avoiding 
penalties that may be imposed on any taxpayer or (b) promoting, marketing, or 
recommending to another party any matter addressed herein.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Encrypted Data at Rest

2017-08-02 Thread Justin Will via 4D_Tech
I have had a request to have a system have all data at rest encrypted.  My 
understanding is that they actually want the 4D datafile and backups encrypted 
at all times.  Have others had to deal with this and if so what options did you 
find available and what did you choose as your solution?

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

Re: Server Specs for 4Dv15/16 under Windows Server 2016

2017-08-02 Thread Milan Adamov via 4D_Tech

> On 1Aug, 2017, at 20:30, Ronnie Teo via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Hi Milan,
> 
> Thanks for your mail.  Could you please elaborate more about the significance 
> of the number of VMs on the same network interface?
> 
> I’m totally new to Windows Server 2016, so am quite clueless as to its 
> requirements….
> Also, say given a datafile file size of about 6GB, with about 30 users +/- at 
> any one time, what would you recommend by way of hardware specs for the 
> server and the amount of RAM to allocate?
> 

Hi Ronnie,

it has nothing to do with Windows Server 2016 you are going to use, or the 
“hardware” specs of your VM, you can always increase RAM or get “faster” 
processor. But your provider might put your VM on a hardware server with tens 
or maybe hundreds of other VMs, but only with few network cards. So, let say 
that your VM is using same network card as 10 more VMs doing 4D Server work 
with hundreds of 4D Client connections, suddenly you have almost the same 
situation as if your 4D Server is handling thousand or so connections, even 
worse, you don’t know and you can’t do nothing to increase performance on your 
own.

Milan


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