Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators Support and Discussions for Tide Charts and Tide Tables Post 302890183 by Neo on Tuesday 25th of February 2014 02:45:04 PM
Old 02-25-2014
Moderator's Comments:
Mod Comment Please note this thread is for support for our tidal data maps and app only. If you wish to build your own app (and discuss your app), please create a new thread in the forums. Thank you.
 

5 More Discussions You Might Find Interesting

1. IP Networking

TCP-IP discussions from 1982 to 1991

Found this archive on the net: TCP-IP discussions from 1982 to 1991.... very interesting reading!! http://www-mice.cs.ucl.ac.uk/multimedia/misc/tcp_ip/ (0 Replies)
Discussion started by: Neo
0 Replies

2. UNIX for Dummies Questions & Answers

Threaded Discussions for Webpages

Dear All, I run a website for a non-profit. Does anyone know where I can get free or cheap software to run threaded discussions for our website? Our website is obviously running off a unix platform. Thanks (4 Replies)
Discussion started by: evertk
4 Replies

3. Shell Programming and Scripting

Converting tables of row data into columns of tables

I am trying to transpose tables listed in the format into format. Any help would be greatly appreciated. Input: test_data_1 1 2 90% 4 3 91% 5 4 90% 6 5 90% 9 6 90% test_data_2 3 5 92% 5 4 92% 7 3 93% 9 2 92% 1 1 92% ... Output:... (7 Replies)
Discussion started by: justthisguy
7 Replies

4. What is on Your Mind?

New Buttons to Create New Discussions and Reply to Existing One

You may have noticed a lot of big blue buttons" on the site, replacing the Font Awesome icons for creating new discussions and replying to discussions. Here are the reasons for this change: A number of unix.com moderators, including Don Cragun and Ravinder Singh, have commented that new... (6 Replies)
Discussion started by: Neo
6 Replies

5. What is on Your Mind?

Disable More Discussions You Might Find Interesting in Mobile View

Hi, for quite a while this feature "xxx More Discussions You Might Find Interesting" is added below a topic here. For desktop view this is ok. I didn't make use of it so far, but it isn't disturbing me either. In mobile view however it's annoying me, because when I scroll down to the end... (3 Replies)
Discussion started by: stomp
3 Replies
Mojo(3pm)						User Contributed Perl Documentation						 Mojo(3pm)

NAME
Mojo - Duct tape for the HTML5 web! SYNOPSIS
use Mojo::Base 'Mojo'; # All the complexities of CGI, PSGI, HTTP and WebSockets get reduced to a # single method call! sub handler { my ($self, $tx) = @_; # Request my $method = $tx->req->method; my $path = $tx->req->url->path; # Response $tx->res->code(200); $tx->res->headers->content_type('text/plain'); $tx->res->body("$method request for $path!"); # Resume transaction $tx->resume; } DESCRIPTION
Mojo provides a flexible runtime environment for Perl real-time web frameworks. It provides all the basic tools and helpers needed to write simple web applications and higher level web frameworks such as Mojolicious. See Mojolicious for more! ATTRIBUTES
Mojo implements the following attributes. "home" my $home = $app->home; $app = $app->home(Mojo::Home->new); The home directory of your application, defaults to a Mojo::Home object which stringifies to the actual path. # Generate portable path relative to home directory my $path = $app->home->rel_file('data/important.txt'); "log" my $log = $app->log; $app = $app->log(Mojo::Log->new); The logging layer of your application, defaults to a Mojo::Log object. # Log debug message $app->log->debug('It works!'); "ua" my $ua = $app->ua; $app = $app->ua(Mojo::UserAgent->new); A full featured HTTP 1.1 user agent for use in your applications, defaults to a Mojo::UserAgent object. Note that this user agent should not be used in plugins, since non-blocking requests that are already in progress will interfere with new blocking ones. # Perform blocking request my $body = $app->ua->get('mojolicio.us')->res->body; METHODS
Mojo inherits all methods from Mojo::Base and implements the following new ones. "new" my $app = Mojo->new; Construct a new Mojo application. Will automatically detect your home directory and set up logging to "log/mojo.log" if there's a "log" directory. "build_tx" my $tx = $app->build_tx; Transaction builder, defaults to building a Mojo::Transaction::HTTP object. "config" my $config = $app->config; my $foo = $app->config('foo'); $app = $app->config({foo => 'bar'}); $app = $app->config(foo => 'bar'); Application configuration. # Manipulate configuration $app->config->{foo} = 'bar'; my $foo = $app->config->{foo}; delete $app->config->{foo}; "handler" $app->handler($tx); The handler is the main entry point to your application or framework and will be called for each new transaction, which will usually be a Mojo::Transaction::HTTP or Mojo::Transaction::WebSocket object. Meant to be overloaded in a subclass. sub handler { my ($self, $tx) = @_; ... } SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo(3pm)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy