Re: 4D Server crashing with MyConnect

2018-05-01 Thread Jim Labos - infobase via 4D_Tech
Are you checking on the mySQL server side to see what is going on there?

Restart mySQL?

If it was running that long without a hiccup it's probably not this but make
sure all the connections are closed and none left hanging open. We had that
problem a while back where we kept opening new connections and not closing
them. A long shot but you asked for some ideas.

Cheers

Jim Labos - infobase



-
Jim Labos - infobase
--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Testing for Null is superior to OB is defined

2018-05-01 Thread Chip Scheide via 4D_Tech
Kirk,
go pull a copy of my component Txtutl

there are a methods there which can parse any text.
They include the term "parse"
https://www.dropbox.com/sh/ntmvl7k6mt7czv7/AAB2bl8vu6RqFdJHCqF_2VHma?dl=0  


On Tue, 01 May 2018 20:31:26 +, Kirk Brooks via 4D_Tech wrote:
> Hi Julio,
> I was asking about how they are using Split string to parse a dot notation
> path into the value or containing object. Working this out was the real
> heavy lifting Canon did with his OBJ Module. It wasn't easy using the prior
> tool set.
> 
> I played with it for a couple of hours and have come up with these two
> methods. I'm sure this can be improved on.
> First is this method to split a string into a collection of property
> elements. I also split the collection indices into numbers. BTW - this can
> also be used to make JSON Pointers.
> 
> // Method: OBJ_parse_pathToCollection (text) => collection
> // $1 : dot notation path
> // $0 : collection of references
> C_TEXT($1;$path)
> C_COLLECTION($0;$myCol)
> C_LONGINT($i;$n)
> 
>  Case of
> : (Count parameters=0)
> : (Length($1)=0)
> Else
> $path:=Replace string(Replace string($1;"[";".");"]";"")
> $myCol:=Split string($path;".")
> For ($i;0;$myCol.length-1)
> If (Position($myCol[$i][[1]];"0123456789")>0)  // starts with a number
> $myCol[$i]:=Num($myCol[$i])
> End if
> End for
> End case
>   // 
> $0:=$myCol
> 
> 
> Next is the method to extract the value or containing object of a path from
> an object or collection.
> 
>   // Method: OBJ_resolve_path (ptr; text) -> object
>   // $1 : an object or collection
>   // $2 : path to value, object or collection to return
> 
>   // $0 : {"success":(null, true or false), "value": (null, object,
> collection or value)}
> 
> 
> C_POINTER($1)
> C_TEXT($2;)
> C_OBJECT($resultObj;$0)
> C_LONGINT($i;$n)
> C_COLLECTION($dataCol;$pathCol)
> 
> $pathCol:=OBJ_parse_pathToCollection ($2)
> $resultObj:=New object("success";Null;"value";Null)
> 
> $dataCol:=New collection($1->)
> $i:=0
> 
> Repeat
> Case of
> : (Value type($dataCol[0])=Is collection)
>   // this must be a number
> Case of
> : (Value type($pathCol[$i])#Is real)  //   then this is not valid
> $resultObj.success:=False
> TRACE
> : ((($dataCol[0].length)-1)<$pathCol[$i]])
> 
>  $resultObj.success:=False
> 
> : ($i=($pathCol.length-1))  // have reached the target
> $resultObj.success:=True
> $resultObj.value:=$dataCol[0][$pathCol[$i]]
> Else   //  go on to next property
> $dataCol.unshift($dataCol[0][$pathCol[$i]])
> End case
> : (Value type($dataCol[0])=Is object)
> Case of
> : (($dataCol[0][$pathCol[$i]])=Null)
> $resultObj.success:=False
> : ($i=($pathCol.length-1))  // have reached the target
> $resultObj.success:=True
> $resultObj.value:=$dataCol[0][$pathCol[$i]]
> Else   //  go on to next property
> $dataCol.unshift($dataCol[0][$pathCol[$i]])
> End case
> End case
> $i:=$i+1
> Until ($i>($pathCol.length-1)) | ($resultObj.success#Null)
> 
> $0:=$resultObj
> 
> 
> $resultObj is an approach I'm starting to like a lot. It's the only way to
> return any kind of value, an object or a collection. The 'success' property
> is easy to test. This method currently returns 3 success values: true (the
> path evaluated), false (it doesn't), or null which means it's not valid
> either.
> 
> I decided to use a pointer because I wanted to not have to determine the
> object type prior to calling the method - plus there would be two of them.
> Like I say, this can be improved.
> 
> It is quite a lot less code than Canon's method required. Plus this deals
> with all values and objects or collections as the source.
> 
> On Tue, May 1, 2018 at 7:39 AM Julio Carneiro via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Here is an example I’m using:
>> 
>>C_COLLECTION($aOrderByCols)
>> $aOrderByCols:=Split string($orderBy;"%";sk ignore empty
>> strings+sk trim spaces)
>> 
>> $orderBy is a text string with “%” separated terms, like “foo %bar%more
>> %%data”.
>> 
>> As a result of the statement above, $aOrderByCols will become:
>> [“foo”,”bar”,”more”,”data”], as spaces and empty items are trimmed.
>> 
>> That replaces a utility method í’ve had for decades.
>> 
>> julio
>> 
>>> On May 1, 2018, at 1:14 AM, Kirk Brooks via 4D_Tech <
>> 4d_tech@lists.4d.com> wrote:
>>> 
>>> Miyako,
>>> This occurred to me too. Sadly there's no example for that in the docs.
>>> Would you happen to have a bit of code showing how it's intended to be
>> used?
>>> 
>>> On Mon, Apr 30, 2018 at 2:22 PM Keisuke Miyako via 4D_Tech <
>>> 4d_tech@lists.4d.com> wrote:
>>> 
 the command "Split string", although generic,
 was specifically created to help parse dot notation.
 
 http://doc.4d.com/4Dv16R6/4D/16-R6/Split-string.301-3644822.en.html
 
>>> 
>>> --
>>> Kirk Brooks
>>> San Francisco, CA
>>> ===
>>> 
>>> *We go vote - they go home*
>>> **
>>> 4D 

Re: Testing for Null is superior to OB is defined

2018-05-01 Thread Kirk Brooks via 4D_Tech
Hi Julio,
I was asking about how they are using Split string to parse a dot notation
path into the value or containing object. Working this out was the real
heavy lifting Canon did with his OBJ Module. It wasn't easy using the prior
tool set.

I played with it for a couple of hours and have come up with these two
methods. I'm sure this can be improved on.
First is this method to split a string into a collection of property
elements. I also split the collection indices into numbers. BTW - this can
also be used to make JSON Pointers.

// Method: OBJ_parse_pathToCollection (text) => collection
// $1 : dot notation path
// $0 : collection of references
C_TEXT($1;$path)
C_COLLECTION($0;$myCol)
C_LONGINT($i;$n)

 Case of
: (Count parameters=0)
: (Length($1)=0)
Else
$path:=Replace string(Replace string($1;"[";".");"]";"")
$myCol:=Split string($path;".")
For ($i;0;$myCol.length-1)
If (Position($myCol[$i][[1]];"0123456789")>0)  // starts with a number
$myCol[$i]:=Num($myCol[$i])
End if
End for
End case
  // 
$0:=$myCol


Next is the method to extract the value or containing object of a path from
an object or collection.

  // Method: OBJ_resolve_path (ptr; text) -> object
  // $1 : an object or collection
  // $2 : path to value, object or collection to return

  // $0 : {"success":(null, true or false), "value": (null, object,
collection or value)}


