[Jprogramming] How to insert SQL server datetime

2013-05-30 Thread Anssi Seppälä
Can anyone please post an example how to insert datetime values into a MS SQL Server table using J 6.02 ODBC library? I am stuck with Bad arguments error message. Thanks, Anssi -- For information about J forums see

[Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Ian Clark
Reinventing The (Square) Wheel Department. Problem: given a rectangle ABCD defined by four points on the xy-plane, detect whether a given point (a mouseclick) falls inside ABCD. Note that side AB isn't necessarily parallel to the x or y axes. Currently I'm using a cumbersome algorithm based on

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Stefano Lanzavecchia
Reinventing The (Square) Wheel Department. Problem: given a rectangle ABCD defined by four points on the xy-plane, detect whether a given point (a mouseclick) falls inside ABCD. This might help. Note that side AB isn't necessarily parallel to the x or y axes. But first you must rotate

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Stefano Lanzavecchia
Problem: given a rectangle ABCD defined by four points on the xy-plane, detect whether a given point (a mouseclick) falls inside ABCD. This might help. Forgive the missing link: http://dfns.dyalog.com/n_abc.htm -- Stefano [ Once you say you're going to settle for second, that's what

Re: [Jprogramming] How to insert SQL server datetime

2013-05-30 Thread bill lam
Ms sqlsvr should regard datetime as literal. Please google for the exact format. On 30 May, 2013, at 2:33 PM, Anssi Seppälä anssi.sepp...@enease.fi wrote: Can anyone please post an example how to insert datetime values into a MS SQL Server table using J 6.02 ODBC library? I am stuck with

Re: [Jprogramming] How to insert SQL server datetime

2013-05-30 Thread Lippu Esa
Hello Anssi, is this what you need (ch is an open odbc connection handle): 'create table #a(b datetime)' ddsql ch 'insert #a values (''20130529 14:04:01.11'')' ddsql ch Esa -Original Message- From: programming-boun...@forums.jsoftware.com

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Henry Rich
Complex numbers were 'invented' long before matrices, by Bombelli; see http://fermatslasttheorem.blogspot.com/2006/12/bombelli-and-invention-of-complex.html They were controversial for a long time. It is possible to create the rules of complex numbers without using square roots, by

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread Raul Miller
I imagine you are talking about the definition of m11 at http://www.jsoftware.com/help/phrases/date_time.htm In other words: 0: ~:/ .= 4 100 400_ |/ ] For example: (0: ~:/ .= 4 100 400_ |/ ]) 1900 2000 2001 2002 2003 2004 0 1 0 0 0 1 1900 is not a leap hear, but 2000 is. First off, I

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Bo Jacoby
Improvement: the nonzero condition ([:1|) can be written (1|)  , read  one is less than the absolute value. - Bo Fra: Bo Jacoby bojac...@yahoo.dk Til: programm...@jsoftware.com programm...@jsoftware.com Sendt: 10:47 torsdag den 30. maj 2013 Emne: Re:

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread Linda Alvord
Also: m11A=:0=4 | ] m11A 2013 0 m11A 2536 1 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Thursday, May 30, 2013 8:36 AM To: Programming forum Subject: Re:

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread Skip Cave
Why m11A=:0=4 | ] doesn't calculate leap years correctly: In the Gregorian calendar, a normal year consists of 365 days. Because the actual length of a sidereal year (the time required for the Earth to revolve once about the Sun) is actually 365.25635 days, a leap year of 366 days is used once

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Bo Jacoby
@Ian. Thanks for attributing to politeness what is actually a case of bad memory on my part. The winding number method has a reputation of being slow, but I think that the method is fast even if bad implementations ofthe method are slow. Consider an owllooking incessantly at a race car on a

Re: [Jprogramming] How to insert SQL server datetime

2013-05-30 Thread Anssi Seppälä
Thanks. -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Lippu Esa Sent: 30. toukokuuta 2013 14:08 To: 'programm...@jsoftware.com' Subject: Re: [Jprogramming] How to insert SQL server datetime Hello Anssi,

Re: [Jprogramming] Verifying a mouseclick is inside a rectangle

2013-05-30 Thread Ian Clark
@Stefano - Affine transformation --that's it! And the programming technique I was thinking of is called an Augmented Matrix: http://en.wikipedia.org/wiki/Augmented_matrix I'll compare it for speed and simplicity with coordinate geometry with complex numbers -- I fear though the latter will

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread Linda Alvord
This seems to work: YEAR=:1900 2000 2001 2002 2003 2004 f=: 13 :'(0=4|y)#y' g=: 13 :'((400|f y)e.0 4)#f y' g YEAR 2000 2004 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread elton wang
Thanks.  Is the any advantage of  ~:/ .= over ~:/ @:= here in m11?  From: Raul Miller rauldmil...@gmail.com To: Programming forum programm...@jsoftware.com Sent: Thursday, May 30, 2013 8:35 AM Subject: Re: [Jprogramming] Dot conjunction in the leap year verb

Re: [Jprogramming] Dot conjunction in the leap year verb

2013-05-30 Thread Roger Hui
That phrase is mine and embodies some history. When I started in APL decades ago I found it amusing to find novel inner products, and the one used to find leap years is ≠.= in APL, not-equal dot equal. The phrase found its way into the J phrase book by translation from APL. There was no @ or @: