Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Linda Alvord
a.i.'CRXO' 67 82 88 79 67 82 88 79{a. CRXO Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming- boun...@forums.jsoftware.com] On Behalf Of Ganesh Rapolu Sent: Sunday, October 20, 2013 11:56 PM To: programm...@jsoftware.com Subject: Re: [Jp

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Ganesh Rapolu
After much effort, I could not find a correct solution different from yours. On Sun, Oct 20, 2013 at 5:33 PM, June Kim (김창준) wrote: > Yeah. I suggest other people to test their solutions against mine (maybe > with >:i.1000) or (] -: u inv@u). > > Pascal, what's the definition for deb? > > And I

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread 김창준
Yeah. I suggest other people to test their solutions against mine (maybe with >:i.1000) or (] -: u inv@u). Pascal, what's the definition for deb? And I'd like to see your description for correcting expressed in J. :) On Mon, Oct 21, 2013 at 11:48 AM, Pascal Jasmin wrote: > we have kind of the

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Pascal Jasmin
we have kind of the same answer, but they are both wrong.  efn 26 -> Z.    ('ZABCDEFGHIJKLMNOPQRSTUVWXYZ' deb@:{~ (26)&#.^:_1) 26 AZ    ('ZABCDEFGHIJKLMNOPQRSTUVWXYZ' deb@:{~ (26)&#.^:_1) 27 AA    ('ZABCDEFGHIJKLMNOPQRSTUVWXYZ' deb@:{~ (26)&#.^:_1) 26^2 AZZ    ('ZABCDEFGHIJKLMNOPQRSTUVWXYZ' deb@:{

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Ganesh Rapolu
My previous solution fails for multiples of 26. Here is the corrected version. base26 =. 26&#. alph =. 'A' , a. {~ (a. i. 'A') + i.26 efn =. (base26^:_1) { alph"_ nfe =. [: base26 alph&i. efn 65535 CRXO nfe 'CRXO' 65535 efn 26 AA On Sun, Oct 20, 2013 at 4:13 PM, Pascal Jasm

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Pascal Jasmin
maybe a silly version of efn:    (' ABCDEFGHIJKLMNOPQRSTUVWXYZ' deb@:{~ (10 $ 26)&#:) 65535 CRXO has 10 letter maximum - Original Message - From: June Kim (김창준) To: Programming forum Cc: Sent: Sunday, October 20, 2013 8:52:03 PM Subject: [Jprogramming] converting excel column name to/

Re: [Jprogramming] converting excel column name to/from number

2013-10-20 Thread Ganesh Rapolu
base26 =. 26&#. alph =. ' ' , a. {~ (a. i. 'A') + i.26 efn =. base26^:_1 { alph"_ nfe =. [: base26 alph&i. efn 65535 CRXO nfe 'CRXO' 65535 On Sun, Oct 20, 2013 at 3:52 PM, June Kim (김창준) wrote: > Hi > > A SW dev company posted its hiring post on its site and there is a coding

[Jprogramming] converting excel column name to/from number

2013-10-20 Thread 김창준
Hi A SW dev company posted its hiring post on its site and there is a coding program for the applicants. You can choose any language you want. The problem is: Write a code that converts an order number to the excel column name. The number starts from 1. e.g. 1->A, 2->B, 26->Z, 27->AA, ... Havi

Re: [Jprogramming] How to make this conjunction tacit

2013-10-20 Thread Pascal Jasmin
a follow up to the proposal of: (a a a c a) being treated as a conjunction 2 : 'u a a a c v a' This seems like a weird and unnecessary syntax error (a c v) as in: ifitems =: ([`)@.(0<#) its fixed by doing (a (c v)) as in:  ([`)(@.(0<#)) It seems unnecessary in that (a c v) or (a c n) can only

Re: [Jprogramming] datetime utc and portability

2013-10-20 Thread Pascal Jasmin
Should I understand that time in unix returns utc time, and does 6!:0 return utc time on those systems? An update to my previous additions to datetime.ijs, I recommend the following: Now_z_ =: 6!:0@:(''"_) for some reason, 6!:0 can only accept null as a y argument. I would assume the code for 6