C_POINTER($1)
C_TEXT($2;)
C_OBJECT($resultObj;$0)
C_LONGINT($i;$n)
C_COLLECTION($dataCol;$pathCol)

$pathCol:=OBJ_parse_pathToCollection ($2)
$resultObj:=New object("success";Null;"value";Null)

$dataCol:=New collection($1->)
$i:=0

Repeat
Case of
: (Value type($dataCol[0])=Is collection)
  // this must be a number
Case of
: (Value type($pathCol[$i])#Is real)  //   then this is not valid
$resultObj.success:=False
TRACE
: ((($dataCol[0].length)-1)<$pathCol[$i]])

 $resultObj.success:=False

: ($i=($pathCol.length-1))  // have reached the target
$resultObj.success:=True
$resultObj.value:=$dataCol[0][$pathCol[$i]]
Else   //  go on to next property
$dataCol.unshift($dataCol[0][$pathCol[$i]])
End case
: (Value type($dataCol[0])=Is object)
Case of
: (($dataCol[0][$pathCol[$i]])=Null)
$resultObj.success:=False
: ($i=($pathCol.length-1))  // have reached the target
$resultObj.success:=True
$resultObj.value:=$dataCol[0][$pathCol[$i]]
Else   //  go on to next property
$dataCol.unshift($dataCol[0][$pathCol[$i]])
End case
End case
$i:=$i+1
Until ($i>($pathCol.length-1)) | ($resultObj.success#Null)

$0:=$resultObj


$resultObj is an approach I'm starting to like a lot. It's the only way to
return any kind of value, an object or a collection. The 'success' property
is easy to test. This method currently returns 3 success values: true (the
path evaluated), false (it doesn't), or null which means it's not valid
either.

I decided to use a pointer because I wanted to not have to determine the
object type prior to calling the method - plus there would be two of them.
Like I say, this can be improved.

It is quite a lot less code than Canon's method required. Plus this deals
with all values and objects or collections as the source.

On Tue, May 1, 2018 at 7:39 AM Julio Carneiro via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Here is an example I’m using:
>
>C_COLLECTION($aOrderByCols)
> $aOrderByCols:=Split string($orderBy;"%";sk ignore empty
> strings+sk trim spaces)
>
> $orderBy is a text string with “%” separated terms, like “foo %bar%more
> %%data”.
>
> As a result of the statement above, $aOrderByCols will become:
> [“foo”,”bar”,”more”,”data”], as spaces and empty items are trimmed.
>
> That replaces a utility method í’ve had for decades.
>
> julio
>
> > On May 1, 2018, at 1:14 AM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Miyako,
> > This occurred to me too. Sadly there's no example for that in the docs.
> > Would you happen to have a bit of code showing how it's intended to be
> used?
> >
> > On Mon, Apr 30, 2018 at 2:22 PM Keisuke Miyako via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> the command "Split string", although generic,
> >> was specifically created to help parse dot notation.
> >>
> >> http://doc.4d.com/4Dv16R6/4D/16-R6/Split-string.301-3644822.en.html
> >>
> >
> > --
> > Kirk Brooks
> > San Francisco, CA
> > ===
> >
> > *We go vote - they go home*
> > **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > **
>
> --
> Julio Carneiro
>
>
>
>
>
> --
> Julio Carneiro
> jjfo...@gmail.com
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  

Re: 16.3 HF2 test of the new network layer

2018-05-01 Thread Sujit Shah via 4D_Tech
Very encouraging


On Wed, 2 May 2018 at 1:27 am, Paul Lovejoy via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks for sharing!
>
> Paul
>
> > On 1 May 2018, at 16:43, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > Over the weekend, we ran our production 4D Server using the new network
> layer. We ran from midnight Saturday until midnight Monday, and we peaked
> at about 145 users and 1200 processes.
> >
> > I'm very happy to say we had no issues at all! There wasn't a single
> helpdesk ticket filed against 4D for the entire weekend, and performance
> was excellent. It was great to see that the CPU usage of the main core on
> the server was in line with all the rest of the cores - it wasn't pegged
> constantly at 80% - 90%. This should really improve the number of requests
> per second that the server can process, and hopefully improve execution
> time of our triggers as well.
> >
> > We are going to run a full test in production tomorrow (600+ users,
> 3500/4000+ processes) -- if it's successful we will switch all our
> remaining systems over to the new network layer. I'll keep you posted!
> >
> > Jeff
> >
> >
> > Details:
> >
> > Server:
> >  4D Server 16.3 HF2 (build 221345) 64-bit
> >  Windows Server 2012 on a Dell PowerEdge Server, 3.4GHz Xeon 12-core,
> NVME RAID 10 SSDs
> >  10Gb Ethernet
> >
> > Clients:
> >  4D 16.3 build 219338 and 221345 32-bit
> >  macOS 10.12.6 and 10.13.4 (mostly Mac Minis and iMacs), Windows Server
> 2008R2 (about 8 VMs)
> >  Gigabit Ethernet
> >
> > We restrict wifi access to 4D Server to a handful of special cases, and
> only allow remote access to 4D Server via screen sharing (LogMeIn, RDP,
> etc.)
> > **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > 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)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

xxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Constants - Can I make a Date Constant?

2018-05-01 Thread Chip Scheide via 4D_Tech
well... that works... but is not quite what I had in mind  :)


