Re: [Jprogramming] String to Rational

2021-01-05 Thread Justin Paston-Cooper
Thanks for the suggestion. I've combined Don's idea of using x: and your idea of removing the point and parsing that to handle all numbers of digits after the decimal point: stringToRational =: ((_&".)@(-.&'.') %&:x: 10&^@(<:@# - (i.&'.')) stringToRational '666.66' should give 333r50. Sadly this

Re: [Jprogramming] J and Spreadsheets

2021-01-05 Thread bill lam
Interfacing excel or openoffice can be done using com interface, but the technology is windows specific. openoffice also supports interface to python, but can't be called from J directly. Another approach is to parse an excel workbook directly from J and then write back changes to the file. But t

Re: [Jprogramming] Problem with Acrobat Reader displaying plot

2021-01-05 Thread Jo van Schalkwyk
There are gazillions of PDF readers. All have their ups & downs; after trying many of them I settled on Sumatra as I found it least offensive, and it does the job. Foxit used to be great, but has fallen off, IMO. The BitDefender warning about Sumatra is a false positive, BTW, see https://forum.suma

Re: [Jprogramming] Downloading using https protocol

2021-01-05 Thread Devon McCormick
Yay! Thanks, Stefan and everyone else who responded. On Tue, Jan 5, 2021 at 2:01 PM Stefan Baumann wrote: > Devon, > the gethttp addon works for me - it uses curl: > > load 'web/gethttp' > > 2 {. (<;._2) ,&LF gethttp ' > > https://query1.finance.yahoo.com/v7/finance/download/TSLA?period1=127776

Re: [Jprogramming] Downloading using https protocol

2021-01-05 Thread Stefan Baumann
Devon, the gethttp addon works for me - it uses curl: load 'web/gethttp' 2 {. (<;._2) ,&LF gethttp ' https://query1.finance.yahoo.com/v7/finance/download/TSLA?period1=1277769600&period2=1609718400&interval=1d&events=history&includeAdjustedClose=true ' ┌─┬─

Re: [Jprogramming] Problem with Acrobat Reader displaying plot

2021-01-05 Thread Hauke Rehr
Viewers use to have a fullscreen mode, typically available under a View menu, or by pressing F5 or F11. I don’t know STDU but it’s worth a try. Am 05.01.21 um 09:29 schrieb HH PackRat: > On 1/4/21, Devon McCormick wrote: >> I used to use Sumatra and only stopped because it did not survive the >>

Re: [Jprogramming] String to Rational

2021-01-05 Thread Jimmy Gauvin
IF your strings always have two numbers after the decimal point you could remove the point before converting to numeric. NB.Remove decimal point '.' -.~ each '123.45' ; '1456.12' ┌─┬──┐ │12345│145612│ └─┴──┘ NB. Convert to numeric _ ". > '.' -.~ each '123.45' ; '456.12' 12

Re: [Jprogramming] String to Rational

2021-01-05 Thread Don Guinn
x:0.66 33r50 Actually 0.66 is not exactly 0.66 internally. But it is close enough for J to make it an exact rational. However, I use pennies when handling money. That uses hardware integers. On Tue, Jan 5, 2021 at 8:43 AM Justin Paston-Cooper wrote: > Hello, > > I am reading in tab-separate

[Jprogramming] String to Rational

2021-01-05 Thread Justin Paston-Cooper
Hello, I am reading in tab-separated files with readdsv from 'tables/dsv'. Some columns consist of exact decimal numbers like 6.66. These generally involve amounts of a decimal currency. These are read in by readdsv as boxed strings. makenum from 'tables/csv' converts these strings to floats. I wo

[Jprogramming] J and Spreadsheets

2021-01-05 Thread Justin Paston-Cooper
Hello, I don't know much Excel, and I know some J. The dataflow aspect of Excel excites me, and I am averse to GUI programming. https://code.jsoftware.com/wiki/Articles/JExcel details how to integrate J with Excel. I don't know how up-to-date this is. Because I run Linux, it would be difficult fo

Re: [Jprogramming] Downloading using https protocol

2021-01-05 Thread 'Mike Day' via Programming
I thought Yahoo had stopped supporting stock exchange queries a year or so ago; at least, my old gethtml (?) calls from J stopped working for me. Tom McGuire and Gilles Kirouac commented helpfully at the time, Nov 26, 2019. I eventually resorted to “Google sheets” and clunky copy n paste, as

Re: [Jprogramming] Downloading using https protocol

2021-01-05 Thread Thomas McGuire
I believe this has to do with a crumb that yahoo embeds in the session and unless your reply has the crumb yahoo rejects the query. It means you need a 2 step call access. One to set the session information and extract the crumb and one to actually get the data you are interested in. I had pla

Re: [Jprogramming] Problem with Acrobat Reader displaying plot

2021-01-05 Thread emacstheviking
https://www.fosshub.com/Evince.html I use Evince a lot under linux but there is a Windows installation package available at the above url On Tue, 5 Jan 2021 at 08:29, HH PackRat wrote: > On 1/4/21, Devon McCormick wrote: > > I used to use Sumatra and only stopped because it did not survive the

Re: [Jprogramming] Problem with Acrobat Reader displaying plot

2021-01-05 Thread HH PackRat
On 1/4/21, Devon McCormick wrote: > I used to use Sumatra and only stopped because it did not survive the > Windows 10 migration. I tried to get Sumatra (based on recommends here), but my BitDefender product gave an "Infected web page" critical message and blocked its installation. So I went in