Skip to content

Instantly share code, notes, and snippets.

View rmallah's full-sized avatar

Rajesh Kumar Mallah rmallah

View GitHub Profile
sub get_p {
my ($c) = shift;
$c->log->debug("creating a promise");
my $promise = Mojo::Promise->new ;
$c->subprocess(sub {
my $n = int (3 + rand 10) ;
for (1..$n) {
$c->log->debug("I am $$, will sleep for $n seconds.");
sleep 1 ;
$ ./script/yancy_play get /yancy/api/Film
[2020-04-15 20:51:19.12094] [1555] [debug] sample query result: distinct film title is: 1000
[2020-04-15 20:51:19.35082] [1555] [debug] [sl6UCV_q] GET "/yancy/api/Film"
[2020-04-15 20:51:19.35170] [1555] [debug] [sl6UCV_q] Routing to a callback
*** Editor without authentication is deprecated and will be
removed in v2.0. Configure an Auth plugin or set
`editor.require_user => undef` to silence this warning
. at /usr/local/share/perl/5.20.2/Mojolicious.pm line 202.
[2020-04-15 20:51:19.35618] [1555] [debug] [sl6UCV_q] Routing to controller "Yancy::Controller::Yancy" and action "list"
Collection Def is:
=================================================
NoteData => {
"title" => "Note Data" ,
"x-id-field" => 'note_id' ,
"x-list-columns" => [ 'note_id','note_name' ] ,
properties => {
note_id=> { type => 'string', readOnly => 1, },
note_name=> { type => 'string' ,
// adapted from http://pythonwise.blogspot.in/2009/06/strftime-for-javascript.html
/*
To use it , save this gist in a file , import it into the desired QML
call as:
DateUtils.strftime ( format , dateObj);