On Tue, 1 May 2018 21:22:38 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 30 avr. 2018 à 21:33, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> for example : !00/00/00!
> 
> 
>   //KdateNull -> date
> c_date($0)
> $0:=!00/00/00!
> 
> -- 
> Arnaud de Montard
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://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: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Constants - Can I make a Date Constant?

2018-05-01 Thread Sujit Shah via 4D_Tech
:-)


On Wed, 2 May 2018 at 5:22 am, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> > Le 30 avr. 2018 à 21:33, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com>
> a écrit :
> >
> > for example : !00/00/00!
>
>
>   //KdateNull -> date
> c_date($0)
> $0:=!00/00/00!
>
> --
> Arnaud de Montard
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

-- 

xxx
"There must be ingenuity as well as intention, strategy as well as
strength. "
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Constants - Can I make a Date Constant?

2018-05-01 Thread Arnaud de Montard via 4D_Tech

> Le 30 avr. 2018 à 21:33, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> for example : !00/00/00!


  //KdateNull -> date
c_date($0)
$0:=!00/00/00!

-- 
Arnaud de Montard



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Image Madness

2018-05-01 Thread jdcryer--- via 4D_Tech
Cannon,

Really useful.  Thank you again...

> On 1 May 2018, at 20:00, 4d_tech-requ...@lists.4d.com wrote:
> 
> I’m not sure why that would be the case as it has worked for me. Perhaps a 
> clue it that my code only handles the 4 common cases. Could your picture be 
> one of the other four cases? Not sure. I can give you the site I found that 
> helped me understand this (to the small degree that I understand it!):
> 
>    >

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: 16.3 HF2 test of the new network layer

