] Unboxing problem
Hi Esa,
I think that monadic ; (Raze) is what you are looking for.
]a=.1 3 8;6 9;2 4;5;0;7
┌─┬───┬───┬─┬─┬─┐
│1 3 8│6 9│2 4│5│0│7│
└─┴───┴───┴─┴─┴─┘
; a
1 3 8 6 9 2 4 5 0 7
Cheers, bob
> On Mar 9, 2021, at 20:51, Lippu Esa wrote:
>
> ]a=.
Hello everybody
Every now and then even after all these years I stumble into something that
should be simple but I just don't get it. It must be due to my still so sadly
shallow knowledge of J. Please excuse me. I don't post my current solution here
- it has kludge written all over it.
So, I n
Hello
I played some years ago with 2D rotation as part of general linear mappnigs
with complex numbers.
A small demo below.
Esa
NB. ID rotdemo.ijs v0.0 28.06.17
NB. NO rotate some points
load 'graph'
tographcoord=:[:_0.98&+1.96&*
randompts=. 3 : 0
(y,2) $ tographcoord ?(+:y) #0
)
rot=: 4
Hello
It is not expensive if an in place assignment can be made:
a=.i.1e7
ts '(_999+1000{a) 1000 }a'
0.07655064 134219392
ts 'a=.(_999+1000{a) 1000 }a'
0.0177 1792
Esa
-Original Message-
From: Programming On Behalf Of
pietdion
Sent: Sunday, October 25, 2020 9:58 AM
To: Progr
Thank you Henry for the solution, also for the sort tip! This particular case
had three sets with less than 40 members.
Actually I was checking for primary key existence differences in three SQL
database environments. An ETL consultant complained about slow network
performance but it turned out
Hi Everybody!
I need to compare 3-4 sets (boxed lists of literals) for set membership
differences. This makes 3 pairwise comparisons with 3 sets and six comparisons
with four set.
It would be nice to be able to use Cartesian product to make a nxn table for
visual reasons (in my case the differ
Hello Bo,
Is this what you need?
f=:,"_ 0
1 2 7 f 30 40
1 2 7 30
1 2 7 40
Esa
-Original Message-
From: Programming On Behalf Of 'Bo
Jacoby' via Programming
Sent: Wednesday, May 13, 2020 11:11 AM
To: Programming Forum
Subject: [Jprogramming] Please help
How to define a function f such
Hello Frank
Make a shortcut for
C:\J901\bin\jbreak.bat
(your directory of choice).
You can get the yellow icon from directory
C:\J901\bin\icons
Esa
-Original Message-
From: Programming On Behalf Of Frank
Hamilton
Sent: Wednesday, April 22, 2020 3:49 PM
To: programm...@jsoftware
Also it is a good thing if you can plot the function for visual inspection.
t. Esa
-Original Message-
From: Programming On Behalf Of Henry
Rich
Sent: Friday, February 7, 2020 12:18 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Derivatives
Newton's method is good for fina
Hello Brian and others,
After finding the first root x1 you can deflate the original equation by
dividing it by (x-x1) .
Esa
load'math/calculus'
Newton =: adverb : ']-u%(u deriv_jcalculus_ 1)'(^:_)("0)
(+:-^~) Newton 0.5
0.346323
((+:-^~)%-&0.346323) Newton 1
2
-Original Message--
mp;data=01%7C01%7C%7C1f66023d8bde4b3d86ed08d7aa8a49c6%7C5090e269dbea4e98a9aa3e70be5890f7%7C0&sdata=0OvS4sCtmBm0PVIyoL%2BdQVrW5yMyXB18YagG10Ycs80%3D&reserved=0>.
On Wed, Feb 5, 2020 at 1:57 PM Lippu Esa wrote:
> If I remember correctly you should deflate the original equation by
> dividing it by x-x1 where x1
If I remember correctly you should deflate the original equation by dividing it
by x-x1 where x1 is the first root found in order to find x2 the second root.
Esa
Sent from my Samsung Galaxy smartphone.
Original message
From: Skip Cave
Date: 2/5/20 21:49 (GMT+02:00)
To: "
Hello
I noticed that 1!:44 (Posix chdir) doesn't report failure in J807. Shouldn't it
do that?
I have J9 at home, haven't tried that yet.
Esa
1!:44 'c:/mydir'
1!:43 ''
c:\mydir
1!:44 'c:/fakedir' NB. nonexistent directory. No error message, current
working directory stays the same.
forum
Subject: Re: [Jprogramming] plot fails every now and then
Please see if you can provide a sequence of steps that reproduce the
problem, so we can track it down. Thanks.
On Thu, Apr 11, 2019 at 12:12 AM Lippu Esa wrote:
> Thanks Bill!
>
> I got the error again and tried wd
d commands and should reset to a clean state.
This does not fix the problem but may be better than reset a new J session.
On Mon, Apr 8, 2019, 1:37 AM Lippu Esa wrote:
> Hello Everybody,
>
> I have been suffering from a strange problem with the plot verb for a long
> time.
>
>
Hello Everybody,
I have been suffering from a strange problem with the plot verb for a long time.
Every now and then the plot verb starts to fail no matter how simple plot I
try. Even this fails
plot i.5
|domain error: chkgl2
| glsel PId
Restating J always fixes the problem. Currently
oblem
in linux, but windows does require that --no-check-certificate parameter.
For now, I restored http so it should work for you without that change.
On Sun, Mar 24, 2019 at 12:34 PM Lippu Esa wrote:
> Hello,
>
> I seem to have certificate problem while upgrading the JE. Should I just
Hello,
I seem to have certificate problem while upgrading the JE. Should I just add
the wget --no-check-certificate parameter?
Best Regards,
Esa
load 'pacman'
je_update_jpacman_ ''
http://www.jsoftware.com/download/jengine/j807-release/windows/j64/j.dll
Connection failed: --20:24:19--
htt
is a quick and dirty way:
;(],&LF)&.> 'Test';'ing';'elephant'
Cheers,
David
On 3/18/2019 09:26, Lippu Esa wrote:
> Hello,
>
> I need to write out a text file with variable length lines and no trailing
> spaces. I can do it externally with sed
Hello,
I need to write out a text file with variable length lines and no trailing
spaces. I can do it externally with sed but I'd prefer do it the J way.
However, I can't figure it out. Any help would be greatly appreciated.
Esa
require '~addons/general/misc/format.ijs'
1!: 44 'c:/temp'
And @ resembles the circle notation of function composition:
( https://en.wikipedia.org/wiki/Function_composition and
https://en.wikipedia.org/wiki/Function_composition_(computer_science) )
Esa
-Original Message-
From: Programming On Behalf Of Henry
Rich
Sent: Tuesday, September 11, 2
Just a test.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
3a is still slower than comb, when I time it, for y>10)
Thanks,
--
Raul
On Wed, Nov 1, 2017 at 4:52 PM, Lippu Esa wrote:
> Yes, interesting! Thank you Linda.
>
> Just for practice, I tried to isolate the common part: [: #: [: i. 2 ^ ] but
> had to use a noun as didn't
Yes, interesting! Thank you Linda.
Just for practice, I tried to isolate the common part: [: #: [: i. 2 ^ ] but
had to use a noun as didn't manage to find a tacit solution.
comb3=:([ = [: +/"1 a) ([: |. [: I. #) a=.[: #: [: i. 2 ^ ]
Anyone?
Esa
-Original Message-
From: Programming [ma
Hi Skip
For the tasks 1. and 2. you can write:
require 'plot'
]a=.0 0, 2 _3, _1 2, 1 1,_1 _2,: 3 4
pd 'reset;type marker;color red'
pd <"1|: 3{.a
pd 'color blue'
pd <"1|: 3}.a
pd 'show'
but I don't know how to plot points in 3D in J. I have done rotating only in 2D
and played in 3D by rotating
Hi Gilles!
Thank you for a thorough post. Sorry about my redundant message.
I should have known better to read the thread completely before responding.
This forum works so fast, thanks to all!
Anyways, a good exercise for me.
Esa
-Original Message-
From: Programming [mailto:programming
This is nice!
You can easily make a distance table:
(0 0, 2 _3 ,: _1 2) dis/ 1 1,_1 _2,:3 4
1.41421 2.23607 5
4.12311 3.16228 7.07107
2.23607 4 4.47214
and reflex:
dis/~ 1 1,_1 _2,:3 4
0 3.60555 3.60555
3.60555 0 7.2111
3.60555 7.2111 0
The tacit version
t combination.
>>> [w=:v >> NB. Sort to display nicely
>>> sort ~. w
>>>
>>> Cheers,
>>>
>>> Erling Hellenäs
>>>
>>>
>>>> Den 2017-10-26 kl. 07:07, skrev 'Skip Cave' via Programming:
>>>>
Hello,
I get the following with the partition verb I posted last Thursday (J8.06 and 4
core 2.9GHz CPU and 16GB RAM):
par2=: 4 : 0
a=.(y#x) #: i. x^y
sort ~.((x=#@~."1 a)#a) mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of 'Skip Cave' via Programming
Sent: Wednesday, October 25, 20
Bell=: {:@(+/\@(,~{:)@]^:[ 1:)
Bell 8
21147
timespacex 'Bell 8'
6e_6 2048
Thanks,
--
Raul
On Thu, Oct 19, 2017 at 5:11 PM, Lippu Esa wrote:
> I used par2 to generate bell numbers (
> https://en.wikipedia.org/wiki/Bell_number ) from 1 up :
>
> bell=.+/@(>:@i.#@pa
hat.
Esa
-Original Message-
From: Lippu Esa
Sent: Thursday, October 19, 2017 11:45 PM
To: programm...@jsoftware.com
Subject: RE: [Jprogramming] Partitions
Cool.
If we relax the requirement that the order of the items is preserved we get
more solutions (my clumsy solution):
par2=: 4 :
Cool.
If we relax the requirement that the order of the items is preserved we get
more solutions (my clumsy solution):
par2=: 4 : 0
a=.(y#x) #: i. x^y
sort ~.((x=#@~."1 a)#a) mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of Henry Rich
Sent: Thursday, October 19, 2017 5:20 PM
To: pr
I think too. Here is the smallest eigenvalue of a:
require 'math/lapack/geev'
ev=.geev_jlapack_ a
{.sort|>1{ev
6.83897e_14
Esa
-Original Message-
From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of 'Jon Hough' via Programming
Sent: Friday, July 28
s.
Cheers, bob
> On Jul 14, 2017, at 9:16 AM, Lippu Esa wrote:
>
> Thank you Raul for the explanation of the '' on the left hand side.
>
> I don't know why I used jwplot - actually my own plotting class is derived
> from jzplot.
>
> However, in the beg
To: Programming forum
Subject: Re: [Jprogramming] plot with two windows?
''conew'jwplot' runs create_jwplot_ (the constructor) in the newly
created object (in other words, it does a reset for you).
FYI,
--
Raul
On Fri, Jul 14, 2017 at 11:03 AM, Rudolf Sykora wrote:
>
Hello,
You can use plot object:
load 'plot numeric'
p1=.''conew'jwplot'
pd__p1 steps _1 1 10
pd__p1'title plot 1;show'
p2=.''conew'jwplot'
pd__p2 steps 4 12 10
pd__p2'title plot 2;show'
NB. cleanup later
destroy__p1 ''
destroy__p2 ''
BTW, multiplot is also cool.
Esa
-Original Message-
ntegration.
can you check whether config/base.cfg had been loaded?
Вт, 14 мар 2017, Lippu Esa написал(а):
> Hello,
>
> I tried to write my plot to a pdf file with the pd verb but it fails now.
>
> pd 'pdf h:/myplot.pdf'
> |stack error: PDFReader
> | PDFReader
Hello,
I tried to write my plot to a pdf file with the pd verb but it fails now.
pd 'pdf h:/myplot.pdf'
|stack error: PDFReader
| PDFReader=.nox{::PDFReader_j_;PDFReader_nox_j_
I don't know when it has stopped working. The config/base.cfg file says:
PDFReader=: 'C:/Program Files (x86
Hello,
I get this too every now and then. If I paste the boxed data to an editor (MKS
Toolkit viw for me) and copy and paste it from there then the boxed display is
fine.
I haven't had time and patience to sort out what is going on here.
Best Regards,
Esa
-Original Message-
From: Prog
0 360 0
180 0 720
Any use?
Mike
On 12/02/2017 08:06, Lippu Esa wrote:
> ]data=. 5 3 $ 90 60 90 90 90 30 60 60 60 60 60 90 30 30 30
>
> mean=: +/%#
> mp=: +/ . *
> covmat=: ((mp~|:)(-"1 mean))%# NB. divede by n not n-1 to comply with the
> example
---
This email has
Hello Everybody,
Just when I thought I was out of the hook/fork fog they pulled me back in.
I was trying to construct a verb for a covariance matrix:
http://stattrek.com/matrix-algebra/covariance-matrix.aspx
]data=. 5 3 $ 90 60 90 90 90 30 60 60 60 60 60 90 30 30 30
mean=: +/%#
mp=: +/ . *
c
Test message. please ignore.
--
For information about J forums see http://www.jsoftware.com/forums.htm
Hello,
Somehow I am not able to make any posts in the forumn right now. Some piece of
software says that I am phising.
If this message reaches the Forum please ignore it.
Esa
--
For information about J forums see http://www.jso
Please ignore.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
Many thanks to the Team for the effort! Everything works well and fast. Great
work!
Esa
-Original Message-
From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf
Of Eric Iverson
Sent: Monday, December 19, 2016 5:24 PM
To: Programming forum
Subject: [Jprogramming
Hi Bo,
I came up with this. The shape is 5 3 5, though.
T=:([,]) $"_ 0 [:i.]
3 T 5
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
2 2 2 2 2
2 2 2 2 2
2 2 2 2 2
3 3 3 3 3
3 3 3 3 3
3 3 3 3 3
4 4 4 4 4
4 4 4 4 4
4 4 4 4 4
Esa
-Original Message-
From: Programming [mailto:pr
4.10
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Double quotes in wd child class table data
You may try toDEL
toDEL=: [: ; (DEL&, @ (,&DEL)) each
datt=. , ('"one"dq"';'"two"';'"three"') ,.3j0": each
t;';'"three"'),.3j0": each <"(0) i.3wd'pc test'
|ill-formed number
But you can quote for wd using * and this kind of quoting continues to
the end of the array being passed to wd. This is mentioned in the
first paragraph at
http://www.jsoftwar
Hello All,
Unfortunately sometimes I get double quotes (") in my data (from Windows Event
Log, for example).
I can't find my way to put it into a wd table control. Doubling the double
quotes does not work as it is reserved for a missing value.
NB. deb from the stdlib
dat0=:deb,>('"one"';'"two"
case is so frequent there's a built in
conjunction. Read "but first",
x f&g y
or
x f&:g y
the difference being rank. Add but first square:
4 +&: *: 5
41
On 12/03/2015 10:05 PM, programming-requ...@forums.jsoftware.com wrote:
> Date: Fri, 4 Dec 20
Hello everybody,
I realized with some shame that I haven't written a single J conjunction -
ever. Some adverbs, yes, but they too are newish.
I have a recurring need for sentences like (f x) g f y where verb f is applied
to nouns x and y and dyadic verb g is then applied to the two results.
an
Hi everybody.
Having a history with languages like Fortran I find expressions with variables
natural to read. To read tacit code can be quite hard for me. But you get
better with time. And you can always build verbs for subexpressions to improve
readability. Comments don't hurt either :) .
cr
Still testing, sorry. This will be the last one.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
Just testing - please ignore.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
A real number equals its conjugate, so (~:+) works too:
]A=:(i:2)j./i:2
_2j_2 _2j_1 _2 _2j1 _2j2
_1j_2 _1j_1 _1 _1j1 _1j2
0j_2 0j_1 0 0j1 0j2
1j_2 1j_1 1 1j1 1j2
2j_2 2j_1 2 2j1 2j2
(~:+) A
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1
1 1 0 1 1
Esa
-Original Message-
Hi Devon!
Both look fine for me. Using our corporate Outlook client (Office Professional
Plus 2010).
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Devon McCormick
Sent: 4. marraskuuta 2014 02:28
To:
Don't know if this is a good example but I've found OOJ extremely useful when
working with databases.
My class hierarchy is very simple: select statement class -> database
connection class -> Informatica (ETL tool) repository class.
It is nice and easy to have instance specific persistent attr
Hi everybody!
Many thanks to the organizers, speakers and all the conference attendees for
making it happen! The conference was informative, inspiring, well organized and
even entertaining. It was nice to meet already familiar faces from 2012 and new
ones too.
I hope to see you next time!
Esa
)&>/@:(<@:":@:,.@:>"1)@:|:@:(~. ((_ ,~ ]) \:~ ;"1 0 ,
'TOTAL'
; +/@]) #/.~)@:(1 }. (}.~ (2 + i:&','));._2)@:(#~ (_1 |. 1 = (10 10{a.)
+/\@:E. ]))@:('=== Attendees ===' (] }.~ E. i. 1:) ])
-Dan
- Original Message ---
Sub
Hello all!
I was looking at the J Conference 2014 attendee list
(//www.jsoftware.com/jwiki/Community/Conference2014) and was pleased to see
that we are so many!
Naturally I wanted to see the country distribution of the attendees. Being an
eternal novice I'd like to see alternative (i.e. bette
Hi,
I was able to move totally to J7 in May 2011 when jgtkgrid became available
(many thanks to Lorenzo Tomei!).
I've been using J8 for some time now but I miss the autosizing feature of the
grid generated by jgtkgrid's grid verb. Depending on the data the the grid
generated by J8 grid verb do
use
Instead of checking for a specific version, how about checking for the
presence of a feature/addon? For example, if your grid uses qt then you
could check for the presence of the qtide
# names_jqtide_''
168
On Thu, Feb 13, 2014 at 7:23 AM, Lippu Esa wrote:
> Many thanks to
Many thanks to the Group for the J8 effort!
I haven't had much time to use the beta versions but I try to use the J8
release as much as possible.
To facilitate a smooth version change from J6 to J7 almost three years ago I
made my grid using code version sensitive by introducing a global variab
Hi Daniel!
The book uses the old J syntax. Drop the dots from u., x. and y. and it works.
Welcome to the community!
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Daniel Valentino
Sent: 3. tammikuuta
Very nice indeed!
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Aai
Sent: 16. joulukuuta 2013 14:42
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Length of a vector
|@j./"1 yy
5 13
17
Hi Skip,
This is not an elegant version but should do the job.
mean=: +/%#
acor=: 3 : 0
:
(+/(((-y)}.x)-mean x)*(y}.x)-mean x)%+/*:(x-mean x)
)
Here is an example data set and output of the first 10 autocorrelations:
http://www.itl.nist.gov/div898/handbook/eda/section4/eda4251.htm
http://www.
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
[mailto:programming-boun...@forums.jsoftware.c
Sent: 20. maaliskuuta 2013 9:18
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Test message 3
It's interesting - what do you test?
On Thu, Mar 7, 2013 at 12:39 AM, Lippu Esa wrote:
> Last test - sorry for the inconvini
Last test - sorry for the inconvinience.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
Another test - sorry
--
For information about J forums see http://www.jsoftware.com/forums.htm
This is a test message. Please ignore it.
Esa
--
For information about J forums see http://www.jsoftware.com/forums.htm
Same thing! I just ended up with different order in the train and a superfluous
rank operator:
hft=: +>/~@i.@#"_*|:@:+
ishermitian A
0
ishermitian hft A
1
Always nice to see Raul's solution too!
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:prog
ed by Norman so that you may wish to contact him in case you build
your own binary.
I cannot remember correctly, either gtk2 or gtk3 works.
Втр, 18 Дек 2012, Lippu Esa писал(а):
> Hi Bill!
>
> Thank you for your quick reply. In the gtk directory there is a file named
> version.
o and simple
1. did you install the latest gtk binary (nov.2011)?
2. gtk2 or gtk3?
Пнд, 17 Дек 2012, Lippu Esa писал(а):
> Hi!
>
> Just tried the opengl demo. I got the same effects in J32-701 with Windows 7
> and XP.
>
> Best Regards,
>
> Esa
>
> -Original Me
Hi!
Just tried the opengl demo. I got the same effects in J32-701 with Windows 7
and XP.
Best Regards,
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of William Szuch
Sent: 4. syyskuuta 2012 1:18
To: J
Hi Bill!
Create two separate plot objects and use them:
p1=:''conew'jwplot'
p2=:''conew'jwplot'
plot__p1 i.10
plot__p2 i._10
Is this what you need
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Willi
>
> Linda
>
> -Original Message-
> From: programming-boun...@forums.jsoftware.com [mailto:
> programming-boun...@forums.jsoftware.com] On Behalf Of Lippu Esa
> Sent: Friday, October 05, 2012 11:38 AM
> TKo: 'programm...@jsoftware.com'
> Subject: Re: [Jprogramming
Hi Rick,
sorry about the dumb question: where is ifany defined?
BTW - I came up with the exactly same solution as you.
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Ric Sherlock
Sent: 5. lokakuuta 20
Hi,
is this what you mean:
a=: 6 4 $1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0
b=:1 2 1 3 4 6
(+/%+/@:*) a*b
Esa
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of pascha
Sent: 25. syyskuuta 2012 18:16
T
79 matches
Mail list logo