text:
<?php

class ComputeResourceController extends BaseController
{

    /**
     *    Instantiate a new Compute Resource Controller Instance
     **/

    public function __construct()
    {
        $this->beforeFilter('verifyadmin');
        Session::put("nav-active", "compute-resource");

    }

    public function createView()
    {
        $this->beforeFilter('verifyeditadmin');
        Session::put("admin-nav", "cr-create");
        return View::make("resource/create");
    }

    public function createSubmit()
    {
        $this->beforeFilter('verifyeditadmin');
        $hostAliases = Input::get("hostaliases");
        $ips = Input::get("ips");
        //Compute resource is by default enabled
        $computeDescription = array(
            "hostName" => trim(Input::get("hostname")),
            "hostAliases" => array_unique(array_filter($hostAliases)),
            "ipAddresses" => array_unique(array_filter($ips)),
            "resourceDescription" => Input::get("description"),
            "enabled" => true
        );
        $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription);

        return Redirect::to("cr/edit?crId=" . $computeResource->computeResourceId);
    }

    public function editView()
    {
        $this->beforeFilter('verifyeditadmin');
        $data = CRUtilities::getEditCRData();
        $computeResourceId = "";
        if (Input::has("crId"))
            $computeResourceId = Input::get("crId");
        else if (Session::has("computeResource")) {
            $computeResource = Session::get("computeResource");
            $computeResourceId = $computeResource->computeResourceId;
        }

        if ($computeResourceId != "") {
            $computeResource = CRUtilities::get_compute_resource($computeResourceId);
            $jobSubmissionInterfaces = array();
            $dataMovementInterfaces = array();
            $addedJSP = array();
            $addedDMI = array();
            //var_dump( $computeResource->jobSubmissionInterfaces); exit;
            if (count($computeResource->jobSubmissionInterfaces)) {
                foreach ($computeResource->jobSubmissionInterfaces as $JSI) {
                    $jobSubmissionInterfaces[] = CRUtilities::getJobSubmissionDetails($JSI->jobSubmissionInterfaceId, $JSI->jobSubmissionProtocol);
                    $addedJSP[] = $JSI->jobSubmissionProtocol;
                }
            }
            //var_dump( CRUtilities::getJobSubmissionDetails( $data["computeResource"]->jobSubmissionInterfaces[0]->jobSubmissionInterfaceId, 1) ); exit;
            if (count($computeResource->dataMovementInterfaces)) {
                foreach ($computeResource->dataMovementInterfaces as $DMI) {
                    $dataMovementInterfaces[] = CRUtilities::getDataMovementDetails($DMI->dataMovementInterfaceId, $DMI->dataMovementProtocol);
                    $addedDMI[] = $DMI->dataMovementProtocol;
                }
            }

            $data["computeResource"] = $computeResource;
            $data["jobSubmissionInterfaces"] = $jobSubmissionInterfaces;
            $data["dataMovementInterfaces"] = $dataMovementInterfaces;
            $data["addedJSP"] = $addedJSP;
            $data["addedDMI"] = $addedDMI;
            //var_dump($data["jobSubmissionInterfaces"]); exit;
            return View::make("resource/edit", $data);
        } else
            return View::make("resource/browse")->with("login-alert", "Unable to retrieve this Compute Resource. Please report this error to devs.");

    }

    public function editSubmit()
    {
        $this->beforeFilter('verifyeditadmin');
        $tabName = "";
        if (Input::get("cr-edit") == "resDesc") /* Modify compute Resource description */ {
            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            $computeDescription->hostName = trim(Input::get("hostname"));
            $computeDescription->hostAliases = array_unique(array_filter(Input::get("hostaliases")));
            $computeDescription->ipAddresses = array_unique(array_filter(Input::get("ips")));
            $computeDescription->resourceDescription = Input::get("description");
            $computeDescription->maxMemoryPerNode = Input::get("maxMemoryPerNode");
//            $computeDescription->cpusPerNode = Input::get("cpusPerNode");
//            $computeDescription->defaultNodeCount = Input::get("defaultNodeCount");
//            $computeDescription->defaultCPUCount = Input::get("defaultCPUCount");
//            $computeDescription->defaultWalltime = Input::get("defaultWalltime");
            //var_dump( $computeDescription); exit;

            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);

            $tabName = "#tab-desc";
        }
        if (Input::get("cr-edit") == "queue") /* Add / Modify a Queue */ {
            $queue = array("queueName" => Input::get("qname"),
                "queueDescription" => Input::get("qdesc"),
                "maxRunTime" => Input::get("qmaxruntime"),
                "maxNodes" => Input::get("qmaxnodes"),
                "maxProcessors" => Input::get("qmaxprocessors"),
                "maxJobsInQueue" => Input::get("qmaxjobsinqueue"),
                "maxMemory" => Input::get("qmaxmemoryinqueue"),
                "cpuPerNode" => Input::get("cpuPerNode"),
                "defaultNodeCount" => Input::get("defaultNodeCount"),
                "defaultCPUCount" => Input::get("defaultCPUCount"),
                "defaultWalltime" => Input::get("defaultWalltime"),
                "queueSpecificMacros" => Input::get("queueSpecificMacros"),
                "isDefaultQueue" => Input::get('isDefaultQueue') == 'on'
            );

            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            $updatedQueues = [];
            if($queue["isDefaultQueue"]){
                foreach($computeDescription->batchQueues as $aQueue){
                    $aQueue->isDefaultQueue = false;
                    $updatedQueues[] = $aQueue;
                }
            }else{
                $updatedQueues = $computeDescription->batchQueues;
            }
            $updatedQueues[] = CRUtilities::createQueueObject($queue);
            $computeDescription->batchQueues = $updatedQueues;
            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
            //var_dump( $computeResource); exit;
            $tabName = "#tab-queues";
        } else if (Input::get("cr-edit") == "delete-queue") {
            CRUtilities::deleteQueue(Input::get("crId"), Input::get("queueName"));
            $tabName = "#tab-queues";
        } else if (Input::get("cr-edit") == "fileSystems") {
            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            $computeDescription->fileSystems = array_filter(Input::get("fileSystems"), "trim");
            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);

            $tabName = "#tab-filesystem";
        } else if (Input::get("cr-edit") == "jsp" || Input::get("cr-edit") == "edit-jsp") /* Add / Modify a Job Submission Interface */ {
            $update = false;
            if (Input::get("cr-edit") == "edit-jsp")
                $update = true;

            $jobSubmissionInterface = CRUtilities::create_or_update_JSIObject(Input::all(), $update);

            $tabName = "#tab-jobSubmission";
        } else if (Input::get("cr-edit") == "jsi-priority") {
            $inputs = Input::all();
            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            foreach ($computeDescription->jobSubmissionInterfaces as $index => $jsi) {
                foreach ($inputs["jsi-id"] as $idIndex => $jsiId) {
                    if ($jsiId == $jsi->jobSubmissionInterfaceId) {
                        $computeDescription->jobSubmissionInterfaces[$index]->priorityOrder = $inputs["jsi-priority"][$idIndex];
                        break;
                    }
                }
            }
            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);

            return 1; //currently done by ajax.
        } else if (Input::get("cr-edit") == "dmp" || Input::get("cr-edit") == "edit-dmi") /* Add / Modify a Data Movement Interface */ {
            $update = false;
            if (Input::get("cr-edit") == "edit-dmi")
                $update = true;
            $dataMovementInterface = CRUtilities::create_or_update_DMIObject(Input::all(), $update);

            $tabName = "#tab-dataMovement";
        } else if (Input::get("cr-edit") == "dmi-priority") {
            $inputs = Input::all();
            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            foreach ($computeDescription->dataMovementInterfaces as $index => $dmi) {
                foreach ($inputs["dmi-id"] as $idIndex => $dmiId) {
                    if ($dmiId == $dmi->dataMovementInterfaceId) {
                        $computeDescription->dataMovementInterfaces[$index]->priorityOrder = $inputs["dmi-priority"][$idIndex];
                        break;
                    }
                }
            }
            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);

            return 1; //currently done by ajax.
        } else if (Input::get("cr-edit") == "enableReporting") {
            $inputs = Input::all();
            $computeDescription = CRUtilities::get_compute_resource(Input::get("crId"));
            //var_dump( $computeDescription); exit;
            if( isset( $inputs["gatewayUsageReporting"]) && $inputs["gatewayUsageReporting"] == 1){
                $computeDescription->gatewayUsageReporting = true;
                $computeDescription->gatewayUsageModuleLoadCommand = $inputs["gatewayUsageModuleLoadCommand"];
                $computeDescription->gatewayUsageExecutable = $inputs["gatewayUsageExecutable"];

            }
            else{
                $computeDescription->gatewayUsageReporting = false;
                $computeDescription->gatewayUsageModuleLoadCommand = null;
                $computeDescription->gatewayUsageExecutable = null;
            }
            //var_dump( $computeDescription); exit;
            $computeResource = CRUtilities::register_or_update_compute_resource($computeDescription, true);
            $tabName = "#tab-reporting";
        }

        return Redirect::to("cr/edit?crId=" . Input::get("crId") . $tabName);
    }

    public function viewView()
    {
        $data = CRUtilities::getEditCRData();
        $computeResourceId = "";
        if (Input::has("crId"))
            $computeResourceId = Input::get("crId");
        else if (Session::has("computeResource")) {
            $computeResource = Session::get("computeResource");
            $computeResourceId = $computeResource->computeResourceId;
        }

        if ($computeResourceId != "") {
            $computeResource = CRUtilities::get_compute_resource($computeResourceId);
            $jobSubmissionInterfaces = array();
            $dataMovementInterfaces = array();
            $addedJSP = array();
            $addedDMI = array();
            //var_dump( $computeResource->jobSubmissionInterfaces); exit;
            if (count($computeResource->jobSubmissionInterfaces)) {
                foreach ($computeResource->jobSubmissionInterfaces as $JSI) {
                    $jobSubmissionInterfaces[] = CRUtilities::getJobSubmissionDetails($JSI->jobSubmissionInterfaceId, $JSI->jobSubmissionProtocol);
                    $addedJSP[] = $JSI->jobSubmissionProtocol;
                }
            }
            //var_dump( CRUtilities::getJobSubmissionDetails( $data["computeResource"]->jobSubmissionInterfaces[0]->jobSubmissionInterfaceId, 1) ); exit;
            if (count($computeResource->dataMovementInterfaces)) {
                foreach ($computeResource->dataMovementInterfaces as $DMI) {
                    $dataMovementInterfaces[] = CRUtilities::getDataMovementDetails($DMI->dataMovementInterfaceId, $DMI->dataMovementProtocol);
                    $addedDMI[] = $DMI->dataMovementProtocol;
                }
            }

            $data["computeResource"] = $computeResource;
            $data["jobSubmissionInterfaces"] = $jobSubmissionInterfaces;
            $data["dataMovementInterfaces"] = $dataMovementInterfaces;
            $data["addedJSP"] = $addedJSP;
            $data["addedDMI"] = $addedDMI;
            //var_dump($data["jobSubmissionInterfaces"]); exit;
            return View::make("resource/view", $data);
        } else
            return View::make("resource/browse")->with("login-alert", "Unable to retrieve this Compute Resource. Please report this error to devs.");

    }

    public function deleteActions()
    {
        $this->beforeFilter('verifyeditadmin');
        $result = CRUtilities::deleteActions(Input::all());
        if (Input::has("jsiId")) {
            return Redirect::to("cr/edit?crId=" . Input::get("crId") . "#tab-jobSubmission")
                ->with("message", "Job Submission Interface was deleted successfully");
        }
        if (Input::has("dmiId")) {
            return Redirect::to("cr/edit?crId=" . Input::get("crId") . "#tab-dataMovement")
                ->with("message", "Data Movement Protocol was deleted successfully");
        } elseif (Input::has("del-crId")) {
            return Redirect::to("cr/browse")->with("message", "The Compute Resource has been successfully deleted.");
        } else
            return $result;
    }

    public function browseView()
    {
        $data = CRUtilities::getBrowseCRData(false);
        $allCRs = $data["crObjects"];
        $appDeployments = $data["appDeployments"];

        $connectedDeployments = array();
        foreach ((array)$allCRs as $resource) {
            $crId = $resource->computeResourceId;
            $connectedDeployments[$crId] = 0;
            foreach ((array)$appDeployments as $deploymentObject) {
                if ($crId == $deploymentObject->computeHostId)
                    $connectedDeployments[$crId]++;
            }
        }
        Session::put("admin-nav", "cr-browse");
        return View::make("resource/browse", array(
            "allCRs" => $allCRs,
            "connectedDeployments" => $connectedDeployments
        ));

    }

    public function groupedApplicationsView(){
        return CRUtilities::getApplicationsByResource();
    }
}

