A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/grid__cgi__sample_8cpp_source.html below:

NCBI C++ ToolKit: src/sample/app/netschedule/grid_cgi_sample.cpp Source File

55  virtual void Init

(

void

);

64  return "SampleNodeCgiClient version 1.0.1"

;

124  return "Grid Sample CGI"

;

130  return "grid_cgi_sample.html"

;

154  "<p>Enter your Input doubles here: " 155  "<INPUT TYPE=\"text\" NAME=\"message\" VALUE=\"\"><p>" 156  "<INPUT TYPE=\"submit\" NAME=\"SUBMIT\" VALUE=\"Submit\">" 157  "<INPUT TYPE=\"reset\" VALUE=\"Reset\">"

);

158  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

171  if

( args[

"message"

] ) {

173  const string

& m = args[

"message"

].AsString();

174

vector<string> sdoubles;

176  for

(

auto

sd : sdoubles) {

206  "<p/>Input Data : <@INPUT_DATA@><br/>" 207  "<INPUT TYPE=\"submit\" NAME=\"Check Status\" VALUE=\"Check Status\">"

);

208  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

210  ctx

.GetHTMLPage().AddTagMap(

"INPUT_DATA"

, idoubles);

222  for

(

int i

= 0;

i

<

count

; ++

i

) {

224  ERR_POST

(

"Input stream error. Index : "

<<

i

);

234  "<p/>Job is done.<br/>" 235  "<p>Result received : <@OUTPUT_DATA@> <br/>" 236  "<INPUT TYPE=\"submit\" NAME=\"Submit new Data\" " 237  "VALUE=\"Submit new Data\">"

);

238  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

240  ctx

.GetHTMLPage().AddTagMap(

"OUTPUT_DATA"

,idoubles);

248  "<p/>Job failed.<br/>" 249  "Error Message : <@MSG@><br/>" 250  "<INPUT TYPE=\"submit\" NAME=\"Submit new Data\" " 251  "VALUE=\"Submit new Data\">"

);

252  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

254  ctx

.GetHTMLPage().AddTagMap(

"MSG"

,err);

262  "<p/>Job is canceled.<br/>" 263  "<INPUT TYPE=\"submit\" NAME=\"Submit new Data\" " 264  "VALUE=\"Submit new Data\">"

);

266  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

274  "<p/>Job is still in a queue...<br/>" 275  "<INPUT TYPE=\"submit\" NAME=\"Check Status\" VALUE=\"Check\">" 276  "<INPUT TYPE=\"submit\" NAME=\"Cancel\" " 277  "VALUE=\"Cancel the job\">"

);

278  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

286  "<p/>Job is still running.<br/>" 287  "Progress message: <@PROGRESS_MSG@><br/>" 288  "<INPUT TYPE=\"submit\" NAME=\"Check Status\" VALUE=\"Check\">" 289  "<INPUT TYPE=\"submit\" NAME=\"Cancel\" " 290  "VALUE=\"Cancel the job\">"

);

291  ctx

.GetHTMLPage().AddTagMap(

"VIEW"

, inp_text);

293  ctx

.GetHTMLPage().AddTagMap(

"PROGRESS_MSG"

, proress_text);

299  ctx

.GetHTMLPage().AddTagMap(

"DATE"

,

309  if

( args[

"Cancel"

] )

325

arg_desc->SetUsageContext(

GetArguments

().GetProgramBasename(),

326  "CGI sample application"

);

330

arg_desc->AddOptionalKey(

"message"

,

332  "Message passed to CGI application"

,

336

arg_desc->AddOptionalKey(

"Cancel"

,

349  if

(vec.size() > 0) {

350  for

(

size_t i

= 0;

i

< vec.size(); ++

i

) {

369  _TRACE

(

"back to normal diagnostics"

);

Grid CGI Context Context in which a request is processed.

static string VectorToString(const vector< double > &vec)

virtual void OnJobDone(CGridClient &grid_client, CGridCgiContext &ctx)

This method is call when a worker node finishes its job and result is ready to be retrieved.

virtual string GetPageTemplate() const

Return a name of a file this HTML page template.

virtual void OnJobRunning(CGridCgiContext &ctx)

This method is call when a job is taken by a worker node to be processed.

virtual bool JobStopRequested(void) const

When job is still running this method is called to check if cancel has been requested via the user in...

virtual string GetProgramVersion(void) const

Get program version (like: MyProgram v.

virtual string GetPageTitle() const

Return page name.

virtual void ShowParamsPage(CGridCgiContext &ctx) const

Show a page with input data.

virtual void Init(void)

This method is called on the CGI application initialization – before starting to process a HTTP reque...

vector< double > m_Doubles

virtual void OnJobFailed(const string &msg, CGridCgiContext &ctx)

This method is called when worker node reported a failure.

virtual void PrepareJobData(CGridClient &grid_client)

This method is called when a job is ready to be send to a the queue.

void OnEndProcessRequest(CGridCgiContext &ctx)

This method is call at the very end of the request processing.

virtual bool CollectParams(CGridCgiContext &)

Collect parameters from HTML form If this method returns false that means that input parameters were ...

virtual void OnJobPending(CGridCgiContext &ctx)

This method is call when a job is in NetSchedule queue and is waiting for a worker node.

virtual void OnJobCanceled(CGridCgiContext &ctx)

This method is called if job was canceled during its execution.

virtual void OnJobSubmitted(CGridCgiContext &ctx)

This method is called just after a job has been submitted.

Grid Client (the submitter).

The NCBI C++ standard methods for dealing with std::string.

int NcbiSys_main(int argc, ncbi::TXChar *argv[])

NetSchedule Framework specs.

int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)

Main function (entry point) for the NCBI application.

const CNcbiArguments & GetArguments(void) const

Get the application's cached unprocessed command-line arguments.

@ fAllowMultiple

Repeated key arguments are legal (use with AddKey)

@ eString

An arbitrary string.

virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)

Setup the command line argument descriptions.

void SetRequestFlags(int flags)

Set cgi parsing flag.

void RegisterDiagFactory(const string &key, CDiagFactory *fact)

virtual const CArgs & GetArgs(void) const

Get parsed command line arguments extended with CGI parameters.

@ fCaseInsensitiveArgs

use case insensitive CGI arguments

#define ERR_POST(message)

Error posting with file, line number information but without error codes.

virtual void Init(void)

This method is called on the CGI application initialization – before starting to process a HTTP reque...

CNcbiIstream & GetIStream()

Get a stream with a job's result.

CNcbiOstream & GetOStream()

Get a stream where a client can write an input data for the remote job.

IO_PREFIX::ostream CNcbiOstream

Portable alias for ostream.

IO_PREFIX::istream CNcbiIstream

Portable alias for istream.

static string DoubleToString(double value, int precision=-1, TNumToStringFlags flags=0)

Convert double to string.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

static double StringToDouble(const CTempStringEx str, TStringToNumFlags flags=0)

Convert string to double.

@ fAllowTrailingSymbols

Ignore trailing non-numerics characters.

CTime GetFastLocalTime(void)

Quick and dirty getter of local time.

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4