This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuWhen people have problems, its often the port used. Currently on 10.6.2, 2000 and 2001 are used, and that may be your problem.Quote
(new Resource 'Resource.Csvexport)
(context 'Resource.Csvexport)
(define (Resource.Csvexport:Resource.Csvexport)
(catch-all)
)
(define (catch-all action)
(Response:header "Content-Description" "File Transfer")
(Response:header "Content-Type" "text/csv")
(Response:header "Content-Disposition" "attachment; filename=out.csv")
(Response:header "Pragma" "public")
(Response:header "Expires" "0")
(change-dir (append DF_SELF_DIR))
(change-dir "..")
(change-dir "databases")
;; Now we're running sqlite3 binary directly on the server ...
(setq cmd-dump {sqlite3 -header -csv -separator ';' db.sqlite "select * from data;" > out.csv})
(exec cmd-dump)
;; Sending it out ...
(print (read-file "out.csv"))
)
(context MAIN)
what happened toQuotehttp://www.rundragonfly.com">http://www.rundragonfly.com ?
is *very* nice since anything else Lisplike failedQuote from: "mcc"
on my Arietta
(setq textdata "Now think about your brain. It's a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep.")
(setq text (parse (lower-case textdata) "[^a-z0-9äöüß]+" 0))
(bayes-train text 'DICT)
(bayes-query (parse (lower-case "dsd skjsd ksdjkds sdkj") "[^a-z0-9äöüß]+" 0) 'DICT)
"Now think about your brain. It226128153s a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep."
("now" "think" "about" "your" "brain" "it" "s" "a" "long" "running" "program" "running"
"on" "very" "complex" "and" "error" "prone" "hardware" "how" "does" "your" "brain"
"keep" "itself" "sane" "over" "time" "the" "answer" "may" "be" "found" "in" "something"
"we" "spend" "a" "third" "of" "our" "lives" "doing" "sleep" "")
(45)
(0.5)
Ps: thanks for the great examples Marc. Do you also get this "undefined" message HPW is talking about? And what browser version do you run?Quote
(setq number (eval-string-js "window.prompt('Enter a number to divide by 2:','')"))
(setq result (div (int number) 2))
(setq alert (append "alert(" (string result) ")"))
(eval-string-js alert)
(eval-string-js "$(window).height();")
(eval-string-js "$(window).width();")
Quote from: "Lutz"
- Improve the editor using JavaScript from other projects which do editor syntax highlighting likehttp://jsfiddle.net/">http://jsfiddle.net/ ,http://ace.c9.io/#nav=about">http://ace.c9.io/#nav=about (comes with embedding instructions!) and many others. JavaScript is the only language builtin to the browser and with Document Object Model integration. So using jQuery, Bootstrap, etc. would be a natural thing.
Quote
HTML Domain Specific Language (DSL) for newLISP
———————————————————————————————————————————————
The idea is to be able to write newlisp code as if you were writing HTML,
avoiding the use of template tags.
So instead of writing:
<html lang="en">
<head>
<title><% (print "This is my title") %></title>
</head>
</html>
Were you have to use an opening <% and a closing %> each time you need to
insert newlisp code, you write:
(html "lang=en"
(head ""
(title "" "This is my title")))
And everything is newlisp code.
To achieve this every HTML5 tag has it's counterpart function.
Every function needs at least one parameter for the inner code, hence the empty
strings in the example above. Also they can have any number of parameters
after, which are considered to be the code or text between opening and closing
tag.
Further parameters are concatenated to second one.
Every function returns a string with the computed html code.