?>


Be Sure to Say Hi to Your Favorite BC Management Recruitment Team at the Continuity Insights Management Conference - BC Management, Inc.
Stop by and say hi to your BC Management recruitment team at the Continuity Insights 2016 Management Conference. We'll be in the exhibit hall at booth #512. Learn about our current job openings, how we can assist you in elevating your program with staffing (contract and direct hire) and our newest BCM data research.


« How did Marianne North paint 832 paintings in 14 years?
Here is a new resource that takes a fun and lighthearted approach to drawing. This resource provides more than prompts to remind you to draw everyday. It is a guided sketchbook complete with drawing techniques, instructions about how to use different media and a guidebook with plenty of room for sketching.
Drawing Food: A Journal by illustrator Claudia Pearson is composed of two key sections. The first section is titled, How to Draw Food, and contains instruction about how to draw fruit and vegetables, how to draw meat and dairy products, how to draw treats from the bakery, and how to draw household kitchen items. In this section, Pearson discusses line drawing, shading, how to work with colored pencils, and how to work with color pastels. Her instructions are clear, simple and doable.
In Part Two of her book, Pearson establishes a two-page spread for each week of the year and provides fun prompts for sketching enthusiasts. She challenges readers with thought-provoking tasks such as drawing what they find at their local farmer's market, drawing something seasonal that isn't produce, and challenges them to describe other culinary subjects in a visual way.
If the word "draw" makes you nervous, this book will help you begin to see your world through the eyes of an illustrator. It isn't focused narrowly on any one culinary topic and provides plenty of room for you to take the journal in any direction you want to take it.
Interested in beginning your own illustrated food journal and discovering how plants intersect with our lives?
May 17, 2013 (5-9 PM). In June, the Botany Craft Bar will become a regular feature during Riverside ArtsWalk, a monthly celebration of the arts in downtown Riverside.
If you can't make it to the open house next week, visit ArtPlantae's Botany Craft Bar on the first Thursday of the month during ArtsWalk. The Botany Bar will be open from 6:00 – 8:30 PM at Aurea Vista.