2018-05-01 Thread Paul Lovejoy via 4D_Tech
Thanks for sharing!

Paul

> On 1 May 2018, at 16:43, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Over the weekend, we ran our production 4D Server using the new network 
> layer. We ran from midnight Saturday until midnight Monday, and we peaked at 
> about 145 users and 1200 processes.
> 
> I'm very happy to say we had no issues at all! There wasn't a single helpdesk 
> ticket filed against 4D for the entire weekend, and performance was 
> excellent. It was great to see that the CPU usage of the main core on the 
> server was in line with all the rest of the cores - it wasn't pegged 
> constantly at 80% - 90%. This should really improve the number of requests 
> per second that the server can process, and hopefully improve execution time 
> of our triggers as well.
> 
> We are going to run a full test in production tomorrow (600+ users, 
> 3500/4000+ processes) -- if it's successful we will switch all our remaining 
> systems over to the new network layer. I'll keep you posted!
> 
> Jeff
> 
> 
> Details:
> 
> Server:
>  4D Server 16.3 HF2 (build 221345) 64-bit
>  Windows Server 2012 on a Dell PowerEdge Server, 3.4GHz Xeon 12-core, NVME 
> RAID 10 SSDs
>  10Gb Ethernet
> 
> Clients:
>  4D 16.3 build 219338 and 221345 32-bit
>  macOS 10.12.6 and 10.13.4 (mostly Mac Minis and iMacs), Windows Server 
> 2008R2 (about 8 VMs)
>  Gigabit Ethernet
> 
> We restrict wifi access to 4D Server to a handful of special cases, and only 
> allow remote access to 4D Server via screen sharing (LogMeIn, RDP, etc.)
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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: Import data in 4D format using XML

