(please post to j general forum)
You should run qtdemo instead.
menu | help | studio | qt demos
Чт, 17 июл 2014, Jerrold написал(а):
> I am new to J and am going through the demos trying to get a better
> understanding of the language. So far I can execute (and study) all of the
> demos (excep
I am new to J and am going through the demos trying to get a better
understanding of the language. So far I can execute (and study) all of
the demos (except plot.ijs) via the following:
loadfile =: (0!:1) & <
loadfile 'C:\Users\Owner\j64-802\addons\demo\datetime.ijs'
that dem
Examples ... Forgive iphone typos...
Open, close of prices and range...
nos=.2 3 5 8 13 21
openclose=.{. , {:
range=.>./ - <./
openclose nos
2 21
range nos
19
Statistics (original courtesy of Keith Smillie, these are broken down)
am =: +/ % # NB. Arithmetic mean
gm =: # %: */
'Pascal Jasmin' asked:
>what verb v (or I guess adverb is ok) could I use to get
>
> i.2 3 2
> 0 1
> 2 3
> 4 5
>
> 6 7
> 8 9
>10 11
>
>0 1 1 v i. 2 3 2
>0 1
>8 9
>10 11
So you want some bastard item merged out from the original ones.
This is exactly what monadic } will do, the
A nice one is histogram:
hist =: ~. ,. #/.~
hist 4 2 5 4 2 6 1 5 2 6 2
4 2
2 4
5 2
6 2
1 1
It's weird to ask for an example of a train since forks are such a
common part of J. If you look at almost any substantial piece of code
you'll be swimming in them in short order.
Marshall
On Wed, J
Dan, How about the the forks in the function to delete blanks which Erling
provided recently:
f=:[: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:) }. ]) ([: (] +. $ {. 1 , }:)
' ' ~: ]) # ]
5!:4 <'f'
-- [:
│ -- ' '
│-+-
({.,&< }.) ;/ i.4
┌───┬───┐
│┌─┐│┌─┬─┬─┐│
││0│││1│2│3││
│└─┘│└─┴─┴─┘│
└───┴───┘
,&< provides a consistent result whether or not argument is boxed items.
Which made me wonder, why is split defined as with ,&< instead of the
simpler ; -- or so it seems?
--
last1=: $ #: , i: 1:
bar
1 1 0 0
1 0 1 0
0 1 1 1
1 0 1 0
1 1 1 0
1 1 1 0
last1 bar
1 2 2
On 2014.07.16 13:26:38, you,
the extraordinary 'Dan Baronet' via Programming, spake thus:
> I am looking for good examples of use of trains.
> Apart from the class
It can be useful for testing equivalency
(({.;}.) -: split) 'abcd'
1
(({.;}.) -: split) (1 2 3 4)
1
(({.;}.) -: split) (i. 2 3 4)
1
Which made me wonder, why is split defined as with ,&< instead of the
simpler ; -- or so it seems?
@Raul - the intersect example was quite interesting to m
I don't care.
Good example.
/D
On Wednesday, July 16, 2014 6:29:48 PM, Raul Miller
wrote:
Do you care what the trains are used for?
One of the classic trains is set intersection:
intersect=: [ -. -.
Thanks,
--
Raul
On Wed, Jul 16, 2014 at 4:26 PM, 'Dan Baronet' via Programming
wrote
Yes, I got as far as
2#2#"1#: dfh;.1 ' FF 81 BD A5 A5 BD 81 FF'
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1
1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1
1 1 0 0
spoiling quiz with answer already, neat short fork.
zoom =: [ # #"1
- Original Message -
From: 'Pascal Jasmin' via Programming
To: Programming forum
Cc:
Sent: Wednesday, July 16, 2014 6:08:28 PM
Subject: [Jprogramming] a zoom function (doubling points accross rows and
columns)
Do you care what the trains are used for?
One of the classic trains is set intersection:
intersect=: [ -. -.
Thanks,
--
Raul
On Wed, Jul 16, 2014 at 4:26 PM, 'Dan Baronet' via Programming
wrote:
> I am looking for good examples of use of trains.
> Apart from the classic +/ % #, I can't thin
there are too many ways to write this function, and there is probably a way
that is better than what I could think of.
#. inv dfh &> ' 'cut 'FF 81 BD A5 A5 BD 81 FF'
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 1
1 0 1 1 1 1 0 1
1 0 1 0 0 1 0 1
1 0 1 0 0 1 0 1
1 0 1 1 1 1 0 1
1 0 0 0 0 0 0 1
1 1 1 1 1
Sorry, in the above post, I was referring to forks.
Although most seem to be fond of forks, I have found hooks to be more
useful and subtle (for my needs anyway). Tracy gave a great example.
Basically the monadic case of the hook can be thought of as any variable
combined with itself in some way
How about "split":
{. ,&< }.
?
On Wed, Jul 16, 2014 at 5:12 PM, Alex Giannakopoulos <
aeg...@blueyonder.co.uk> wrote:
> I suppose the most useful, from a beginner's point of view, is the cap
> fork, e.g.
> [: *: sin
> which allows composition, and is equivalent to
> *: @ sin
> Some people pre
I suppose the most useful, from a beginner's point of view, is the cap
fork, e.g.
[: *: sin
which allows composition, and is equivalent to
*: @ sin
Some people prefer this former notation as clearer than the latter.
So,
sin =: 1&o.
cos =: 2&o.
(([: *: sin) + [: *: cos) 9876543210
1
Basic
Among my favorites is filter, a.k.a. copy-where. It's any hook where the
left tine is Reflexive Copy and the right is a qualifying boolean test.
There are many examples at jsoftware.com
retain_odd =: #~ 2&|
--
T
On Jul 16, 2014 4:26 PM, "'Dan Baronet' via Programming" <
programm...@jsoftware.com>
I love forks, and they are useful for everything
to use a traditional language example
a =. (x) f y NB. function of 1 or 2 arguments passed to function. assign to
temp var a
b =. (x) g y NB. Other function using passed arguments
c =. b h a NB. combine the above 2 results with h function.
I am looking for good examples of use of trains.
Apart from the classic +/ % #, I can't think of many more.
Anyone with some examples? They can be of any length.
/Dan
--
For information about J forums see http://www.jsoftware.com/f
Dear All
Please do not use the programming forum for bug reports, see
http://www.jsoftware.com/jwiki/System/BugReports. Thanks.
Chris
--
For information about J forums see http://www.jsoftware.com/forums.htm
Responded on general...
On Wed, Jul 16, 2014 at 6:11 AM, Björn Helgason wrote:
> I have been working with qt forms and a strange behaviour happened with the
> editor - w8 64 bit.
>
> If I open a file it seems to go into a loop.
>
> It seems to be related to snap/.snp/
>
> Can I delete
It is mentioned in manifest of lapack but perhaps it cannot be shown in
android. It should offer advice as what you suggested.
If you installed addons inside qt demo, it will execute that command for
you.
pacman lacks post-installation script to execute extra commands.
On Jul 16, 2014 8:53 PM,
I have been working with qt forms and a strange behaviour happened with the
editor - w8 64 bit.
If I open a file it seems to go into a loop.
It seems to be related to snap/.snp/
Can I delete those lines?
--
For informat
Thanks for the suggestion, that indeed fixed it!
I don't remember doing this before, maybe I have a physical memory leak…
Even so, shouldn't this be handled by the installation of the package, or
at least have a more user-friendly suggestion, instead of just crashing?
Kind regards,
Jan-Pieter
On 1
Kip and Erling wrote f and g . Both are written in simple J . Now work
backwards to provide the explicit expressions to provide each one.
A=:' ads sd s '
g=: 2 }. [: (#~ ((' ' ~: {:) ,~ [: -. ' ' -:"1 }: ,. }.)) 'z ' , ]
f=:[: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:
> /data/data/com.jsoftware.android.qtide/bin/jconsole ~addons/ide/jhs/core.ijs
> -js " init_jhs_'' "
You should first install an app (if not yet) called "android terminal
emulator". Type inside that terminal, or it has an option to set it
as the first command line.
On Wed, Jul 16, 2014 at 5:23
Is this what I would enter in chrome?
/data/data/com.jsoftware.android.qtide/bin/jconsole ~addons/ide/jhs/core.ijs
-js " init_jhs_'' "
Linda
Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam
Sent: Tu
i.
i.
DropRedundantBlanksM
[: ((' ' = {.) }. ]) [: ((_1 * ' ' = {:) }. ]) ([: (] +. $ {. 1 , }:) '
' ~: ]) # ]
/Erling
On 2014-07-15 22:43, David Lambert wrote:
Each j verb (unless locked, I presume) tells its definition. One of
my favorite j features.
f''
hi world!
hi world!
hi world!
29 matches
Mail list logo