Forum Replies Created

Page 1 of 8
  • davidcrossey

    Member
    August 14, 2024 at 12:53 am in reply to: Dashboard permissions using dashboard direct

    Ah sorry, I’m re-reading your original post.

    Your admin user lands on the Error page, because they are permissioned to view that dash, and that happens to be the dashboard in the list (.api.dashList).

    You can change the ‘home’ dashboard screen to another by re-ordering the above variable for the ‘admin’ usergroup, or leave your workaround change. It just means that the ‘admin’ usergroup won’t be able to edit the Error dashboard (if you need to)

  • davidcrossey

    Member
    August 13, 2024 at 2:24 pm in reply to: Dashboard permissions using dashboard direct

    Hi Swapnil,

    IIRC, you should check you have a user in the admin usergroup and ensure they aren’t also in the default restricted usergroup. The latter will direct you to the Error dashboard as that’s to prevent non-defined users (and users added to the restricted group) from accessing any of the dashboards.

    See this note: https://github.com/davidcrossey/dash-direct-perms/blob/main/README.md#accessing-the-dashboards-direct-application

    Cheers,

    David

  • davidcrossey

    Member
    March 19, 2024 at 11:01 am in reply to: Code Formatting

    Thanks for sharing @dhodgins.

    Whilst I don’t necessarily agreed with all of the points based on personal preference, I do agree with the overall theme of keep it simple and consistent – both for readability and performance.

    I find it’s a balancing act, for example on the projection performance, one may prefer a more tacit style approach as it can be cleaner/easier to read right-to-left the following expression:

    aggFunc projFunc[var1;] calcFunc

    vs

    aggFunc projFunc[var1;calcFunc]

    Especially if calcFunc has a longer definition and if the small performance overhead justifies it.

    Your blog post and notes on style can be eye-opening and help to develop good code hygiene over the long term.

  • davidcrossey

    Member
    March 19, 2024 at 11:01 am in reply to: DS_EXEC_ANALYTIC Template

    Thanks for sharing Leah!

  • davidcrossey

    Member
    November 1, 2023 at 12:00 am in reply to: Kdb+ Community Edition

    Hi ,

    Check out the downloads page here for more information: Download kdb+ Free Personal Edition | KX

  • davidcrossey

    Member
    September 20, 2023 at 12:00 am in reply to: Conda package update?

    I can’t comment in an official capacity, but I’m sure there will continue to be conda package releases into the future.

  • davidcrossey

    Member
    September 15, 2023 at 12:00 am in reply to: Conda package update?

    Hi Dan,

    There was a recent release, if you try updating now you should see the following version:

     

    Regards,

    David

  • davidcrossey

    Member
    September 13, 2023 at 12:00 am in reply to: Web interface, JSON

    Try enlisting

     

     

     

  • davidcrossey

    Member
    September 12, 2023 at 12:00 am in reply to: Web interface, JSON

    A quick solution could be utilise something like wget to download the json data instead.

    Server

    $ q -p 5000 -q 
    q)show data:([]a:1+til 10;b:10?`4) 
    a b 
    ------- 
    1 milg 
    2 igfb 
    3 kaod 
    4 bafc 
    5 kfho 
    6 jecp 
    7 kfmo 
    8 lkkl 
    9 kfif 
    10 fglg q
    )`:html/test.json 0: enlist .j.j data

    Client

    $ wget http://localhost:5000/test.json 
    --2023-09-12 10:46:40-- 
    http://localhost:5000/test.json Resolving localhost (localhost)... 
    127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:5000... connected. 
    HTTP request sent, awaiting response... 200 OK 
    Length: 193 [application/json] 
    Saving to: test.json test.json 100%[====================================================>] 193 --.-KB/s in 0s 2023-09-12 10:46:40 (61.1 MB/s)- test.json saved [193/193] 
    $ q -q 
    q)first .j.k each read0 `:test.json 
    a b 
    --------- 
    1 "milg" 
    2 "igfb" 
    3 "kaod" 
    4 "bafc" 
    5 "kfho" 
    6 "jecp" 
    7 "kfmo" 
    8 "lkkl" 
    9 "kfif" 
    10 "fglg"

     

  • davidcrossey

    Member
    September 12, 2023 at 12:00 am in reply to: What’s new in KX Dashboards 2.1.0

    Thanks for sharing the latest from KX Dashboards Kieran!

  • davidcrossey

    Member
    September 12, 2023 at 12:00 am in reply to: Web interface, JSON

    You can do this in one call without saving the table to the filesystem from the client machine, and without needing to tweak the .z.ph (or .h.val) handlers

     

    Note, if you run the same URL via the brower you’ll see the JSON there, it won’t automatically download like CSV files though.

     

    Hope this helps, in lieu of more community suggestions

  • davidcrossey

    Member
    July 31, 2023 at 12:00 am in reply to: Send a mail in kdb

    This is a duplicate / cross-post which has already been answered on StackOverflow

  • davidcrossey

    Member
    July 24, 2023 at 12:00 am in reply to: Exporting CSV file

    Hi ,

    Your question isn’t very clear. Do you want to export a table to a csv, or a table with column headers that include tabs?

    Have a look at Handling CSVs in kdb+ | A tour of the q programming language | Documentation for kdb+ and the q programming language – Kdb+ and q documentation (kx.com)

  • davidcrossey

    Member
    July 24, 2023 at 12:00 am in reply to: Exporting CSV file

    I’m not following your request. I read it as follows, which I don’t think is what you mean?

     

    q)t:([]c1:`a`b`c;c2:1 2 3) 
    q){cc:count cols t;x:csv 0: x;(1#x),enlist[(csv sv cc# enlist enlist "t")],1_x} 
    t "c1,c2" "t,t" "a,1" "b,2" "c,3" 
    
    q)(count[cols t]#"*";enlist csv) 0: {cc:count cols t;x:csv 0: x;(1#x),enlist[(csv sv cc# enlist enlist "t")],1_x} 
    t c1 c2 
    ----------- 
    ,"t" ,"t" ,"a" ,"1" ,"b" ,"2" ,"c" ,"3"

     

    If you prepare you csv data and read from disk, you’ll recreate a table without needing to add tabs:

     

    q)csv 0: t “c1,c2” “a,1” “b,2” “c,3″ q)(count[cols t]#”*”;enlist csv) 0: csv 0: t c1 c2 ——— ,”a” ,”1″ ,”b” ,”2″ ,”c” ,”3″

     

    Can you provide a before and after example of what you mean?

  • davidcrossey

    Member
    July 24, 2023 at 12:00 am in reply to: Exporting CSV file

    Note, this was just a quick attempt:

    q)testfile:flip {(1#x),"t",'/:1_x} csv vs' csv 0: t save `:testfile.csv

     

Page 1 of 8