Organising a refit or refurbishment can be demanding – especially when juggling your day-to-day business tasks as well.
Vision offer a complete project management service that will take away any unnecessary stress and leaves you with the reassurance that your project is in safe and very capable hands.
If you choose the Vision project management team as part of your design service, you'll benefit from a level of trust and knowledge that can be passed over to the installation process, always maintaining a level of quality from your project manager.
Whether the team are involved from the beginning of the design process or appointed as a stand-alone fit-out or refurbishment contractor afterwards, they will consistently ensure that the contracting solutions balance form, function, benefit and cost in all-round package that gives you the ultimate peace of mind.
Vision's comprehensive approach to project management is based on working closely with each and every client to provide a service which is focused on delivering a job which has been completed to perfection. We'll provide seamless communication with you to coordinate your input and advise you on the best approach to take to minimise exposure to risks or avoid problems that could put the project behind.
Whether you want to take advantage of our superb range of specialist textiles or if you require a professional and experienced design partner; start your journey with Vision today.
Contact Vision to discuss your needs today and one of our friendly team will be happy to help – you'll be glad you did!
The Whitaker's team have over 100 years of collective experience at your disposal.


text:
Concision (by Cynthia Rowe)
Concision
by Cynthia Rowe
'Haiku: a poem of universal power, a brief observation on nature and all its forms.' 1/6/2009
'Haiku: a minimalist poem inspired by human interaction with nature.' 7/3/2012
Universal 'power', on rereading my earlier interpretation, seems to over-egg the influence of the genre. However, a haiku written by a poet in the Northern Hemisphere should resonate with someone whose world view has been formed in the Southern Hemisphere. Ideally an element of universality is projected through the imagistic language of a captured moment in time.
Brevity is a key fundamental. It has been said that the poem should be able to be recited in one breath. The writer should eschew poetic tools such as simile, metaphor, rhyme, anthropomorphism, personification or abstract images and language. In a satisfying haiku we can smell the sea, feel the cold of the frost under our feet, without being explicitly told.
As in this monostich:
your last wishes misty reservoir
(Cynthia Rowe - published A Hundred Gourds 4:3)
and the 3-line haiku
cold wash
lipstick on his best
wool sweater
(Cynthia Rowe - published Presence #47)
The importance of kigo can be problematic when one lives on the driest inhabited continent on the planet. Seasonal differences are often measured only by the 'wet' or the 'dry'. The ecosystems and biodiversity are dissimilar from those in other parts of the world:
billabong –
crocodiles circling
the tourist boat
(Cynthia Rowe - published Shamrock #12)
'billabong –'* which has no kigo, was inspired by a boat trip on Yellow Waters Billabong: the wetlands at sunset, waterlilies, colourful birdlife including the Jabiru (Black-necked Stork) and the gleam of crocodile eyes in the murky water. In this instance both crocodile and tourist are doing the watching. Each is sizing the other up as the potential victim. The handbag, or the meal.
Fragment and Phrase theory helps in avoiding disconnected 'lists'. (Nonetheless, some experienced haijin write satisfying haiku in one unbroken sentence: tweaking the rules can produce work above the ordinary.) The following haiku uses a fragment to set the scene followed by a phrase describing the scene:
the tribal musician plays
electric didge
(Cynthia Rowe - published Notes From the Gean #5 2:1)
'country market', a senryu (haiku concerned with human foibles) was inspired by a visit to the Eumundi Markets and the incongruity of a musician in an indigenous band playing an electrified didgeridoo. The musician, whose instrument, the didgeridoo, is the world's oldest dating back 40,000 years, is reaching across to embrace a creation of the invader who devastated his way of life only a relatively short 200 years ago.
Juxtaposition can be a useful tool to make a point:
the cat aroused
by settling birds
(Cynthia Rowe - published The Heron's Nest Vol XII (3))
With the sudden darkening of the sky in the afternoon, the birds settle while the cat awakes, as it would at nightfall, preparing to go outside and hunt down its prey. Both the birds and the cat are thrown into confusion by the rare event of a solar eclipse.
Another example of juxtaposition:
new year kiss –
a pall of gunpowder
hangs over laughter
(Cynthia Rowe - published kitchen window Jack Stamm haiku anthology; translated into Romanian and published in Albatross Vol XI No. 21 Fall (2012)/No. 22 (2013))
Coming from the viewpoint of a novelist, haiku shows the effectiveness of concision, of avoiding the over-write, of steering clear of a superfluity of adjectives and adverbs, and embracing the power of the implied. Ultimately, guidelines only help to a certain extent. It's up to each poet, each writer, to find his/her way through trial and error, through helpful editors, and hopefully relish the journey.
Biography: Cynthia Rowe is President: Australian Haiku Society; Editor: Haiku Xpressions; Past President: Bondi Writers' Group, and a Writing Fellow of FAW NSW. A University of Melbourne graduate, she has taught French and English and was awarded French Education Ministry Diplôme Approfondi de Langue Française. She has published seven novels, a poetry collection Driftwood, a haiku chapbook Floating Nest.
* noun. Australian. A branch of a river forming a backwater or stagnant pool, made by water flowing from the main stream during a flood.
billabong - definition of billabong in English from the Oxford ...
www.oxforddictionaries.com/definition/english/billabong

redpajama_set_name: RedPajamaCommonCrawl


The first of the soon to be ubiquitous cameras using 127 film, the Vest Pocket was Eastman Kodaks best selling folding camera. 1,750,000 (some say more) were made between the years 1912-1926. This particular camera was made around 1919. It's not a very good example of the camera. It's very far from mint. I suppose that's OK though as I paid only 30 pence for it at a car boot event 30 years ago.
Supposedly one of these cameras went to the top of Everest with Irving and George Mallory. Though Mallory's body was found in 1999 there was no sign of the camera which would have had the missing proof Irving and Mallory were indeed first to the top.
Tagged with: PDBarton, Vest pocket Kodak. Cameras. Vintage cameras.