2018-05-01 Thread Lee Hinde via 4D_Tech
http://doc.4d.com/4Dv16R6/4D/16-R6.1660/Not-for-32-bit-versions_3546700.999-857020.en.html
 


Just swap the url to the language you want.

> On May 1, 2018, at 7:03 AM, Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> The link you have provided, unfortunately, is in Japanese ;-)

**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Image Madness

2018-05-01 Thread Cannon Smith via 4D_Tech
Hi Douglas,

I’m not sure why that would be the case as it has worked for me. Perhaps a clue 
it that my code only handles the 4 common cases. Could your picture be one of 
the other four cases? Not sure. I can give you the site I found that helped me 
understand this (to the small degree that I understand it!):



Good luck.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On May 1, 2018, at 1:25 AM, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I tried your code on the supplied image and had to swap the values for 6 & 8 
> as, after rotation, the image was upside down.

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

16.3 HF2 test of the new network layer

2018-05-01 Thread Jeffrey Kain via 4D_Tech
Over the weekend, we ran our production 4D Server using the new network layer. 
We ran from midnight Saturday until midnight Monday, and we peaked at about 145 
users and 1200 processes.

I'm very happy to say we had no issues at all! There wasn't a single helpdesk 
ticket filed against 4D for the entire weekend, and performance was excellent. 
It was great to see that the CPU usage of the main core on the server was in 
line with all the rest of the cores - it wasn't pegged constantly at 80% - 90%. 
This should really improve the number of requests per second that the server 
can process, and hopefully improve execution time of our triggers as well.

We are going to run a full test in production tomorrow (600+ users, 3500/4000+ 
processes) -- if it's successful we will switch all our remaining systems over 
to the new network layer. I'll keep you posted!

Jeff


Details:

Server:
  4D Server 16.3 HF2 (build 221345) 64-bit
  Windows Server 2012 on a Dell PowerEdge Server, 3.4GHz Xeon 12-core, NVME 
RAID 10 SSDs
  10Gb Ethernet

Clients:
  4D 16.3 build 219338 and 221345 32-bit
  macOS 10.12.6 and 10.13.4 (mostly Mac Minis and iMacs), Windows Server 2008R2 
(about 8 VMs)
  Gigabit Ethernet

We restrict wifi access to 4D Server to a handful of special cases, and only 
allow remote access to 4D Server via screen sharing (LogMeIn, RDP, etc.)
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Testing for Null is superior to OB is defined

2018-05-01 Thread Julio Carneiro via 4D_Tech
Here is an example I’m using:

   C_COLLECTION($aOrderByCols)  
$aOrderByCols:=Split string($orderBy;"%";sk ignore empty strings+sk 
trim spaces)

$orderBy is a text string with “%” separated terms, like “foo %bar%more %%data”.

As a result of the statement above, $aOrderByCols will become: 
[“foo”,”bar”,”more”,”data”], as spaces and empty items are trimmed.

That replaces a utility method í’ve had for decades.

julio

> On May 1, 2018, at 1:14 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Miyako,
> This occurred to me too. Sadly there's no example for that in the docs.
> Would you happen to have a bit of code showing how it's intended to be used?
> 
> On Mon, Apr 30, 2018 at 2:22 PM Keisuke Miyako via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> the command "Split string", although generic,
>> was specifically created to help parse dot notation.
>> 
>> http://doc.4d.com/4Dv16R6/4D/16-R6/Split-string.301-3644822.en.html
>> 
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

--
Julio Carneiro





--
Julio Carneiro
jjfo...@gmail.com



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Import data in 4D format using XML

2018-05-01 Thread Two Way Communications via 4D_Tech
Hi Keisuke,

The link you have provided, unfortunately, is in Japanese ;-)

Are we talking about the same command? Because in the v16R6 documentation, it 
says:

If you pass an empty string to fileName 
, IMPORT 
DATA displays the standard save file dialog box, allowing the user to define 
the name, type, and location of the import file. Once the dialog box has been 
accepted, the Document system variable contains the access path and the name of 
the file. If the user clicks Cancel, the execution of the command is stopped 
and the OK system variable is set to 0.

