I0←{⎕IO←0 ⋄ ⍺←⊢ ⋄ ⍺ ⍵⍵ ⍵}
⍳I0 3
0 1 2
2⊃I0 'abcd'
c
Search found 31 matches
- Tue Dec 01, 2015 1:33 pm
- Forum: Language
- Topic: iota (can we play with...)
- Replies: 4
- Views: 16490
Re: iota (can we play with...)
You might like to use an operator to localise the use of origin 0.
- Thu May 29, 2014 9:15 am
- Forum: Language
- Topic: Operator each-nub
- Replies: 6
- Views: 21430
Operator each-nub
CPU cycles are often cheaper than development time. APL programs are prone to overcompute. q←⍎¨V←40⍴ '2+2' '+/⍳1E7' Let's execute each unique element only once. q≡{(⍎¨⍵)[⍵⍳⍺]}∘∪⍨ V 1 EEN←{(⍎¨⍵)[⍵⍳⍺]}∘∪⍨ ⍝ fn: execute each nub q≡EEN V 1 Execute is one function: an operator would make the technique use ...
- Fri May 09, 2014 10:21 am
- Forum: APL Chat
- Topic: A regular lightweight cleanup
- Replies: 1
- Views: 5872
Re: A regular lightweight cleanup
A correction: the ⎕R with the wrapp function captures attributes of the P but fails to preserve them. It should of course be:
wrapp←{'<p',(1 subpat ⍵),'>',NL,(72 8 wrap 2 subpat ⍵),NL,' </p>'}
- Thu May 08, 2014 1:35 pm
- Forum: APL Chat
- Topic: A regular lightweight cleanup
- Replies: 1
- Views: 5872
A regular lightweight cleanup
Here's a happy thing I stumbled across while cleaning up a thousand HTMs. The HTML is a mashup from multiple sources, including fragments of Word documents pasted in through a WYSIWYG editor. The target is clean structural HTML. Part of the task is to remove empty HTML elements. As the source has ...
- Tue Apr 29, 2014 3:23 pm
- Forum: APL Chat
- Topic: LoadXL¨ in 14-beta
- Replies: 1
- Views: 5745
Re: LoadXL¨ in 14-beta
Okay, just needs a delay in the loop to allow the OLEClient to subside gracefully.
- Tue Apr 29, 2014 3:08 pm
- Forum: APL Chat
- Topic: LoadXL¨ in 14-beta
- Replies: 1
- Views: 5745
LoadXL¨ in 14-beta
Function LoadXL from ws loaddata seems to get into a strange state under each . Dyalog APL/W Version 14.0.20815 Serial No : 501502 Unicode Edition Beta release Tue Apr 29 15:57:24 2014 clear ws )copy loaddata LoadXL C:\Program Files\Dyalog\Dyalog APL 14.0 Unicode\ws\loaddata saved Mon Mar 31 17:18 ...
- Wed Mar 19, 2014 11:38 pm
- Forum: MiServer
- Topic: Dragging and dropping
- Replies: 2
- Views: 10403
Re: Dragging and dropping
Update: the required ID is found by
req.GetData 'receiver'
- Tue Mar 18, 2014 10:01 pm
- Forum: MiServer
- Topic: Dragging and dropping
- Replies: 2
- Views: 10403
Dragging and dropping
I have multiple drop targets, and need to identify the element that triggered the call to APLJax. It looks as if I should be able to read its ID from declared public field what as illustrated in jqondemo.dyalog. I can certainly read its sibling field event . But trying to read what yields a value ...
- Tue Mar 11, 2014 4:12 pm
- Forum: APL Chat
- Topic: Batch tasks in Windows
- Replies: 3
- Views: 8997
Re: Batch tasks in Windows
Andy, thanks. Using 'Hidden' as below: ⎕CMD 'C:\domything.exe C:\to\this\file.dat' 'Hidden' returns execution immediately to APL, leaving the EXE to run. The CHM says of 'Hidden': Application is run in an invisible window. Might be useful to extend that: Application is run in an invisible window and ...
- Wed Mar 05, 2014 12:44 pm
- Forum: APL Chat
- Topic: Batch tasks in Windows
- Replies: 3
- Views: 8997
Batch tasks in Windows
What's the simplest way to launch a batch job in Windows from Dyalog? That is, execute a Windows shell command that will run to completion without further interaction with the Dyalog task that launched it.
(In APL+Win a left arg to ⎕CMD is all I need for the ⎕CMD to return immediately after launch.)
(In APL+Win a left arg to ⎕CMD is all I need for the ⎕CMD to return immediately after launch.)