IIRC the program name does not need dquote for shell cmd.
28.03.2014, в 13:35, Raul Miller написал(а):
> require 'task'
> shell '"C:\Program Files (x86)\Audacity\audacity.exe"'
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
>
> Why?
>
require 'task'
shell '"C:\Program Files (x86)\Audacity\audacity.exe"'
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Why?
Note also:
http://www.jsoftware.com/pipermail/programming/2010-July/019919.html
http://www.jsoftware.com/pipermail/pr
I am continually struck by how difficult it is to find relevant information.
Once upon a time, I had hopes that search engines would help resolve such
issues, but more and more I'm seeing their limitations (and the limitations
of the groups of people running them). And, similarly, for educational
Some utilities for using base128 encoding to compress numeric lists. For
extended precision numbers, this achieves 20x+ space efficiency, and is
reasonably fast, so its something that is at least appropriate for internet
transmission, and near breakeven for intranet and disk transmission. It c
Or:
adv=: (@])(1:`)(@.[)(&>)
+:adv
1:`(+:@])@.[&>
1 0 1 +: adv 2;'a'; 3
4 1 6
Thanks,
--
Raul
On Thu, Mar 27, 2014 at 9:26 PM, Pascal Jasmin wrote:
> found it:
>
> 1 0 1 (+:@:])^:[ each4;'a'; 6
> ┌─┬─┬──┐
> │8│a│12│
> └─┴─┴──┘
>
>1 0 1 ]`(+:@:])@.[ "0 ] 4 1 6
> 8
found it:
1 0 1 (+:@:])^:[ each 4;'a'; 6
┌─┬─┬──┐
│8│a│12│
└─┴─┴──┘
1 0 1 ]`(+:@:])@.[ "0 ] 4 1 6
8 1 12
- Original Message -
From: Pascal Jasmin
To: Programming forum
Cc:
Sent: Thursday, March 27, 2014 8:17:06 PM
Subject: [Jprogramming] apply verb to filtered list
f =: 1 0 1
list =: 2;'a';3
as a simple example verb, +: is used. The verb is of no actual interest. Only
the adverb.
I would like an adverb that produces
4 1 6 -: 1 0 1 +: adv 2 1 3
1
or more advanced,
4 ;'a'; 6 -: 1 0 1 +: adv 2;'a'; 3
1
It is NOT AN OPTION to query the list as part
My submission for the most outlandish/outrageous solution:
minors=: 1&(|:\.)"2^:2
det=: -/ .*
(<0 1) |: det minors (* =@/:) 3 1 4 1 5 9
180 540 135 540 108 60
As usual, when referring to minors, the obligatory Green Mug link:
http://www.jsoftware.com/jwiki/DavidMitchell
-
Unexpected bonus of "J thinking":
x=:1e6?@$10
ts=:6!:2,7!:2@]
100 ts '1 */\. x'
0.081586 4.19444e7
100 ts '((*/ .^ * %~)~:&0) x'
0.0448121 1.7828e7
(That's a factor of ~2, at least on my phone).
> On Mar 27, 2014, at 7:49 PM, Dan Bron wrote:
>
> ((*/ .^ * %~)~:&0)
---
We can fix this failure by "thinking like a J programmer" :
((*/ .^ * %~)~:&0) 2 0 8 3
24 0 6 16
If our input is guaranteed non-negative we could shorten ~:&0 to * .
-Dan
> On Mar 27, 2014, at 5:06 PM, Roger Hui wrote:
>
> It fails when x has a 0 but is not all 0 :
>
> (*/ % ]) 2 0 8 3
It's not what you know, it's who you know?
Still, if the reviewer is just being ornery you might as well have fun with
the situation... and then go elsewhere.
Oh, and here's a version that should be easy to translate into many other
languages:
(3*2*8),(4*2*8),(4*3*8),(4*3*2)
Thanks,
--
Raul
Was Wallis himself the first to assume x^0 =1 even for x=0? See,
http://www.maths.tcd.ie/pub/HistMath/People/Wallis/RouseBall/RB_Wallis.html
Perhaps a Latin fluent member of the forum could shed some light into the
dark:
https://archive.org/details/ArithmeticaInfinitorum ?
At any rate,
Thanks for the shout out, but I feel obliged to confess that I stole that /:
trick from eesuk in the 2006 "zig zag order" thread.
http://www.jsoftware.com/pipermail/programming/2006-November/004156.html
(The moment I wrote that expression still stands out as one of the proudest of
my 12+ year J
See http://www.jsoftware.com/pipermail/programming/2008-October/012505.html
;)
On Thu, Feb 27, 2014 at 1:42 AM, Raul Miller wrote:
> Same as i.@# in =@i.@#
>
> It's generating a list of distinct values which = will use to
> construct an identity matrix.
>
> Mind you, it might have made more sen
Unfortunately (as no doubt you are aware):
x=:5 5 6 5
1 */\. x
150 150 125 150
*/@-."1 0~ x
6 6 125 6
However, if we constrain our input to unique vectors, I'll note that we can
replace the =@i.@# in your original solution with simple, modest (monad) e. :
(-.e.x) */ .(^~) x
48 64 9
The script and session in the "Tacit recursion without $:" post:
http://www.jsoftware.com/pipermail/programming/2014-February/035416.html
have been added to the page:
http://www.2bestsystems.com/foundation/j/
The definition of the adverb sna has been modified slightly to conform with
the revise
I could well imagine most interviewers today rejecting such a terse answer out
of hand!
On 27 Mar 2014 15:37:31 -0400, Dan Bron wrote:
> A question on StackExchange [1]:
>
> "
> I was asked the following interview question over the phone:
> Given an array of integers, produce an array w
*/@-."1 0~ 4 3 2 8
48 64 96 24
*/@-."1 0~ 4 0 2 8
0 64 0 0
--
For information about J forums see http://www.jsoftware.com/forums.htm
See http://www.jsoftware.com/pipermail/programming/2008-October/012505.html
;)
On Thu, Feb 27, 2014 at 1:42 AM, Raul Miller wrote:
> Same as i.@# in =@i.@#
>
> It's generating a list of distinct values which = will use to
> construct an identity matrix.
>
> Mind you, it might have made more sen
*/@}.@(|."0 _~ i.@#) 4 3 2 8
48 64 96 24
On Thu, Mar 27, 2014 at 5:42 PM, Dan Bron wrote:
> Good one!
>
> (I haven't tested, but I expect you could say <^:3"0 in place of <@<@<"0 )
>
>
>
> > On Mar 27, 2014, at 4:26 PM, Thomas Costigliola
> wrote:
> >
> > (*/@{/~<@<@<"0@i.@#) 4 3 2 8
> >
Good one!
(I haven't tested, but I expect you could say <^:3"0 in place of <@<@<"0 )
> On Mar 27, 2014, at 4:26 PM, Thomas Costigliola wrote:
>
> (*/@{/~<@<@<"0@i.@#) 4 3 2 8
> 48 64 96 24
>
>
>
>> On Thu, Mar 27, 2014 at 4:10 PM, Dan Bron wrote:
>>
>> Oh, I like this game!
>>
>>
It fails when x has a 0 but is not all 0 :
(*/ % ]) 2 0 8 3
0 0 0 0
On Thu, Mar 27, 2014 at 1:10 PM, Dan Bron wrote:
> Oh, I like this game!
>
>(*/ % ]) 4 3 2 8
> 48 64 96 24
>
>(*/@#~1-=@i.) 4 3 2 8
> 48 64 96 24
>
> -Dan
>
> - Original Message
I came up with
(%~ */) 4 3 2 8
48 64 96 24
but I think your solution is more readable.
... peter
On 20140327, 1:10 PM, Dan Bron wrote:
Oh, I like this game!
(*/ % ]) 4 3 2 8
48 64 96 24
(*/@#~1-=@i.) 4 3 2 8
48 64 96
(*/@{/~<@<@<"0@i.@#) 4 3 2 8
48 64 96 24
On Thu, Mar 27, 2014 at 4:10 PM, Dan Bron wrote:
> Oh, I like this game!
>
>(*/ % ]) 4 3 2 8
> 48 64 96 24
>
>(*/@#~1-=@i.) 4 3 2 8
> 48 64 96 24
>
> -Dan
>
> - Original Message ---
>
> Subject
Oh, I like this game!
(*/ % ]) 4 3 2 8
48 64 96 24
(*/@#~1-=@i.) 4 3 2 8
48 64 96 24
-Dan
- Original Message ---
Subject: Re: [Jprogramming] J as an interviewing tool
From: Roger Hui
Date: Thu, 27 Mar 2014 12:44:59 -0700
To: Pro
Just wanted to say...
Seriously blowing my mind here guys. I keep reconsidering
completely learning J when I see things like this.
As for an interviewing tool, well, I'm sure it would impress many.
On Thu, Mar 27, 2014 at 3:44 PM, Roger Hui wrote:
> Suppose you did not have the outfix ope
Suppose you did not have the outfix operator, but still have array ops.
x=: 4 3 2 8
I=: =i.#x
I
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
(-.I)*/ .(^~) x
48 64 96 24
On Thu, Mar 27, 2014 at 12:37 PM, Dan Bron wrote:
> A question on StackExchange [1]:
>
> "
>I was asked the following i
A question on StackExchange [1]:
"
I was asked the following interview question over the phone:
Given an array of integers, produce an array whose values
are the product of every other integer excluding the current index.
Example:
[4, 3, 2, 8] -> [3*2*8, 4*2*8, 4*3*8, 4*3*2] -
just install apk again, root access is no needed.
27.03.2014, в 17:03, Björn Helgason написал(а):
> What is it I can try to see if I can make it work on a non rooted tablet?
>
> -
> Björn Helgason
> gsm:6985532
> skype:gosiminn
> On 24.3.2014 07:17, "bill lam" wrote:
>>
>> Apps cannot change
What is it I can try to see if I can make it work on a non rooted tablet?
-
Björn Helgason
gsm:6985532
skype:gosiminn
On 24.3.2014 07:17, "bill lam" wrote:
>
> Apps cannot change files outside of sdcard unless rooted. So every
> apk must be installed using android's package installer.
>
> On Mon
> This is related to network connections -off line it won't work.
The code will pick up the current differential between utc and local time. An
improvement could be to have the OS signal DST changes (not sure if it can), or
an internet service connect via socket when dst changes. Or as part
31 matches
Mail list logo