Turns out this is a bug in the 64bit versions of 4D (I have tested with 4D 
v16R5 and v16R6). It DOES work in 32bit versions; I have tested with 15.5.

The workaround is:

$doc:=Open document("") 
If (ok=1)
CLOSE DOCUMENT($doc)
IMPORT DATA(document;$ref)
End if 


Regards,

Rudy Mortier
Two Way Communications bvba 



> On 1 May 2018, at 00:47, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> the docs reads:
> 
> When you pass this parameter, the import is carried out directly, without any 
> user intervention (unless you use the * option, see below).
> 
> http://doc.4d.com/4Dv16R6/4D/16-R6.1660/Not-for-32-bit-versions_3546700.999-857020.ja.html
> 
>> 2018/04/29 20:39、Two Way Communications via 4D_Tech <4d_tech@lists.4d.com> 
>> のメール:
>> However, If I use it in 4D v16R5,  the ‘Import Data’ command does not open 
>> the file dialog, but returns ok=0?
>> Has anything changed?
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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: 64 bit 15.6 database on Mac OS X Server - sharing of our experience

2018-05-01 Thread Paul Lovejoy via 4D_Tech
Hi,

Yes, it looks just like that. I guess we’ll have to plan on moving to v16.

Cheers,


Paul


> Le 1 mai 2018 à 08:43, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> sounds similar to ACI0097483 (=ACI0097510)
> 
> https://bugs.4d.fr/fixedbugslist?version=16.3_HF2
> 
> good news I suppose is that it should not happen in v16...
> 
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> 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)
FAQ:  http://lists.4d.com/faqnug.html
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: Image Madness

2018-05-01 Thread Douglas Cryer via 4D_Tech
Cannon,

I tried your code on the supplied image and had to swap the values for 6 & 8 
as, after rotation, the image was upside down.

So
 : ($lOrientation=8)  //Left 90˚, so need to rotate right 90˚
  $gPicture:=Photo_Rotate ($gPicture;90)

   : ($lOrientation=6)  //Right 90˚, so need to rotate 270˚
  $gPicture:=Photo_Rotate ($gPicture;270)

Became
 : ($lOrientation=6)  //Left 90˚, so need to rotate right 90˚
  $gPicture:=Photo_Rotate ($gPicture;90)

   : ($lOrientation=8)  //Right 90˚, so need to rotate 270˚
  $gPicture:=Photo_Rotate ($gPicture;270)

I expect your code is right so does that mean the camera was inverted 
originally to create my odd results?

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com 


 



**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: 64 bit 15.6 database on Mac OS X Server - sharing of our experience

2018-05-01 Thread Keisuke Miyako via 4D_Tech
sounds similar to ACI0097483 (=ACI0097510)

https://bugs.4d.fr/fixedbugslist?version=16.3_HF2

good news I suppose is that it should not happen in v16...




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

64 bit 15.6 database on Mac OS X Server - sharing of our experience

2018-05-01 Thread Paul Lovejoy via 4D_Tech
Hi,

I’m sharing my experience with 64 bit 4D 15.5 on Mac OS X during a real life 
“test” from last Saturday to Monday morning.

We have a database of about 120gb with about 160 simultaneous users. It runs on 
a bi-processor xServe with SSDs and 64gb of RAM.

After testing for a few days, we installed 4D Server 64 bit and went live on 
Saturday, when only about 30 users are connected. Cache was set to 12 gb, 
leaving lots of free memory for the OS.

Everything seemed to go pretty smoothly and the database was very fast for 
queries, thanks to the added cache (12 gb instead of 1 gb on 32 bit). The 
database ran well over the weekend. 

On Monday morning the users began logging on. When 57 out of 160 users had 
connected, the database crawled to a near halt. No other users were able to 
connect and operations which would normally take fractions of a second were 
taking a minute or more… CPU and network usage seemed normal on the server. 
Sadly decided to abandon the upgrade and go back to the 32 bit server.

I’m guessing the failure of our upgrade is due to the new network layer.

We’re considering moving the DB to Windows in hopes that network performance 
will be better. 

Cheers,


Paul

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