Re: [Jprogramming] Better way to locate coomplex or real numbers in an array

2014-11-28 Thread Linda Alvord
Thanks. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: Friday, November 28, 2014 10:34 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Better way to locate coomplex or rea

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread Linda Alvord
That does it! Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of tom arneson Sent: Friday, November 28, 2014 10:29 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Get unique results each time

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread Linda Alvord
No matter where I insert either version I always get the same final list. 7?7 1 4 5 0 6 2 3 10?10 5 1 3 2 4 0 7 8 6 9 NB.m3=: 9!:1@<.@(+/ .^&2@(6!:0@])) NB.Randomizing random number seed 16!:45 16!:45 7?7 1 5 6 4 0 2 3 10?10 4 3 1 6 7 9 5 2 0 8 10?10 9 0 1 6 4 2 3 8 5 7 Li

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread tom arneson
Here's another way. From addons/stats/base/random.ijs NB. = NB.*randomize v sets a random value into random link randomize=: 3 : 0 try. require 'guid' tmp=. _2 (3!:4) , guids 1 catch. NB. general/misc/guid.ijs not availabl

Re: [Jprogramming] Better way to locate coomplex or real numbers in an array

2014-11-28 Thread Henry Rich
]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 (0 ~: 11&o.) 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 Henry Rich On 11/28/2014 10:27 PM, Linda Alvord wrote: A is an array of real and co

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread tom arneson
Linda, Run m3 and it sets the seed of the random number generator (RNG) to new values based on the time. Do this before you start to generate random numbers. With a new seed you'll get a different sequence of RNs. -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:

[Jprogramming] Better way to locate coomplex or real numbers in an array

2014-11-28 Thread Linda Alvord
A is an array of real and complex numbers. Is there an easier way to locate all the complex numbers. Signum locates each numbers intersection with a line from it to the origin and the circle. ]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_

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread Linda Alvord
This agrees with {Pascal's answer. I thought you could take some number of seconds in the time and find the last digits or something and then roll that number and then begin your code. Maybe I isn't possible. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailt

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread Linda Alvord
This gave a new set of numbers, but they are repeated the next time I run the code. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of 'Pascal Jasmin' via Programming Sent: Friday, November 28, 2014 9:15 P

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread tom arneson
Try this, from: http://www.jsoftware.com/jwiki/JPhrases/RandomNumbers m3=: 9!:1@<.@(+/ .^&2@(6!:0@])) NB.Randomizing random number seed -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord Sent: F

Re: [Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread 'Pascal Jasmin' via Programming
9!:45 will set the seed. J on startup has the same seed. For the default generator, 9!:45 will take a long array as the seed (basically a polynomial representation of a 19000 bit number) If you use the first random number generator (gbflip), the seed is a 31bit number. I've posted ways to get

[Jprogramming] Get unique results each time you use deal and roll

2014-11-28 Thread Linda Alvord
7?7 1 4 5 0 6 2 3 10?10 5 1 3 2 4 0 7 8 6 9 Now run the code again after closing J and you get the same results. How can you get different results each time. I vaguely rember using some date or other number with roll to insure different results. Linda --

Re: [Jprogramming] Split on first found character

2014-11-28 Thread Linda Alvord
x=: 'case_id', LF, 'GCTAGTCG', LF, 'ACGTC', LF ;:' '((x=LF)#i.$x)}x ┌───┬┬─┐ │case_id│GCTAGTCG│ACGTC│ └───┴┴─┘ Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com]

Re: [Jprogramming] SQLITE with Mac

2014-11-28 Thread bill lam
Updated. Thanks. On 28.11.2014, at 22:33, Vijay Lulla wrote: > OOPS! There was a typo in my path. It should be 'libsqlite3.dylib' and not > 'libsqlie3.dylib'. Sorry. > > On Fri, Nov 28, 2014 at 1:41 AM, bill lam wrote: > >> Thanks Vijay, ddsqlite updated to check for /opt/local/lib/libsqlie3

[Jprogramming] Dickson on a big generalization of Fermat’s Little Theorem

2014-11-28 Thread Raul Miller
http://www.mathmarauder.com/archives/178 That function F, written in tacit J, might look like this: F=: ([: +/@:- [: */"1@:- [ ^/ (^"1 #:@i.@^~&2@#)@]) q:@] Or, in explicit J, might look like this: F=:dyad define t=. q:y +/-*/"1-x^/t^"1#:i.2^#t ) As the explicit form is more compact tha

Re: [Jprogramming] SQLITE with Mac

2014-11-28 Thread Vijay Lulla
OOPS! There was a typo in my path. It should be 'libsqlite3.dylib' and not 'libsqlie3.dylib'. Sorry. On Fri, Nov 28, 2014 at 1:41 AM, bill lam wrote: > Thanks Vijay, ddsqlite updated to check for /opt/local/lib/libsqlie3.dylib > > Please report if this patch will cause any regression. > > > Чт,