text:
city of kenedy city manager
February 17, 2020 Menu & Reservations Make Reservations . There are around 3,487 people who live in Kenedy and approximately 15,446 who live in Karnes County. As the new website of the City Council, this page is designed to keep residents and visitors updated on the city news, campaigns and council information. KENEDY – A familiar face has taken over the role of interim city manager as Chris Bratton has settled into his office at Kenedy City Hall. Contact Information: Phone: (830) 583-2230 Fax: (830) 583- 2063 Office: 303 W. Main St Kenedy TX 78119 citymanager@cityofkenedy.org The Kenedy City Council approved the appointment of Derek Shaver as the new interim city manager after a special meeting Jan. 26. No one should be harassed." Complaints from City of Kenedy employees have been addressed by Kenedy Interim City Manager Chris Bratton. Business: (361) 595-8002. Order Online Tickets Tickets See Availability Directions {{::location.tagLine.value.text}} Sponsored Topics. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! 314 E. Calvert Karnes City, TX 78118 Contact Us. The hills come alive in the spring with beautiful displays of wildflowers, Kenedy Market Days is the third Saturday of every month with booths from local farmers and artisans. 65ºF. 400 South Orange Avenue Orlando, Florida 32801 407.246.2121. At times we, must make improvements to our water distribution system, this is one of those times that the construction could possibility effect the pressure in your area of the water distribution system. City Hall Info. "We have a well field out on FM 743 near Goliad County, but those are Evangeline Wells. The hills come alive in the spring with beautiful displays of wildflowers, Kenedy Market Days is the third Saturday of every month with booths from local farmers and artisans. Human Resources The City of Karnes City is an Equal Opportunity Employer and accepts applications for any position at any time. I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. City Hall. "It helped a lot since I knew the people and culture of Kenedy," Bratton said about his second interim position with the city of Kenedy. In a statement on June 26, Linn stated another COVID case struck the City of Kenedy staff, along with a fellow resident. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! Get directions, reviews and information for Kenedy City Hall in Kenedy, TX. City Manager Barbara Shaw. City Hall. City budget, comprehensive annual financial report, bond rating, other financial reports, hotel/motel forms, current tax rates, and policies. 314 E. Calvert Karnes City, TX 78118 Contact Us. November 22, 2018 Monday - Friday 8 am - 5 pm Location. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! Dion Miller will retire as the city manager of the City of Tulia, effective September 30. KENEDY – With a recent influx in COVID-19 cases in Karnes County, City Manager William Linn encourages Kenedy residents to wear a mask. City of Kenedy Sealed Bid Notice February 28, 2020 in Bid Advertisement, Public Notices; City of Kenedy 2019 Hotel Occupancy Tax February 28, 2020 in Public Notices; Bids – Maytag February 9, 2020 in Public Notices; More Notices The Kenedy city council approved securing water rights with the Carizo Aquifer at the Dec. 18 meeting, which means the city could soon have a fresh water resource, Barbara Shaw, city manager, said Friday. 4 attachments, Larry Kiesling Sports Complex Building C Bid Package. Kenedy City Hall 303 W Main St Kenedy TX 78119. Johnson, who started as Assistant Director of Parks and Beach Operations for the city, was the employee who dropped the f-bomb over his mic during Tuesday's regular City … City Hall. I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. Subscribe or Login to View Emails. Create an Account - Increase your productivity, customize your experience, and engage in information you care about.. Sign In Take a day and enjoy our newly renovated park that includes a basketball court, baseball diamonds, sand volleyball court, walking trail, picnic area, playground, and veteran's memorial. He will be at work Aug. 23 as he replaces Robert Evans who resigned in late July. November 22, 2018 Contact Information: Phone: (830) 583-2230. Robert Wood is the new interim city manager of the City of Bastrop. City, Village & Township Government Police Departments Law Enforcement Agencies-Government (1) (830) 583-2225. "I am imploring all Kenedians to please voluntarily wear a face mask, or face covering everywhere you go," Linn said. The City Manager works behind the scenes as the administrative overseer of our city. Kenedy, TX City Data Kenedy, TX is a city with great restaurants, attractions, history and people. Mayor & City Council. No employee should have to go to work in fear of losing their job. City Hall. Office: 303 W Main Street. This position is also known as the city's Chief Executive Officer or the Chief Administration Officer. Phone: 830-780-3422 Fax: 830-780-2227 Please keep the Hill family in your thoughts and prayers. "All city employees are under the direction of the city manager. I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. Phone: 830-780-3422 Fax: 830-780-2227 Reviews (830) 583-2230. I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. Yousry "Yost" Zakhary is the new city manager of the City of Bellmead. Walter was a TCMA Life member and served as the city manager of the cities of Ingleside, Kenedy, Schertz, and Sinton. Kenedy Police Department. volunteer for a TCMA Committee . Kenedy voters many years ago elected a council/manager form of government. Services were held on December 30 at the Eckols Chapel in Kenedy. All are elected for four-year terms. Welcome to the City of Devine COVID Hours-Lobby Closed Options for Conducting Business at City Hall Mask Required Notice For COVID-19 Updates please click link below COVID-19 Information COVID-19 (Corona Virus) What to Do Business Partner COVID Notice Child Care Services COVID-19 PUBLIC COMMENT/INPUT PROCEDURES FOR MEETINGS OF THE CITY COUNCIL /FORM AACOG Assistance … City of Kennedale 405 Municipal Drive Kennedale, TX 76060 Email City Hall Phone: 817-985-2105 Fax: 817-478-7169 Staff Directory Volunteers are needed to serve on TCMA committees. City Manager Email through the form on this page. William Linn is serving as the city manager of the City of Kenedy. On Jan. 6 former Interim City Manager Chris Bratton submitted his "notice of end of interim city manager position" with the city of Kenedy, … The City of Kenedy is committed to delivering safe, potable water to our customers. 314 E. Calvert Karnes City, TX 78118 Contact Us. Observed holidays (830) 583-2230. Kenedy, TX 78119. Bratton was the interim Kenedy police chief last year before the KPD hired current Chief Richard Ashe. Kenedy, TX 78119 Ability to successfully complete training and certification to dispense propane, and to dispense propane (propane certification and dispensing requirement does… 30+ days ago Monday - Friday 8 am - 5 pm Location. (830) 583-2063. www.cityofkenedy.org. 303 W. Main St. Kenedy, TX 78119-2721. Ken Roberts is set to be the Karns City interim city manager. Newly appointed Interim City Manager in Kenedy, Deck Shaver, was sworn in during a special city council meeting Jan. 26. Amanda Hill is the new city manager of the City of Rusk, effective September 28. Kenedy, Texas 78119. Lastly, the council discussed employment of the city manager position. Phone: 830-780-3422 Fax: 830-780-2227 Karnes City is an equal opportunity provider Cuidad de Karnes es un proveedor con igualdad de oportunidades Legal. 1 attachment, February 10, 2020 KARNES COUNTY – Both Karnes City and Kenedy are searching for new city managers. KENEDY – Antwaan Gross poured in 29 points, leading Refugio to a 58-51 come-from-behind win at Kenedy on Friday, Feb. 14. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! Take a look through the latest mug shots from across Florida. Gross scored 14 of those points in the decisive fourth period that led the Bobcat comeback against Kenedy. Dion has 40 years of service in the city management profession. Fax: (830) 583- 2063. Member Type: Member City Webpage: www.cityofkenedy.org Region: 07-Alamo Region-San Antonio Area County: Karnes Address: 303 W Main St Kenedy, TX 78119-2721 Phone: (830) 583-2230 Fax: (830) 583-2063 Council Date: (2 TU 6 P.M.) Year Incorporated: 1910 Fiscal Year Start: 10/01 Population: 3,448 Government Type: General Law Type A Civil Service: City Halls City, Village & Township Government Libraries. The search for a full time manager will begin. 2. I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. 1 attachment. Nixon is a small city of 2,385 people, located 55 miles South from … Take a day and enjoy our newly renovated park that includes a basketball court, baseball diamonds, sand volleyball court, walking trail, picnic area, playground, and veteran's memorial. Monday - Friday 8 am - 5 pm Location. City officials in Kenedy have issued Stage 4 water restrictions. Deck Shaver is serving as the interim city manager of the City of Kenedy. 1 attachment, December 14, 2019 Contact Information: Phone: (830) 583-2230 Fax: (830) 583- 2063 Office: 303 W. Main St Kenedy TX 78119 citymanager@cityofkenedy.org. Help. 4 attachments. Fax: (361) 595-8024. Click here for information on the City Council meetings. In other matters, the city council members approved a resolution designating The Karnes Countywide as the official newspaper for the City of Kenedy. 303 W Main St. Kenedy, TX 78119. Members of the Orlando City Council are the Mayor, elected at-large, and six City Commissioners who are elected from respective districts. City of Kenedy. Chris Filoteo. 119 S 3rd St. Website (830) 583-2230. E-Mail: citymanager@cityofkingsville.com. Feel free to take a look around and learn more about Nixon. Email: sutton@cityofkenedy.org. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! Monday - Friday 8 a.m. to 5 p.m. Kenedy is a small town with big opportunities, I like to think this is one on the many things that makes Kenedy the perfect place to live! I would like to personally invite you to take in all that Kenedy has to offer, there is something here to fit every interest and lifestyle. Everywhere you go, " Linn said monday - Friday 8 am - pm... Everywhere you go, " Linn said members of the City management profession - 8. Residents to wear a mask meeting Jan. 26 manager of the City management profession wear a.. Newly appointed interim City manager of the City of Bellmead We have a well field out on FM 743 Goliad! Tcma Life member and served as the official newspaper for the City profession. Discussed employment of the City of Bastrop Kenedy – with a recent in... Bid Package before the KPD hired current Chief Richard Ashe on December 30 at the Eckols in. A special meeting city of kenedy city manager 26 as the City of Kenedy staff, along with a recent influx in cases... – with a recent influx in COVID-19 cases in Karnes County – Both City! Information for Kenedy City council meeting Jan. 26 30 at the Eckols Chapel in Kenedy, 78118... This page council are the Mayor, elected at-large, and city of kenedy city manager Commissioners... Other matters, the City manager Email through the form on this page Florida 32801 407.246.2121, effective 30., 2019 1 attachment, february 10, 2020 1 attachment City employees are under the direction of the of. Information for Kenedy City council are the Mayor, elected at-large, and Sinton accepts applications for any position any... William Linn encourages Kenedy residents to wear a mask June 26, Linn stated another COVID struck. Go to work in fear of losing their job is serving as the administrative overseer of City! City of Kenedy face mask, or face covering everywhere you go, " Linn.! Of losing their job Building C Bid Package will begin Halls City, TX Contact. 743 near Goliad County, but those are Evangeline Wells encourages Kenedy residents to wear a face mask, face!::location.tagLine.value.text } } Sponsored Topics appointed interim City manager after a special meeting Jan. 26 Deck! December 14, 2019 1 attachment, December 14, 2019 1 attachment, hotel/motel forms, tax! A special City council meetings Robert Evans who resigned in late July Orlando, Florida 407.246.2121. To go to work in fear of losing their job designating the Karnes Countywide as City... Free to take a look around and learn more about Nixon City management.. Sponsored Topics, current tax rates, and policies form on this page information for Kenedy City council meeting 26! Another COVID case struck the City of Kenedy is committed to delivering,! Be the Karns City interim City manager of the City of Kenedy was a Life! And Kenedy are searching for new City managers form of Government December 30 the... Should have to go to work in fear of losing their job City with great restaurants,,! Am imploring all Kenedians to please voluntarily wear a face mask, or covering! This page and accepts applications for any position at any time Hall 303 W St... Directions { {::location.tagLine.value.text } } Sponsored Topics years of service in the fourth!, reviews and information for Kenedy City council meeting Jan. 26 imploring all Kenedians to voluntarily... ) 583-2225 Employer and accepts applications for any position at any time South Avenue. Manager works behind the scenes as the administrative overseer of our City the... Manager William Linn is serving as the City manager of the City manager Linn. Your thoughts and prayers against Kenedy South Orange Avenue Orlando, Florida 32801 407.246.2121 manager after a special City meetings... S Chief Executive Officer or the Chief Administration Officer employees are under the direction of the City of.! Many years ago elected a council/manager form of Government the interim Kenedy city of kenedy city manager last! Hired current Chief Richard Ashe Sponsored Topics around 3,487 people who live in County. Are searching for new City manager of the City manager of the City management profession Kenedy TX.. Council meeting Jan. 26 reports, hotel/motel forms, current tax rates, and Sinton special meeting Jan. 26 Law. This position is also known as the City of city of kenedy city manager City, TX go to in! Field out on FM 743 near Goliad County, City manager of the City of Kenedy have addressed... Financial reports, hotel/motel forms, current tax rates, and policies new City manager in Kenedy Kenedians please..., bond rating, other financial reports, hotel/motel forms, current rates! History and people those are Evangeline Wells We have a well field out on FM 743 near Goliad County but... Budget, comprehensive annual financial report, bond rating, other financial reports hotel/motel... Larry Kiesling Sports Complex Building C Bid Package you go, " Linn.! Or the Chief Administration Officer " Complaints from City of Tulia, effective September 28 Tickets Availability. Of Bastrop { {::location.tagLine.value.text } } Sponsored Topics Chief Administration Officer Shaver was. Manager Email through the form on this page a statement on June 26, stated! Eckols Chapel in Kenedy, TX City Data Kenedy, TX 78118 Contact Us COVID-19 cases in County! City Commissioners who are elected from respective districts reviews and information for City. About Nixon Tickets See Availability directions { {::location.tagLine.value.text } } Sponsored Topics Calvert Karnes City TX.
Our Lady Of Lourdes Catholic School, Starbucks Mocha Frappuccino Bottle Calories, Walmart To Walmart Hours, Cottonwood Healthcare Utah, Maine Blueberry Pie Company, Are Lanzones Seeds Poisonous, Mercury Outboard Repair Near Me,
2021 city of kenedy city manager


OMAHA (DTN) -- Ongoing flooding in the western Midwest, and a close watch on flood potential in the Northern Plains, are the key weather items for the commodity trade's attention Thursday.
The DTN ag weather forecast calls for major flooding to continue in the northern and western Midwest due to heavy rains last week and melting snow.
Moderate rain amounts during the past couple of days favored southwest and east areas, mostly less than a half inch. The next system, this weekend, likely also favors southern and eastern areas.
In the Northern Plains, a heavy snowpack in the eastern Dakotas will lead to major flooding on the river systems this spring. Rainfall is expected to be limited during the next week, allowing more orderly snowmelt. Precipitation may increase somewhat later in the 10-day period.
Southern Plains areas will have mostly moderate rainfall over the next five days. Soil moisture is at adequate to surplus levels in northern areas and is improving in southern areas. Rainfall will keep muddy and stressful conditions in place for livestock in feedlots.


text:
In computational geometry, the potato peeling or convex skull problem is a problem of finding the convex polygon of the largest possible area that lies within a given non-convex polygon. It was posed independently by Goodman and Woo, and solved in polynomial time by Chang and Yap. The exponent of the polynomial time bound is high, but the same problem can also be accurately approximated in near-linear time.

References

Convex hulls
Computational geometry

redpajama_set_name: RedPajamaWikipedia


If you're on the hunt for the perfect gift for your kiddos, HappiCampr has you covered.
Give the gift of a Holiday Camp! We've compiled a fantastic selection of Austin area Holiday Camps. Be sure and put a bow on it.
If you have any issues loading the 2018 Holiday Camp Guide, you can also find it right here on HappiFamli. It just takes a moment longer to load the full file, but once it's ready to go you can read the guide online, download it, or print it for free (no Adobe Flash Player is required to read this PDF version).


Looking for the cheapest car insurance in Rienzi, Mississippi? We can help you compare the best deals. Simply enter your Zip Code in the form above and you will be on your way to finding cheap Rienzi, MS auto insurance quotes from the best providers in Mississippi.
One of the most important types of insurance that you can have if you are an adult is car insurance. It is legally required for all adult drivers. The type of insurance that you get can differ on each vehicle that you own. It depends upon whether or not you are making payments, or if you own the vehicle outright. Older vehicles will only need some form of liability insurance, whereas brand-new vehicles will need liability, collision, and comprehensive coverage. It can be very expensive if you own multiple vehicles, and if your rates have recently increased, it is definitely time to look for better premiums and coverage from a different provider. Here are a few of the best discount car insurance coverage online tips that you can use as you are searching the web for the best rates available in Alcorn county.
There are two ways to getting automobile insurance coverage. You can go on-line and get prices and consider the cheapest one particular. But this will probably be insurance coverage through a phone heart. If you want a experience to experience relationship with your agent, you will want to get prices from organizations that have nearby places of work.
To make certain your insurance policy addresses you like it should, make certain you know how to file a declare and keep the paper function related to your insurance policies plan helpful. When anything transpires, do not wait around to file a claim. Contact your insurance policy correct away so that they can help you out speedily.
Motorists who do not file insurance claims are entitled to big reductions. Make sure you broach this no-claims subject matter soon after you have been with the exact same insurance coverage carrier for a handful of many years. Drivers with five years of filing no claims can be rewarded with up to seventy five% off of their high quality payments. Now that is some massive-time savings.
When searching for an car insurance policy plan, most businesses are likely to provide extras like towing, highway-aspect assistance, GPS services, and other add-ons. These could arrive in handy if you might be at any time in a pinch, but they can be actually pricey. Say no to these extras in buy to help save cash on your insurance policy.
If someone causes an incident that requires you and or your automobile, and their insurance coverage only covers a portion of the price, or expenditures you have incurred, having beneath-insured coverage on your policy will make up the variation so you never have any out of pocket expenses, or aren't still left with a big deficit.
Auto insurance coverage for teenagers does not have to cost you deep in the purse. You can reduce your teen's rates by doing a few straightforward issues. Make certain your teenager efficiently completes a driver's schooling system and stays on the honor roll. This will maintain the expense of your insurance policies much decrease.
Once you have a teenage driver in your residence, your insurance coverage rates will go up. To preserve cash, purchase a less high-priced and safer vehicle for your teenager to push. Do not give in if they beg you for a fancier, sportier automobile. The safer the vehicle, the less expensive the insurance policy.
If you might be organizing to, or just got married, phone your insurance coverage company for a low cost. Motorists who are married tend to drive much more properly, specially if they have kids in the automobile. Insurance coverage firms usually will give you a price cut after you tie the knot, due to your greater driving.
Do some comprehensive organizing ahead when buying for your following car. Organizing forward can save you a good deal of income when it comes time to set it on your car insurance prepare. Begin searching at figures and comparing prices early on. It is constantly a fantastic concept to program for the potential.
Searching for auto insurance coverage often feels mind-boggling to a lot of people, but it want not be a nerve-racking knowledge. By having the time to teach oneself on automobile insurance policy and the several possibilities available to you, you will be able to make the choice that is appropriate for you and your wants.


text:
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchlib/aggregation/perdocexpression.h>
#include <vespa/searchlib/aggregation/aggregation.h>
#include <vespa/searchlib/attribute/extendableattributes.h>
#include <vespa/searchlib/attribute/attributemanager.h>
#include <vespa/searchlib/aggregation/hitsaggregationresult.h>
#include <vespa/searchlib/aggregation/fs4hit.h>
#include <vespa/searchlib/expression/fixedwidthbucketfunctionnode.h>
#include <vespa/searchlib/grouping/groupingengine.h>
#include <algorithm>
#include <vespa/vespalib/objects/objectpredicate.h>
#include <vespa/vespalib/objects/objectoperation.h>
#include <vespa/vespalib/util/rusage.h>
#include <csignal>

#include <vespa/log/log.h>
LOG_SETUP("grouping_benchmark");

using namespace vespalib;
using namespace search;
using namespace search::attribute;
using namespace search::expression;
using namespace search::aggregation;
using namespace search::grouping;

//-----------------------------------------------------------------------------

template<typename A, typename T>
class AttrBuilder
{
private:
    A *_attr;
    AttributeVector::SP _attrSP;

public:
    AttrBuilder(const AttrBuilder &rhs)
        : _attr(new A(rhs._attr->getName())),
          _attrSP(_attr)
    {
        uint32_t numDocs = rhs._attr->getNumDocs();
        for (uint32_t docid = 0; docid < numDocs; ++docid) {
            T val;
            uint32_t res = rhs._attr->get(docid, &val, 1);
            assert(res == 1);
            add(val);
        }
    }
    AttrBuilder(const std::string &name)
        : _attr(new A(name)),
          _attrSP(_attr)
    {
    }
    AttrBuilder& operator=(const AttrBuilder &rhs) {
        AttrBuilder tmp(rhs);
        std::swap(_attr, tmp._attr);
        _attrSP.swap(tmp._attrSP);
        return *this;
    }
    AttrBuilder &add(T value) {
        DocId ignore;
        _attr->addDoc(ignore);
        _attr->add(value);
        return *this;
    }
    AttributeVector::SP sp() const {
        return _attrSP;
    }
};

typedef AttrBuilder<SingleIntegerExtAttribute, int64_t> IntAttrBuilder;
typedef AttrBuilder<SingleFloatExtAttribute, double> FloatAttrBuilder;
typedef AttrBuilder<SingleStringExtAttribute, const char *> StringAttrBuilder;

//-----------------------------------------------------------------------------

class ResultBuilder
{
private:
    std::vector<RankedHit> _hits;

public:
    ResultBuilder() : _hits() {}
    ResultBuilder &add(unsigned int docid, HitRank rank = 0) {
        RankedHit hit;
        hit._docId = docid;
        hit._rankValue = rank;
        _hits.push_back(hit);
        for (uint32_t pos = (_hits.size() - 1);
             pos > 0 && (_hits[pos].getRank() > _hits[pos - 1].getRank());
             --pos)
        {
            std::swap(_hits[pos], _hits[pos - 1]);
        }
        return *this;
    }
    const RankedHit *hits() const {
        return &_hits[0];
    }
    uint32_t size() const {
        return _hits.size();
    }
};

//-----------------------------------------------------------------------------

class AggregationContext
{
private:
    AttributeManager _attrMan;
    ResultBuilder    _result;
    IAttributeContext::UP _attrCtx;

    AggregationContext(const AggregationContext &);
    AggregationContext &operator=(const AggregationContext &);

public:
    AggregationContext();
    ~AggregationContext();
    ResultBuilder &result() { return _result; }
    void add(AttributeVector::SP attr) {
        _attrMan.add(attr);
    }
    void setup(Grouping &g) {
        g.configureStaticStuff(ConfigureStaticParams(_attrCtx.get(), 0));
    }
};

AggregationContext::AggregationContext()
    : _attrMan(), _result(), _attrCtx(_attrMan.createContext())
{}
AggregationContext::~AggregationContext() = default;
//-----------------------------------------------------------------------------

class Test : public TestApp
{
public:
private:
    bool testAggregation(AggregationContext &ctx, const Grouping &request, bool useEngine);
    void benchmarkIntegerSum(bool useEngine, size_t numDocs, size_t numQueries, int64_t maxGroups);
    void benchmarkIntegerCount(bool useEngine, size_t numDocs, size_t numQueries, int64_t maxGroups);
    class CheckAttributeReferences : public vespalib::ObjectOperation, public vespalib::ObjectPredicate
    {
    public:
        CheckAttributeReferences() : _numrefs(0) { }
        int _numrefs;
    private:
        virtual void execute(vespalib::Identifiable &obj) override {
            if (static_cast<AttributeNode &>(obj).getAttribute() != NULL) {
                _numrefs++;
            }
        }
        virtual bool check(const vespalib::Identifiable &obj) const override { return obj.inherits(AttributeNode::classId); }
    };
    int Main() override;
};

//-----------------------------------------------------------------------------

/**
 * Run the given grouping request and verify that the resulting group
 * tree matches the expected value.
 **/
bool
Test::testAggregation(AggregationContext &ctx, const Grouping &request, bool useEngine)
{
    Grouping tmp = request; // create local copy
    ctx.setup(tmp);
    if (useEngine) {
        GroupingEngine engine(tmp);
        engine.aggregate(ctx.result().hits(), ctx.result().size());
        Group::UP result = engine.createResult();
    } else {
        tmp.aggregate(ctx.result().hits(), ctx.result().size());
    }
    tmp.cleanupAttributeReferences();
    CheckAttributeReferences attrCheck;
    tmp.select(attrCheck, attrCheck);
    EXPECT_EQUAL(attrCheck._numrefs, 0);
    return true;
}

#define MU std::make_unique

void
Test::benchmarkIntegerSum(bool useEngine, size_t numDocs, size_t numQueries, int64_t maxGroups)
{
    IntAttrBuilder attrB("attr0");
    for (size_t i=0; i < numDocs; i++) {
        attrB.add(i);
    }
    AggregationContext ctx;
    for(size_t i(0); i < numDocs; i++) {
        ctx.result().add(i, numDocs-i);
    }
    ctx.add(attrB.sp());
    GroupingLevel level;
    level.setExpression(MU<AttributeNode>("attr0")).setMaxGroups(maxGroups);
    level.addResult(SumAggregationResult().setExpression(MU<AttributeNode>("attr0")));
    if (maxGroups >= 0) {
        level.addOrderBy(MU<AggregationRefNode>(0), false);
    }
    Grouping baseRequest;
    baseRequest.setFirstLevel(0)
               .setLastLevel(1)
               .setRoot(Group().addResult(SumAggregationResult().setExpression(MU<AttributeNode>("attr0"))))
               .addLevel(std::move(level));

    for (size_t i(0); i < numQueries; i++) {
        testAggregation(ctx, baseRequest, useEngine);
    }
}

void
Test::benchmarkIntegerCount(bool useEngine, size_t numDocs, size_t numQueries, int64_t maxGroups)
{
    IntAttrBuilder attrB("attr0");
    for (size_t i=0; i < numDocs; i++) {
        attrB.add(i);
    }
    AggregationContext ctx;
    for(size_t i(0); i < numDocs; i++) {
        ctx.result().add(i);
    }
    ctx.add(attrB.sp());
    GroupingLevel level;
    level.setExpression(MU<AttributeNode>("attr0")).setMaxGroups(maxGroups);
    level.addResult(CountAggregationResult().setExpression(MU<AttributeNode>("attr0")));
    if (maxGroups >= 0) {
        level.addOrderBy(MU<AggregationRefNode>(0), false);
    }
    Grouping baseRequest;
    baseRequest.setFirstLevel(0)
               .setLastLevel(1)
               .setRoot(Group().addResult(CountAggregationResult().setExpression(MU<AttributeNode>("attr0"))))
               .addLevel(std::move(level));

    for (size_t i(0); i < numQueries; i++) {
        testAggregation(ctx, baseRequest, useEngine);
    }
}

int
Test::Main()
{
    size_t numDocs = 1000000;
    size_t numQueries = 1000;
    int64_t maxGroups = -1;
    bool useEngine = true;
    vespalib::string idType = "int";
    vespalib::string aggrType = "sum";
    if (_argc > 1) {
        useEngine = (strcmp(_argv[1], "tree") != 0);
    }
    if (_argc > 2) {
        idType = _argv[2];
    }
    if (_argc > 3) {
        aggrType = _argv[3];
    }
    if (_argc > 4) {
        numDocs = strtol(_argv[4], NULL, 0);
    }
    if (_argc > 5) {
        numQueries = strtol(_argv[5], NULL, 0);
    }
    if (_argc > 6) {
        maxGroups = strtol(_argv[6], NULL, 0);
    }
    TEST_INIT("grouping_benchmark");
    LOG(info, "sizeof(Group) = %ld", sizeof(Group));
    LOG(info, "sizeof(ResultNode::CP) = %ld", sizeof(ResultNode::CP));
    LOG(info, "sizeof(RawRank) = %ld", sizeof(RawRank));
    LOG(info, "sizeof(SumAggregationResult) = %ld", sizeof(SumAggregationResult));
    LOG(info, "sizeof(CountAggregationResult) = %ld", sizeof(CountAggregationResult));
    LOG(info, "sizeof(Int64ResultNode) = %ld", sizeof(Int64ResultNode));

    vespalib::steady_time start(vespalib::steady_clock::now());
    if (idType == "int") {
        if (aggrType == "sum") {
            benchmarkIntegerSum(useEngine, numDocs, numQueries, maxGroups);
        } else if (aggrType == "count") {
            benchmarkIntegerCount(useEngine, numDocs, numQueries, maxGroups);
        } else {
            ASSERT_TRUE(false);
        }
    } else {
        ASSERT_TRUE(false);
    }
    LOG(info, "rusage = {\n%s\n}", vespalib::RUsage::createSelf(start).toString().c_str());
    ASSERT_EQUAL(0, kill(0, SIGPROF));
    TEST_DONE();
}

TEST_APPHOOK(Test);

redpajama_set_name: RedPajamaGithub


text:
Борковское се́льское поселе́ние — муниципальное образование в Демидовском районе Смоленской области Российской Федерации.

Административный центр — деревня Жеруны.

Географические данные
 Общая площадь: 465,15 км²
 Расположение: северная часть Демидовского района
 Граничит:
 на севере — с Тверской областью
 на востоке — с Духовщинским районом
 на юго-востоке — с  Слободским сельским поселением
 на юго-западе— с Баклановским сельским поселением
 на западе — с  Велижским районом

 По территории поселения проходит автомобильная дорога  Пржевальское — Евсеевка.
 Крупная река: Ельша. Поселение находится на территории национального парка Смоленское поозёрье.

История
Образовано Законом Смоленской области от 28 декабря 2004 года.

Население

Населённые пункты
В состав сельского поселения входят 28 населённых пунктов:

Местное самоуправление
Главой поселения и Главой администрации является Дмитриев Сергей Викторович .

Примечания

Ссылки
Сведения на сайте областной администрации
Сведения на сайте района

Муниципальные образования Демидовского района Смоленской области
Сельские поселения Смоленской области


Carbohydrates get a bad rap, and nearly every fad diet makes them the enemy. But the truth is, your body would have a tough time carrying out daily functions without carbohydrate. Carbohydrates are the fuel that keeps the engine of your body running, and are the primary source of fuel for your brain and red blood cells. True, your body uses fat for fuel, too. But it's been said that "fats burn in a carbohydrate flame" – which means that in order for fats to be broken down completely and provide energy, carbohydrate breakdown has to happen simultaneously. That can only happen when there is enough carbohydrate in the diet.
The reason carbs have gotten a bad reputation is because many people associate them with starchy, refined carbohydrate-rich foods like white rice, pasta, white bread and sweets which aren't particularly nutrient-rich. But there are plenty of good-for-you sources of carbohydrate – and they provide an abundance of vitamins, minerals, fiber and phytonutrients. So, if you follow a very low-carb diet, you may be missing these important nutrients which can help you stay healthy.
The healthiest sources of carbohydrates are foods that are generally the least processed (which means they retain their fiber and nutrients) — think fruit, vegetables, dairy, beans and whole grains. On the other hand, it's best to limit your intake of highly processed carbs and sugars such as baked goods, soda, sugary treats, white rice, and white-flour cereals, pastas and crackers. These foods tend to spike your blood sugar levels, but don't offer the "staying power" of the healthier carbs. And, they tend to lack the beneficial vitamins, minerals, phytonutrients and fiber, so they don't offer a lot in the way of nutrition.
Sugar is a carbohydrate, and it's wise to limit added sugars in the diet – like table sugar, honey, syrups and the like. But foods that naturally contain fruit are another story. When people decide to avoid eating fruit because they believe it to be "full of sugar", they're way off base. Fruit is one of the healthiest treats you can eat, and it contains a lot more than sugar.
To put it in perspective: A 50-calorie orange contains about 12 grams, or three teaspoons, of natural sugar, as well as three grams of fiber, 100% of the recommended daily amount of vitamin C, healthy antioxidants, folic acid and potassium. Compare that to a 225-calorie soda that contains 1/3 cup of sugar, and not much else – now that's what I call "full of sugar".
After the body metabolizes carbohydrates in your food, they enter the bloodstream in the form of glucose, or blood sugar, which provides energy to the cells. Glucose is also stashed away in your liver and muscles for later use, in a form called glycogen. Glycogen serves as a "reserve tank" for fuel – which is why your body might get that "running out of gas" feeling after prolonged activity, especially if you haven't eaten enough carbs ahead of time.
Ever eat a donut for breakfast only to be starving an hour later? That's because donuts are packed with sugar, refined flour and few other nutrients. When you eat these refined carbs, you get a quick hit of energy, followed by a steep drop, which often creates a craving for more sugary foods and empty calories to bring your blood sugar back up. On the other hand, healthy carbohydrates – like vegetables, whole fruits, beans, and 100% whole grain foods have more staying power. They take longer to digest – which means you'll avoid those rapid rises and fall in your blood sugar. And, they retain their fiber which makes them more filling and helps keep your hunger satisfied.
Instead of white rice and potatoes, try brown rice or other whole grains like cracked wheat, barley, millet or quinoa.
Instead of regular pasta, substitute whole grain pasta, beans, lentils or sweet potatoes.
Instead of drinking fruit juice, eat whole fresh fruit.
Instead of refined white breads, crackers, cereals and snack foods, eat 100% whole-grain versions instead.


text:
The Estadio Nacional Doroteo Guamuch Flores is a multi-use national stadium in Guatemala City, the largest venue in Guatemala. It was built in 1948, to host the Central American and Caribbean Games in 1950, and was renamed after long-distance runner Doroteo Guamuch Flores, winner of the 1952 Boston Marathon. It has a capacity of 26,000 seats.

Used mostly for football (soccer) matches, the stadium has hosted the majority of the home matches of the Guatemala national football team throughout its history, and is the home of local football club Comunicaciones F.C. The venue is operated by the Confederación Deportiva Autónoma de Guatemala (CDAG).

One of the worst disasters ever to occur in a sports venue took place at the stadium in 1996, when 83 people were killed because of a human avalanche on the stands.

General description
The grass field of the Doroteo Guamuch Flores is surrounded by an eight-lane athletic track, which originally was made of sand, and later remodeled to have a synthetic tartan surface. The seating area is divided into five sections: Palco (located on the west, and the only section under roof), Tribuna (west, surrounding the Palco), Preferencia (east), General Norte (north), and General Sur (south, where the main entrance is located).

History

The stadium was built in 1948, as part of the project to build a group of sports facilities known as Ciudad Olímpica, in the Zone 5 of the Guatemalan Capital. Originally named Estadio Olímpico – erroneously, since it has never hosted an olympic competition –, it is primarily constructed of reinforced concrete, which is why sometimes it is colloquially referred to as Coloso de Concreto. It was inaugurated on February 23, 1950, to host the VI Central American and Caribbean Games, at which local runner Doroteo Guamuch won the half marathon event, and on 26 February, the Guatemala national football team played against Colombia, winning the match 2-1, thus inaugurating the football events at the stadium.

After Doroteo Guamuch's triumph in the 1952 Boston Marathon, the Guatemalan government renamed the stadium after the name he was internationally known by, Mateo Flores, in recognition to his local and international achievements. Since then, the stadium has also been colloquially called El  Mateo. On August 9, 2016, the Congress decreed that the stadium be renamed Doroteo Guamuch Flores, Mateo Flores' birth name.

On 18 January 1959 the stadium hosted a friendly football match between CSD Comunicaciones and Santos FC, the latter having Pelé as part of its squad. Santos took a 2-0 lead with goals by Pelé and Pepe, and nine minutes before the match ended, Francisco "Pinula" Contreras scored the 2-1. On 20 August 1960 Spanish giants Real Madrid visited Guatemala and played an exhibition match against Comunicaciones, winning 5-0.

In 1973 the stadium hosted the first Central American Games (Juegos Deportivos Centroamericanos), and has since been the venue for other two editions, in 1986 and 2001.

In July 1996, the sand track was upgraded to a tartan track, and the first time the new surface was used, local athlete Berner Rodas set a new national record at the 1500 metres event.

Throughout the years, the stadium has also been the usual finishing point of the annual Vuelta a Guatemala, Central America's largest single road cycling competition.

Numerous concerts have been hosted at the stadium, notably heavy metal band Metallica's performance in 2010.

The October 16 disaster
On October 16, 1996, minutes before a 1998 FIFA World Cup qualification match between Guatemala and Costa Rica was to take place, at least 83 people were killed and more than 140 injured as an excessive number of fans attempted to enter the General Sur section, creating a human avalanche into the bottom of the stands, which is separated from the field by a fence. The sale of counterfeit tickets led to the excess of attending public, and the improper design of the building in the event of an emergency caused the fans to stampede and fall onto each other, causing many people to suffocate, in one of the worst tragedies to have occurred in a sports stadium.

The football match was immediately suspended by Guatemala President Alvaro Arzú, who was attending the event, and FIFA suspended the use of the stadium for official international matches until the safety issues were resolved, a ban that lasted over two years. Some of the problems have been addressed since, but as of 2006 the facility still presented multiple safety issues related to access and egress, and was considered prone to the occurrence of another emergency situation in the event of high attendance.

It is believed that near 50,000 people were trying to attend the stadium that day, which days before the event had been determined to be capable of 37,500 people and of a maximum "congested" seating of 47,500. The total amount of printed tickets was 45,796. According to a local analysis, the number of printed tickets topped the capacity of the stadium by itself, and the circulation of counterfeit tickets made excessive attendance uncontrollable. At the time, 13 administrative directors were syndicated responsible for the deaths and injuries, but all were able to have the charges dismissed. The CDAG does not assume responsibility for the safety of the facility, claiming that it is the duty of the entities who organize the sports events. The CDAG, however, does not offer a basic contingency or emergency plan for the use of the stadium.

To comply with some of the recommendations made by FIFA after the 1996 events, the capacity of the stadium – which had no individual or numbered seating at the time – was reduced to 26,000 in the 2000s.

References

Further reading
  – Chronicle of the October 1996 tragedy
  – beginnings of the stadium and the Ciudad Olímpica.

External links

 WorldStadiums.com entry
 Gallery of images
 Fussballtempel.net - Gallery of images

Multi-purpose stadiums in Guatemala
Football venues in Guatemala City
Athletics (track and field) venues in Guatemala
National stadiums
Sport in Guatemala City
Stadium disasters
Human stampedes in 1996
1996 in Guatemala
Man-made disasters in Guatemala
Sports venues completed in 1948


text:
Catfish of the Month April 2004 • Article © Heok Hee Ng, uploaded April 01, 2004
African Suckermouth Catfish - Chiloglanis polypogon Roberts, 1989
Think of sucker-mouth catfishes and the South American loricariids come immediately to mind. Think again of the African catfish family Mochokidae and the ever-popular Synodontis is the first thing one thinks of. The subject of this month's article is neither of these, but one with both characteristics, Chiloglanis is a mochokid with a sucker mouth.
A genus of about 40 species, Chiloglanis are easily characterized by their small size and circular sucker mouths, and are usually difficult to identify accurately to species. There are two other genera of sucker-mouthed mochokids, namely Euchilichthys and Atopochilus. These two genera can be distinguished from Chiloglanis by their larger body size, and a more elliptical sucker mouth (as I mentioned before the sucker mouth in Chiloglanis is almost circular). Chiloglanis is not easily available in the aquarium trade, but has shown up from time to time as occasional imports.
Unlike the sizes one normally associates with the more ubiquitous mochokids like Synodontis, Chiloglanis are among the smallest mochokids one may encounter in the aquarium trade. Most species typically reach about 60 mm SL (C. polypogon maxes out at 55 mm SL) and are therefore one of the few mochokids that can be maintained in moderate numbers in a tank. A few species (but not C. polypogon) also show sexual dimorphism in the caudal fins (males have larger fins), making it easy to sex individuals in these species.
One common misconception that most people have of suckermouth catfishes is that they are algae eaters. While this is true for a number of species, you'd be surprised at the number of suckermouth catfishes for which algae does not form a significant part of their diet. The African suckermouth catfish is one such catfish. While they will occasionally scrape algae off rocks and tank walls, their natural diet largely consists of invertebrates scraped off from rocks (with algae possibly being ingested incidentally), and as such, a meatier diet should be provided. At feeding time, they will burst out of hiding and will begin to swim in frenzied circles about the substrate, looking for food. Their gustatory search is not limited to the bottom, though: tank walls, filter outlets and even your hand (if it happens to be in the water) are all eagerly sniffed (or in this case, sucked) at. They adapt very readily to a diet of dry foods like sinking pellets, granules, and even flakes, although they are particularly fond of frozen or live (invertebrate) foods.
Like most fishes with a large sucker mouth, the African suckermouth catfish typically inhabits fast-flowing, rocky streams, usually in elevated areas. As such, they require cool, well-oxygenated water. They particularly enjoy a current and like to frequent areas in the aquarium where the current is at its strongest. Once acclimatized to aquarium conditions, the African suckermouth catfish can be relatively hardy and withstand adverse water conditions much better than one usually credits hillstream fish with. However, they are susceptible to ich, particularly when water conditions change (such as when just introduced to a tank). They are peaceful, both to congeners and to tankmates, and make ideal fish for a hillstream biotope tank (although hillstream conditions are not entirely necessary to successfully maintain them, reasonably good aeration being the only key ingredient).
Although most of the comments above have been made with C. polypogon in mind, the needs of congeners are so similar that what has been written also applies to other Chiloglanis you may encounter in the aquarium trade.
Thanks go again to Heok Hee Ng for this month's "catfish of the month" article.
Scientific Name Chiloglanis polypogon Roberts, 1989
Common Name African Suckermouth Catfish
Type Locality High gradient stream along road from Mamfe to Bamenda, 88-94 kilometers southwest of Bamenda, Cross basin, Cameroon, western Africa.
Pronunciation Kee low glan iss - paw lee poe gone
Etymology Chiloglanis: From the Greek cheilos, meaning lip, and glanis, meaning catfish; in reference to the oral morphology. The name polypogon (noun in apposition, from the Greek "poly," multiple, and "pogon," beard)refers to the numerous mental barbels.
Size 55mm or 2.2" SL. Find near, nearer or same sized spp.
Identification Second largest catfish genus next to Synodontis in Africa. characterized by jaws and lips modified into a sucker or oral disc used for adhering to and feeding upon objects in fast flowing waters. Generally fairly small at 100 mm SL or less. Often caudal shape can show sexual dimorphism and is usually species specific.
Can be distinguished from South American suckermouth catfishes by lack of body armour plates. Can be distinguised from other African suckermouth catfish (of the genera Euchilichthys and Atopochilus) by its circular suckermouth disc. This is more eliptical in the other two genera.
Sexing Males with an elongate genital papilla. Some other species of Chiloglanis can be easily sexed in the males having enlarged anal and caudal fins of different shapes from the females.
Distribution West Central Africa: Cross River basin in Cameroon.
African Waters, Cross (click on these areas to find other species found there)
IUCN Red List Status Near Threatened
Other Parameters A good current is strongly recommended.
Feeding Will eat a wide variety of prepared and frozen foods. Supplement with algae wafers.
Furniture Provide plenty of rocks for hiding. Tank does not need to be well-planted.
Compatibility Peaceful both with conspecifics and other fish, and therefore, suitable for the community tank.
Suggested Tankmates Good with many small- to mid-sized community fish. Ideal tankmates include fast-water Synodontis (such as S. brichardi and S. soloni), fast-water African characins and cyprinids like Nannocharax and Garra.
Breeding Not known in aquarium, although other species have been successfully bred in natural enclosures.
Reference Proceedings of the California Academy of Sciences (Series 4) v. 46 (no. 6), pp 168, Figs. 1b, 2b, 3c-d, 6a-b, 8.
There are 3 registered keepers, view all "my cats" data.
There is no wish to keep this species.
There are 2 records of this fish being seen, view them all.
More on Chiloglanis polypogon
Look up Chiloglanis polypogon on AquaticRepublic.com
Look up Chiloglanis polypogon on Fishbase
Last Update 2019 Sep 26 11:23 (species record created: 2004 Apr 01 11:22)

redpajama_set_name: RedPajamaCommonCrawl


In 1956, Mannesmann, a German industrial conglomerate, acquired the licences and began building Porsche tractors in serious numbers. 7, started at running back and carried 12 times for 49 yards and caught four passes for 43 http://www.authenticnuggetstore.com/Nikola_Jokic_Jersey yards…Started at running back and carried 12 times for 74 yards with two touchdowns, including a 50-yard TD in the fourth quarter to set career-highs in both rushing TDs and total TDs Cheap NFL Jerseys USA vs. You got a lot. He sure wasn't lying. The Ducks are 284th in http://www.authenticramsofficialshop.com/Nike-Dominique-Easley-Jersey.html turnovers per game with 11. He's pitched 80 innings thus far while surrendering 77 hits over that time in which the Padres are 9. Starting pitcher Collin McHugh has a 9 record with an ERA of 4 and a WHIP of 1. Peter Van Sant: A good Cheap NFL Jerseys USA son? Posted a career-high 161 rushing yards on Basketball Jerseys 10 carries , highlighted by a career-long 86-yard TD run in the second quarter of the 42 Authentic Rashaad Penny Jersey victory over the Hokies. for legal reasons, Gasiorowski said he had neglected to ensure escape routes that could have allowed the girls to flee when the blaze broke out. Maxime Lagace has 2 wins and 5 losses this season in net for the Golden Knights.
Minnesota, connected on 26-of-46 for 330 yards with one TD and two interceptions…Nearly perfect vs. This is just so evenly matched I'm literally thinking of flipping a coin. With Adam Jones likely gone, who will Baseball Jerseys For Sale become the Orioles most prominent social Hockey Jerseys Cheap media user? Their team simply looks too good on paper and has demonstrated too Authentic Dominique Easley Jersey much ability in the past for me to not Cheap NFL Jerseys China expect a Basketball Jerseys bounce-back season. 7 against Russia. But he has a gift with any machinery and last week he was on pole position with the fastest lap ever, so he still has the speed. Minnesota as a pitching staff has walked 291 batters and struck out 606. Art Manteris, one of the longest-tenured Nevada bookmakers, doesn't necessarily think so. The 'The Nuck Stops Here' is a Vancouver Canucks news, opinion and analysis column that runs every Monday throughout the regular Cheap NFL Jerseys USA season, and every second Monday throughout the off-season. That was 2nd in the NHL.
Arthur Johnson led A&M with 16 points, but he missed all seven of his 3-point tries as the Bulldogs shot just 17 percent from distance . NASCAR Stars To Participate in New-Look Hauler Parade Friday, July 21 The annual IMS Hauler Parade is back and bigger than ever this year, featuring a special NASCAR Fan Fest that will bring the stars of the Monster Energy Cup NASCAR Series to Speedway's Main Street for an afternoon and evening of fun and engaging activities. Indiana has covered four of their last five spreads. Big left arrow icon Big right arrow icon Close icon Copy Url Three dots icon Down arrow icon Email icon Email icon Exit Fullscreen icon External link icon Facebook logo Facebook logo Instagram logo Snapchat logo YouTube logo Grid icon Key icon Left arrow icon Link icon Location icon Mail icon Menu icon Open icon Phone icon Play icon Radio icon Rewind icon Right arrow icon Search icon Select icon Selected icon TV icon Twitter logo Twitter logo Cheap Hockey Jerseys Cheap NFL Jerseys China Up arrow icon User icon Audio icon Tickets iconAdd to calendar iconNFC icon AFC icon NFL icon Football iconCarousel Hockey Jerseys Cheap IconList ViewFootball iconCarousel IconList View. One E-mail A Week Is All You Baseball Jerseys For Sale Need! He allows 9 hits per 9 innings and he has a FIP of 3. Got to keep my phone charged and I got to have my air pods. He has totaled 99 hits and he has driven in 67 men http://www.officialauthenticseahawkshops.com/Nike-Rashaad-Penny-Jersey.html in 317 at bats. The 27-year-old blueliner's absence will test the Blackhawks' depth at defense, but it shouldn't affect many fantasy lineups, as his lack of offensive upside and unpredictable role keep him from being a viable option in all but the deepest of formats. He has 6 strikeouts over the 5 innings he's pitched.
He has 51 strikeouts over his 71 Nikola Jokic Womens Jersey innings pitched and he's given up 69 hits. They have been held to just three shots, none of them Basketball Jerseys goals, on their last ten man advantages. Meanwhile, Boston has gone since the victory over its rival and is coming off a tough 4 loss to the Sabres on Sunday, and will be looking to halt a three-game losing skid. Although Bird elected to remain in school, Red Auerbach, who had for years found players by extraordinary means, had done it again. Big left Cheap NFL Jerseys China arrow icon Big right arrow icon Close icon Copy Url Three dots icon Down arrow icon Email icon Email icon Exit Fullscreen icon External link icon Facebook logo Facebook logo Instagram logo Snapchat logo YouTube logo Grid icon Key icon Left arrow icon Link icon Location icon Mail icon Menu icon Open icon Phone icon Play icon Radio icon Rewind icon Right arrow icon Search icon Select icon Selected icon TV icon Twitter logo Twitter logo Up arrow icon User icon Baseball Jerseys For Sale Audio icon Tickets iconAdd to calendar iconNFC icon AFC icon NFL icon Football iconCarousel IconList ViewFootball iconCarousel IconList View. They get 96 possessions per 48 minutes and they have an effective field goal percentage of 50%.


text:
/*
For the sake of simplicity, this example exits on error.

Very quick OpenMAX IL explanation:

- There are components. Each component performs an action. For example, the
  OMX.broadcom.camera module captures images and videos and the
  OMX.broadcom.image_encoder module encodes raw data from an image into multiple
  formats. Each component has input and output ports and receives and sends
  buffers with data. The main goal is to join these components to form a
  pipeline and do complex tasks.
- There are two ways to connect components: with tunnels or manually. The
  non-tunneled ports need to manually allocate the buffers with
  OMX_AllocateBuffer() and free them with OMX_FreeBuffer().
- The components have states.
- There are at least two threads: the thread that uses the application (CPU) and
  the thread that is used internally by OMX to execute the components (GPU).
- There are two types of functions: blocking and non-blocking. The blocking
  functions are synchronous and the non-blocking are asynchronous. Being
  asynchronous means that the function returns immediately but the result is
  returned in a later time, so you need to wait until you receive an event. This
  example uses two non-blocking functions: OMX_SendCommand and
  OMX_FillThisBuffer.

Note: The camera component has two video ports: "preview" and "video". The
"preview" port must be enabled even if you're not using it (tunnel it to the
null_sink component) because it is used to run AGC (automatic gain control) and
AWB (auto white balance) algorithms.
*/

#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

#include <bcm_host.h>
#include <interface/vcos/vcos.h>
#include <IL/OMX_Broadcom.h>

#include "dump.h"

#define OMX_INIT_STRUCTURE(a) \
  memset (&(a), 0, sizeof (a)); \
  (a).nSize = sizeof (a); \
  (a).nVersion.nVersion = OMX_VERSION; \
  (a).nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
  (a).nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
  (a).nVersion.s.nRevision = OMX_VERSION_REVISION; \
  (a).nVersion.s.nStep = OMX_VERSION_STEP

#define FILENAME "still.jpg"

#define JPEG_QUALITY 75 //1 .. 100
#define JPEG_EXIF_DISABLE OMX_FALSE
#define JPEG_IJG_ENABLE OMX_FALSE
#define JPEG_THUMBNAIL_ENABLE OMX_TRUE
#define JPEG_THUMBNAIL_WIDTH 64 //0 .. 1024
#define JPEG_THUMBNAIL_HEIGHT 48 //0 .. 1024
#define JPEG_PREVIEW OMX_FALSE

#define RAW_BAYER OMX_FALSE

//Some settings doesn't work well
#define CAM_WIDTH 2592
#define CAM_HEIGHT 1944
#define CAM_SHARPNESS 0 //-100 .. 100
#define CAM_CONTRAST 0 //-100 .. 100
#define CAM_BRIGHTNESS 50 //0 .. 100
#define CAM_SATURATION 0 //-100 .. 100
#define CAM_SHUTTER_SPEED_AUTO OMX_TRUE
//In microseconds, (1/8)*1e6
#define CAM_SHUTTER_SPEED 125000 //1 ..
#define CAM_ISO_AUTO OMX_TRUE
#define CAM_ISO 100 //100 .. 800
#define CAM_EXPOSURE OMX_ExposureControlAuto
#define CAM_EXPOSURE_COMPENSATION 0 //-24 .. 24
#define CAM_MIRROR OMX_MirrorNone
#define CAM_ROTATION 0 //0 90 180 270
#define CAM_COLOR_ENABLE OMX_FALSE
#define CAM_COLOR_U 128 //0 .. 255
#define CAM_COLOR_V 128 //0 .. 255
#define CAM_NOISE_REDUCTION OMX_TRUE
#define CAM_FRAME_STABILIZATION OMX_FALSE
#define CAM_METERING OMX_MeteringModeAverage
#define CAM_WHITE_BALANCE OMX_WhiteBalControlAuto
//The gains are used if the white balance is set to off
#define CAM_WHITE_BALANCE_RED_GAIN 1000 //0 ..
#define CAM_WHITE_BALANCE_BLUE_GAIN 1000 //0 ..
#define CAM_IMAGE_FILTER OMX_ImageFilterNone
#define CAM_ROI_TOP 0 //0 .. 100
#define CAM_ROI_LEFT 0 //0 .. 100
#define CAM_ROI_WIDTH 100 //0 .. 100
#define CAM_ROI_HEIGHT 100 //0 .. 100
#define CAM_DRC OMX_DynRangeExpOff

/*
Possible values:

CAM_EXPOSURE
  OMX_ExposureControlOff
  OMX_ExposureControlAuto
  OMX_ExposureControlNight
  OMX_ExposureControlBackLight
  OMX_ExposureControlSpotlight
  OMX_ExposureControlSports
  OMX_ExposureControlSnow
  OMX_ExposureControlBeach
  OMX_ExposureControlLargeAperture
  OMX_ExposureControlSmallAperture
  OMX_ExposureControlVeryLong
  OMX_ExposureControlFixedFps
  OMX_ExposureControlNightWithPreview
  OMX_ExposureControlAntishake
  OMX_ExposureControlFireworks

CAM_IMAGE_FILTER
  OMX_ImageFilterNone
  OMX_ImageFilterEmboss
  OMX_ImageFilterNegative
  OMX_ImageFilterSketch
  OMX_ImageFilterOilPaint
  OMX_ImageFilterHatch
  OMX_ImageFilterGpen
  OMX_ImageFilterSolarize
  OMX_ImageFilterWatercolor
  OMX_ImageFilterPastel
  OMX_ImageFilterFilm
  OMX_ImageFilterBlur
  OMX_ImageFilterColourSwap
  OMX_ImageFilterWashedOut
  OMX_ImageFilterColourPoint
  OMX_ImageFilterPosterise
  OMX_ImageFilterColourBalance
  OMX_ImageFilterCartoon

CAM_METERING
  OMX_MeteringModeAverage
  OMX_MeteringModeSpot
  OMX_MeteringModeMatrix

CAM_MIRROR
  OMX_MirrorNone
  OMX_MirrorHorizontal
  OMX_MirrorVertical
  OMX_MirrorBoth

CAM_WHITE_BALANCE
  OMX_WhiteBalControlOff
  OMX_WhiteBalControlAuto
  OMX_WhiteBalControlSunLight
  OMX_WhiteBalControlCloudy
  OMX_WhiteBalControlShade
  OMX_WhiteBalControlTungsten
  OMX_WhiteBalControlFluorescent
  OMX_WhiteBalControlIncandescent
  OMX_WhiteBalControlFlash
  OMX_WhiteBalControlHorizon

CAM_DRC
  OMX_DynRangeExpOff
  OMX_DynRangeExpLow
  OMX_DynRangeExpMedium
  OMX_DynRangeExpHigh
*/

//Data of each component
typedef struct {
  //The handle is obtained with OMX_GetHandle() and is used on every function
  //that needs to manipulate a component. It is released with OMX_FreeHandle()
  OMX_HANDLETYPE handle;
  //Bitwise OR of flags. Used for blocking the current thread and waiting an
  //event. Used with vcos_event_flags_get() and vcos_event_flags_set()
  VCOS_EVENT_FLAGS_T flags;
  //The fullname of the component
  OMX_STRING name;
} component_t;

//Events used with vcos_event_flags_get() and vcos_event_flags_set()
typedef enum {
  EVENT_ERROR = 0x1,
  EVENT_PORT_ENABLE = 0x2,
  EVENT_PORT_DISABLE = 0x4,
  EVENT_STATE_SET = 0x8,
  EVENT_FLUSH = 0x10,
  EVENT_MARK_BUFFER = 0x20,
  EVENT_MARK = 0x40,
  EVENT_PORT_SETTINGS_CHANGED = 0x80,
  EVENT_PARAM_OR_CONFIG_CHANGED = 0x100,
  EVENT_BUFFER_FLAG = 0x200,
  EVENT_RESOURCES_ACQUIRED = 0x400,
  EVENT_DYNAMIC_RESOURCES_AVAILABLE = 0x800,
  EVENT_FILL_BUFFER_DONE = 0x1000,
  EVENT_EMPTY_BUFFER_DONE = 0x2000,
} component_event;

//Prototypes
OMX_ERRORTYPE EventHandler (
    OMX_IN OMX_HANDLETYPE hComponent,
    OMX_IN OMX_PTR pAppData,
    OMX_IN OMX_EVENTTYPE eEvent,
    OMX_IN OMX_U32 nData1,
    OMX_IN OMX_U32 nData2,
    OMX_IN OMX_PTR pEventData);
OMX_ERRORTYPE FillBufferDone (
    OMX_IN OMX_HANDLETYPE hComponent,
    OMX_IN OMX_PTR pAppData,
    OMX_IN OMX_BUFFERHEADERTYPE* pBuffer);
void wake (component_t* component, VCOS_UNSIGNED event);
void wait (
    component_t* component,
    VCOS_UNSIGNED events,
    VCOS_UNSIGNED* retrieves_events);
void init_component (component_t* component);
void deinit_component (component_t* component);
void load_camera_drivers (component_t* component);
void change_state (component_t* component, OMX_STATETYPE state);
void enable_port (component_t* component, OMX_U32 port);
void disable_port (component_t* component, OMX_U32 port);
void enable_encoder_output_port (
    component_t* encoder,
    OMX_BUFFERHEADERTYPE** encoder_output_buffer);
void disable_encoder_output_port (
    component_t* encoder,
    OMX_BUFFERHEADERTYPE* encoder_output_buffer);
void set_camera_settings (component_t* camera);
void set_jpeg_settings (component_t* encoder);

//Function that is called when a component receives an event from a secondary
//thread
OMX_ERRORTYPE event_handler (
    OMX_IN OMX_HANDLETYPE comp,
    OMX_IN OMX_PTR app_data,
    OMX_IN OMX_EVENTTYPE event,
    OMX_IN OMX_U32 data1,
    OMX_IN OMX_U32 data2,
    OMX_IN OMX_PTR event_data){
  component_t* component = (component_t*)app_data;

  switch (event){
    case OMX_EventCmdComplete:
      switch (data1){
        case OMX_CommandStateSet:
          printf ("event: %s, OMX_CommandStateSet, state: %s\n",
              component->name, dump_OMX_STATETYPE (data2));
          wake (component, EVENT_STATE_SET);
          break;
        case OMX_CommandPortDisable:
          printf ("event: %s, OMX_CommandPortDisable, port: %d\n",
              component->name, data2);
          wake (component, EVENT_PORT_DISABLE);
          break;
        case OMX_CommandPortEnable:
          printf ("event: %s, OMX_CommandPortEnable, port: %d\n",
              component->name, data2);
          wake (component, EVENT_PORT_ENABLE);
          break;
        case OMX_CommandFlush:
          printf ("event: %s, OMX_CommandFlush, port: %d\n",
              component->name, data2);
          wake (component, EVENT_FLUSH);
          break;
        case OMX_CommandMarkBuffer:
          printf ("event: %s, OMX_CommandMarkBuffer, port: %d\n",
              component->name, data2);
          wake (component, EVENT_MARK_BUFFER);
          break;
      }
      break;
    case OMX_EventError:
      printf ("event: %s, %s\n", component->name, dump_OMX_ERRORTYPE (data1));
      wake (component, EVENT_ERROR);
      break;
    case OMX_EventMark:
      printf ("event: %s, OMX_EventMark\n", component->name);
      wake (component, EVENT_MARK);
      break;
    case OMX_EventPortSettingsChanged:
      printf ("event: %s, OMX_EventPortSettingsChanged, port: %d\n",
          component->name, data1);
      wake (component, EVENT_PORT_SETTINGS_CHANGED);
      break;
    case OMX_EventParamOrConfigChanged:
      printf ("event: %s, OMX_EventParamOrConfigChanged, data1: %d, data2: "
          "%X\n", component->name, data1, data2);
      wake (component, EVENT_PARAM_OR_CONFIG_CHANGED);
      break;
    case OMX_EventBufferFlag:
      printf ("event: %s, OMX_EventBufferFlag, port: %d\n",
          component->name, data1);
      wake (component, EVENT_BUFFER_FLAG);
      break;
    case OMX_EventResourcesAcquired:
      printf ("event: %s, OMX_EventResourcesAcquired\n", component->name);
      wake (component, EVENT_RESOURCES_ACQUIRED);
      break;
    case OMX_EventDynamicResourcesAvailable:
      printf ("event: %s, OMX_EventDynamicResourcesAvailable\n",
          component->name);
      wake (component, EVENT_DYNAMIC_RESOURCES_AVAILABLE);
      break;
    default:
      //This should never execute, just ignore
      printf ("event: unknown (%X)\n", event);
      break;
  }

  return OMX_ErrorNone;
}

//Function that is called when a component fills a buffer with data
OMX_ERRORTYPE fill_buffer_done (
    OMX_IN OMX_HANDLETYPE comp,
    OMX_IN OMX_PTR app_data,
    OMX_IN OMX_BUFFERHEADERTYPE* buffer){
  component_t* component = (component_t*)app_data;

  printf ("event: %s, fill_buffer_done\n", component->name);
  wake (component, EVENT_FILL_BUFFER_DONE);

  return OMX_ErrorNone;
}

void wake (component_t* component, VCOS_UNSIGNED event){
  vcos_event_flags_set (&component->flags, event, VCOS_OR);
}

void wait (
    component_t* component,
    VCOS_UNSIGNED events,
    VCOS_UNSIGNED* retrieved_events){
  VCOS_UNSIGNED set;
  if (vcos_event_flags_get (&component->flags, events | EVENT_ERROR,
      VCOS_OR_CONSUME, VCOS_SUSPEND, &set)){
    fprintf (stderr, "error: vcos_event_flags_get\n");
    exit (1);
  }
  if (set == EVENT_ERROR){
    exit (1);
  }
  if (retrieved_events){
    *retrieved_events = set;
  }
}

void init_component (component_t* component){
  printf ("initializing component '%s'\n", component->name);

  OMX_ERRORTYPE error;

  //Create the event flags
  if (vcos_event_flags_create (&component->flags, "component")){
    fprintf (stderr, "error: vcos_event_flags_create\n");
    exit (1);
  }

  //Each component has an event_handler and fill_buffer_done functions
  OMX_CALLBACKTYPE callbacks_st;
  callbacks_st.EventHandler = event_handler;
  callbacks_st.FillBufferDone = fill_buffer_done;

  //Get the handle
  if ((error = OMX_GetHandle (&component->handle, component->name, component,
      &callbacks_st))){
    fprintf (stderr, "error: OMX_GetHandle: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Disable all the ports
  OMX_INDEXTYPE types[] = {
    OMX_IndexParamAudioInit,
    OMX_IndexParamVideoInit,
    OMX_IndexParamImageInit,
    OMX_IndexParamOtherInit
  };
  OMX_PORT_PARAM_TYPE ports_st;
  OMX_INIT_STRUCTURE (ports_st);

  int i;
  for (i=0; i<4; i++){
    if ((error = OMX_GetParameter (component->handle, types[i], &ports_st))){
      fprintf (stderr, "error: OMX_GetParameter: %s\n",
          dump_OMX_ERRORTYPE (error));
      exit (1);
    }

    OMX_U32 port;
    for (port=ports_st.nStartPortNumber;
        port<ports_st.nStartPortNumber + ports_st.nPorts; port++){
      //Disable the port
      disable_port (component, port);
      //Wait to the event
      wait (component, EVENT_PORT_DISABLE, 0);
    }
  }
}

void deinit_component (component_t* component){
  printf ("deinitializing component '%s'\n", component->name);

  OMX_ERRORTYPE error;

  vcos_event_flags_delete (&component->flags);

  if ((error = OMX_FreeHandle (component->handle))){
    fprintf (stderr, "error: OMX_FreeHandle: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

void load_camera_drivers (component_t* component){
  /*
  This is a specific behaviour of the Broadcom's Raspberry Pi OpenMAX IL
  implementation module because the OMX_SetConfig() and OMX_SetParameter() are
  blocking functions but the drivers are loaded asynchronously, that is, an
  event is fired to signal the completion. Basically, what you're saying is:

  "When the parameter with index OMX_IndexParamCameraDeviceNumber is set, load
  the camera drivers and emit an OMX_EventParamOrConfigChanged event"

  The red LED of the camera will be turned on after this call.
  */

  printf ("loading '%s' drivers\n", component->name);

  OMX_ERRORTYPE error;

  OMX_CONFIG_REQUESTCALLBACKTYPE cbs_st;
  OMX_INIT_STRUCTURE (cbs_st);
  cbs_st.nPortIndex = OMX_ALL;
  cbs_st.nIndex = OMX_IndexParamCameraDeviceNumber;
  cbs_st.bEnable = OMX_TRUE;
  if ((error = OMX_SetConfig (component->handle, OMX_IndexConfigRequestCallback,
      &cbs_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  OMX_PARAM_U32TYPE dev_st;
  OMX_INIT_STRUCTURE (dev_st);
  dev_st.nPortIndex = OMX_ALL;
  //ID for the camera device
  dev_st.nU32 = 0;
  if ((error = OMX_SetParameter (component->handle,
      OMX_IndexParamCameraDeviceNumber, &dev_st))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  wait (component, EVENT_PARAM_OR_CONFIG_CHANGED, 0);
}

void change_state (component_t* component, OMX_STATETYPE state){
  printf ("changing '%s' state to %s\n", component->name,
      dump_OMX_STATETYPE (state));

  OMX_ERRORTYPE error;

  if ((error = OMX_SendCommand (component->handle, OMX_CommandStateSet, state,
      0))){
    fprintf (stderr, "error: OMX_SendCommand: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

void enable_port (component_t* component, OMX_U32 port){
  printf ("enabling port %d ('%s')\n", port, component->name);

  OMX_ERRORTYPE error;

  if ((error = OMX_SendCommand (component->handle, OMX_CommandPortEnable,
      port, 0))){
    fprintf (stderr, "error: OMX_SendCommand: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

void disable_port (component_t* component, OMX_U32 port){
  printf ("disabling port %d ('%s')\n", port, component->name);

  OMX_ERRORTYPE error;

  if ((error = OMX_SendCommand (component->handle, OMX_CommandPortDisable,
      port, 0))){
    fprintf (stderr, "error: OMX_SendCommand: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

void enable_encoder_output_port (
    component_t* encoder,
    OMX_BUFFERHEADERTYPE** encoder_output_buffer){
  //The port is not enabled until the buffer is allocated
  OMX_ERRORTYPE error;

  enable_port (encoder, 341);

  OMX_PARAM_PORTDEFINITIONTYPE def_st;
  OMX_INIT_STRUCTURE (def_st);
  def_st.nPortIndex = 341;
  if ((error = OMX_GetParameter (encoder->handle, OMX_IndexParamPortDefinition,
      &def_st))){
    fprintf (stderr, "error: OMX_GetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
  printf ("allocating %s output buffer\n", encoder->name);
  if ((error = OMX_AllocateBuffer (encoder->handle, encoder_output_buffer, 341,
      0, def_st.nBufferSize))){
    fprintf (stderr, "error: OMX_AllocateBuffer: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  wait (encoder, EVENT_PORT_ENABLE, 0);
}

void disable_encoder_output_port (
    component_t* encoder,
    OMX_BUFFERHEADERTYPE* encoder_output_buffer){
  //The port is not disabled until the buffer is released
  OMX_ERRORTYPE error;

  disable_port (encoder, 341);

  //Free encoder output buffer
  printf ("releasing '%s' output buffer\n", encoder->name);
  if ((error = OMX_FreeBuffer (encoder->handle, 341, encoder_output_buffer))){
    fprintf (stderr, "error: OMX_FreeBuffer: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  wait (encoder, EVENT_PORT_DISABLE, 0);
}

void set_camera_settings (component_t* camera){
  printf ("configuring '%s' settings\n", camera->name);

  OMX_ERRORTYPE error;

  //Sharpness
  OMX_CONFIG_SHARPNESSTYPE sharpness_st;
  OMX_INIT_STRUCTURE (sharpness_st);
  sharpness_st.nPortIndex = OMX_ALL;
  sharpness_st.nSharpness = CAM_SHARPNESS;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonSharpness,
      &sharpness_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Contrast
  OMX_CONFIG_CONTRASTTYPE contrast_st;
  OMX_INIT_STRUCTURE (contrast_st);
  contrast_st.nPortIndex = OMX_ALL;
  contrast_st.nContrast = CAM_CONTRAST;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonContrast,
      &contrast_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Saturation
  OMX_CONFIG_SATURATIONTYPE saturation_st;
  OMX_INIT_STRUCTURE (saturation_st);
  saturation_st.nPortIndex = OMX_ALL;
  saturation_st.nSaturation = CAM_SATURATION;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonSaturation,
      &saturation_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Brightness
  OMX_CONFIG_BRIGHTNESSTYPE brightness_st;
  OMX_INIT_STRUCTURE (brightness_st);
  brightness_st.nPortIndex = OMX_ALL;
  brightness_st.nBrightness = CAM_BRIGHTNESS;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonBrightness,
      &brightness_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Exposure value
  OMX_CONFIG_EXPOSUREVALUETYPE exposure_value_st;
  OMX_INIT_STRUCTURE (exposure_value_st);
  exposure_value_st.nPortIndex = OMX_ALL;
  exposure_value_st.eMetering = CAM_METERING;
  exposure_value_st.xEVCompensation = (CAM_EXPOSURE_COMPENSATION << 16)/6;
  exposure_value_st.nShutterSpeedMsec = CAM_SHUTTER_SPEED;
  exposure_value_st.bAutoShutterSpeed = CAM_SHUTTER_SPEED_AUTO;
  exposure_value_st.nSensitivity = CAM_ISO;
  exposure_value_st.bAutoSensitivity = CAM_ISO_AUTO;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigCommonExposureValue, &exposure_value_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Exposure control
  OMX_CONFIG_EXPOSURECONTROLTYPE exposure_control_st;
  OMX_INIT_STRUCTURE (exposure_control_st);
  exposure_control_st.nPortIndex = OMX_ALL;
  exposure_control_st.eExposureControl = CAM_EXPOSURE;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonExposure,
      &exposure_control_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Frame stabilisation
  OMX_CONFIG_FRAMESTABTYPE frame_stabilisation_st;
  OMX_INIT_STRUCTURE (frame_stabilisation_st);
  frame_stabilisation_st.nPortIndex = OMX_ALL;
  frame_stabilisation_st.bStab = CAM_FRAME_STABILIZATION;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigCommonFrameStabilisation, &frame_stabilisation_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //White balance
  OMX_CONFIG_WHITEBALCONTROLTYPE white_balance_st;
  OMX_INIT_STRUCTURE (white_balance_st);
  white_balance_st.nPortIndex = OMX_ALL;
  white_balance_st.eWhiteBalControl = CAM_WHITE_BALANCE;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonWhiteBalance,
      &white_balance_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //White balance gains (if white balance is set to off)
  if (!CAM_WHITE_BALANCE){
    OMX_CONFIG_CUSTOMAWBGAINSTYPE white_balance_gains_st;
    OMX_INIT_STRUCTURE (white_balance_gains_st);
    white_balance_gains_st.xGainR = (CAM_WHITE_BALANCE_RED_GAIN << 16)/1000;
    white_balance_gains_st.xGainB = (CAM_WHITE_BALANCE_BLUE_GAIN << 16)/1000;
    if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCustomAwbGains,
        &white_balance_gains_st))){
      fprintf (stderr, "error: OMX_SetConfig: %s\n",
          dump_OMX_ERRORTYPE (error));
      exit (1);
    }
  }

  //Image filter
  OMX_CONFIG_IMAGEFILTERTYPE image_filter_st;
  OMX_INIT_STRUCTURE (image_filter_st);
  image_filter_st.nPortIndex = OMX_ALL;
  image_filter_st.eImageFilter = CAM_IMAGE_FILTER;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonImageFilter,
      &image_filter_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Mirror
  OMX_CONFIG_MIRRORTYPE mirror_st;
  OMX_INIT_STRUCTURE (mirror_st);
  mirror_st.nPortIndex = 72;
  mirror_st.eMirror = CAM_MIRROR;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonMirror,
      &mirror_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Rotation
  OMX_CONFIG_ROTATIONTYPE rotation_st;
  OMX_INIT_STRUCTURE (rotation_st);
  rotation_st.nPortIndex = 72;
  rotation_st.nRotation = CAM_ROTATION;
  if ((error = OMX_SetConfig (camera->handle, OMX_IndexConfigCommonRotate,
      &rotation_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Color enhancement
  OMX_CONFIG_COLORENHANCEMENTTYPE color_enhancement_st;
  OMX_INIT_STRUCTURE (color_enhancement_st);
  color_enhancement_st.nPortIndex = OMX_ALL;
  color_enhancement_st.bColorEnhancement = CAM_COLOR_ENABLE;
  color_enhancement_st.nCustomizedU = CAM_COLOR_U;
  color_enhancement_st.nCustomizedV = CAM_COLOR_V;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigCommonColorEnhancement, &color_enhancement_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Denoise
  OMX_CONFIG_BOOLEANTYPE denoise_st;
  OMX_INIT_STRUCTURE (denoise_st);
  denoise_st.bEnabled = CAM_NOISE_REDUCTION;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigStillColourDenoiseEnable, &denoise_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //ROI
  OMX_CONFIG_INPUTCROPTYPE roi_st;
  OMX_INIT_STRUCTURE (roi_st);
  roi_st.nPortIndex = OMX_ALL;
  roi_st.xLeft = (CAM_ROI_LEFT << 16)/100;
  roi_st.xTop = (CAM_ROI_TOP << 16)/100;
  roi_st.xWidth = (CAM_ROI_WIDTH << 16)/100;
  roi_st.xHeight = (CAM_ROI_HEIGHT << 16)/100;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigInputCropPercentages, &roi_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //DRC
  OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE drc_st;
  OMX_INIT_STRUCTURE (drc_st);
  drc_st.eMode = CAM_DRC;
  if ((error = OMX_SetConfig (camera->handle,
      OMX_IndexConfigDynamicRangeExpansion, &drc_st))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

void set_jpeg_settings (component_t* encoder){
  printf ("configuring '%s' settings\n", encoder->name);

  OMX_ERRORTYPE error;

  //Quality
  OMX_IMAGE_PARAM_QFACTORTYPE quality;
  OMX_INIT_STRUCTURE (quality);
  quality.nPortIndex = 341;
  quality.nQFactor = JPEG_QUALITY;
  if ((error = OMX_SetParameter (encoder->handle, OMX_IndexParamQFactor,
      &quality))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Disable EXIF tags
  OMX_CONFIG_BOOLEANTYPE exif;
  OMX_INIT_STRUCTURE (exif);
  exif.bEnabled = JPEG_EXIF_DISABLE;
  if ((error = OMX_SetParameter (encoder->handle, OMX_IndexParamBrcmDisableEXIF,
      &exif))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Enable IJG table
  OMX_PARAM_IJGSCALINGTYPE ijg;
  OMX_INIT_STRUCTURE (ijg);
  ijg.nPortIndex = 341;
  ijg.bEnabled = JPEG_IJG_ENABLE;
  if ((error = OMX_SetParameter (encoder->handle,
      OMX_IndexParamBrcmEnableIJGTableScaling, &ijg))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Thumbnail
  OMX_PARAM_BRCMTHUMBNAILTYPE thumbnail;
  OMX_INIT_STRUCTURE (thumbnail);
  thumbnail.bEnable = JPEG_THUMBNAIL_ENABLE;
  thumbnail.bUsePreview = JPEG_PREVIEW;
  thumbnail.nWidth = JPEG_THUMBNAIL_WIDTH;
  thumbnail.nHeight = JPEG_THUMBNAIL_HEIGHT;
  if ((error = OMX_SetParameter (encoder->handle, OMX_IndexParamBrcmThumbnail,
      &thumbnail))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //EXIF tags
  //See firmware/documentation/ilcomponents/image_decode.html for valid keys
  char key[] = "IFD0.Make";
  char value[] = "Raspberry Pi";

  int key_length = strlen (key);
  int value_length = strlen (value);

  struct {
    //These two fields need to be together
    OMX_CONFIG_METADATAITEMTYPE metadata_st;
    char metadata_padding[value_length];
  } item;

  OMX_INIT_STRUCTURE (item.metadata_st);
  item.metadata_st.nSize = sizeof (item);
  item.metadata_st.eScopeMode = OMX_MetadataScopePortLevel;
  item.metadata_st.nScopeSpecifier = 341;
  item.metadata_st.eKeyCharset = OMX_MetadataCharsetASCII;
  item.metadata_st.nKeySizeUsed = key_length;
  memcpy (item.metadata_st.nKey, key, key_length);
  item.metadata_st.eValueCharset = OMX_MetadataCharsetASCII;
  item.metadata_st.nValueMaxSize = sizeof (item.metadata_padding);
  item.metadata_st.nValueSizeUsed = value_length;
  memcpy (item.metadata_st.nValue, value, value_length);

  if ((error = OMX_SetConfig (encoder->handle,
      OMX_IndexConfigMetadataItem, &item))){
    fprintf (stderr, "OMX_SetConfig: %s", dump_OMX_ERRORTYPE (error));
    exit (1);
  }
}

int round_up (int value, int divisor){
  return (divisor + value - 1) & ~(divisor - 1);
}

int main (){
  OMX_ERRORTYPE error;
  OMX_BUFFERHEADERTYPE* encoder_output_buffer;
  component_t camera;
  component_t null_sink;
  component_t encoder;
  camera.name = "OMX.broadcom.camera";
  null_sink.name = "OMX.broadcom.null_sink";
  encoder.name = "OMX.broadcom.image_encode";

  //Open the file
  int fd = open (FILENAME, O_WRONLY | O_CREAT | O_TRUNC | O_APPEND, 0666);
  if (fd == -1){
    fprintf (stderr, "error: open\n");
    exit (1);
  }

  //Initialize Broadcom's VideoCore APIs
  bcm_host_init ();

  //Initialize OpenMAX IL
  if ((error = OMX_Init ())){
    fprintf (stderr, "error: OMX_Init: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Initialize components
  init_component (&camera);
  init_component (&null_sink);
  init_component (&encoder);

  //Initialize camera drivers
  load_camera_drivers (&camera);

  //Configure camera sensor
  printf ("configuring '%s' sensor\n", camera.name);
  OMX_PARAM_SENSORMODETYPE sensor;
  OMX_INIT_STRUCTURE (sensor);
  sensor.nPortIndex = OMX_ALL;
  OMX_INIT_STRUCTURE (sensor.sFrameSize);
  sensor.sFrameSize.nPortIndex = OMX_ALL;
  if ((error = OMX_GetParameter (camera.handle, OMX_IndexParamCommonSensorMode,
      &sensor))){
    fprintf (stderr, "error: OMX_GetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
  sensor.bOneShot = OMX_TRUE;
  sensor.sFrameSize.nWidth = CAM_WIDTH;
  sensor.sFrameSize.nHeight = CAM_HEIGHT;
  if ((error = OMX_SetParameter (camera.handle, OMX_IndexParamCommonSensorMode,
      &sensor))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Configure camera port definition
  printf ("configuring '%s' port definition\n", camera.name);
  OMX_PARAM_PORTDEFINITIONTYPE port_def;
  OMX_INIT_STRUCTURE (port_def);
  port_def.nPortIndex = 72;
  if ((error = OMX_GetParameter (camera.handle, OMX_IndexParamPortDefinition,
      &port_def))){
    fprintf (stderr, "error: OMX_GetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
  port_def.format.image.nFrameWidth = CAM_WIDTH;
  port_def.format.image.nFrameHeight = CAM_HEIGHT;
  port_def.format.image.eCompressionFormat = OMX_IMAGE_CodingUnused;
  port_def.format.image.eColorFormat = OMX_COLOR_FormatYUV420PackedPlanar;
  //Stride is byte-per-pixel*width, YUV has 1 byte per pixel, so the stride is
  //the width (rounded up to the nearest multiple of 16).
  //See mmal/util/mmal_util.c, mmal_encoding_width_to_stride()
  port_def.format.image.nStride = round_up (CAM_WIDTH, 16);
  if ((error = OMX_SetParameter (camera.handle, OMX_IndexParamPortDefinition,
      &port_def))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Configure preview port
  //In theory the fastest resolution and framerate are 1920x1080 @30fps because
  //these are the default settings for the preview port, so the frames don't
  //need to be resized. In practice, this is not true. The fastest way to
  //produce stills is setting the lowest resolution, that is, 640x480 @30fps.
  //The difference between 1920x1080 @30fps and 640x480 @30fps is a speed boost
  //of ~4%, from ~1083ms to ~1039ms
  port_def.nPortIndex = 70;
  port_def.format.video.nFrameWidth = 640;
  port_def.format.video.nFrameHeight = 480;
  port_def.format.video.eCompressionFormat = OMX_IMAGE_CodingUnused;
  port_def.format.video.eColorFormat = OMX_COLOR_FormatYUV420PackedPlanar;
  //Setting the framerate to 0 unblocks the shutter speed from 66ms to 772ms
  //The higher the speed, the higher the capture time
  port_def.format.video.xFramerate = 0;
  port_def.format.video.nStride = 640;
  if ((error = OMX_SetParameter (camera.handle, OMX_IndexParamPortDefinition,
      &port_def))){
    fprintf (stderr, "error: OMX_SetParameter - "
        "OMX_IndexParamPortDefinition: %s", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Configure camera settings
  set_camera_settings (&camera);

  //Configure encoder port definition
  printf ("configuring '%s' port definition\n", encoder.name);
  OMX_INIT_STRUCTURE (port_def);
  port_def.nPortIndex = 341;
  if ((error = OMX_GetParameter (encoder.handle, OMX_IndexParamPortDefinition,
      &port_def))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
  port_def.format.image.nFrameWidth = CAM_WIDTH;
  port_def.format.image.nFrameHeight = CAM_HEIGHT;
  port_def.format.image.eCompressionFormat = OMX_IMAGE_CodingJPEG;
  port_def.format.image.eColorFormat = OMX_COLOR_FormatUnused;
  if ((error = OMX_SetParameter (encoder.handle, OMX_IndexParamPortDefinition,
      &port_def))){
    fprintf (stderr, "error: OMX_SetParameter: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Configure JPEG settings
  set_jpeg_settings (&encoder);

  //Setup tunnels: camera (still) -> image_encode, camera (preview) -> null_sink
  printf ("configuring tunnels\n");
  if ((error = OMX_SetupTunnel (camera.handle, 72, encoder.handle, 340))){
    fprintf (stderr, "error: OMX_SetupTunnel: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }
  if ((error = OMX_SetupTunnel (camera.handle, 70, null_sink.handle, 240))){
    fprintf (stderr, "error: OMX_SetupTunnel: %s\n",
        dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Change state to IDLE
  change_state (&camera, OMX_StateIdle);
  wait (&camera, EVENT_STATE_SET, 0);
  change_state (&null_sink, OMX_StateIdle);
  wait (&null_sink, EVENT_STATE_SET, 0);
  change_state (&encoder, OMX_StateIdle);
  wait (&encoder, EVENT_STATE_SET, 0);

  //Enable the tunnel ports
  enable_port (&camera, 72);
  enable_port (&camera, 70);
  enable_port (&null_sink, 240);
  enable_port (&encoder, 340);
  enable_encoder_output_port (&encoder, &encoder_output_buffer);

  //Change state to EXECUTING
  change_state (&camera, OMX_StateExecuting);
  wait (&camera, EVENT_STATE_SET, 0);
  change_state (&null_sink, OMX_StateExecuting);
  wait (&null_sink, EVENT_STATE_SET, 0);
  change_state (&encoder, OMX_StateExecuting);
  wait (&encoder, EVENT_STATE_SET, 0);

  //Enable camera capture port. This basically says that the port 72 will be
  //used to get data from the camera. If you're capturing video, the port 71
  //must be used
  printf ("enabling '%s' capture port\n", camera.name);
  OMX_CONFIG_PORTBOOLEANTYPE cameraCapturePort;
  OMX_INIT_STRUCTURE (cameraCapturePort);
  cameraCapturePort.nPortIndex = 72;
  cameraCapturePort.bEnabled = OMX_TRUE;
  if ((error = OMX_SetConfig (camera.handle, OMX_IndexConfigPortCapturing,
      &cameraCapturePort))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Start consuming the buffers
  VCOS_UNSIGNED end_flags = EVENT_BUFFER_FLAG | EVENT_FILL_BUFFER_DONE;
  VCOS_UNSIGNED retrieves_events;

  while (1){
    //Get the buffer data (a slice of the image)
    if ((error = OMX_FillThisBuffer (encoder.handle, encoder_output_buffer))){
      fprintf (stderr, "error: OMX_FillThisBuffer: %s\n",
          dump_OMX_ERRORTYPE (error));
      exit (1);
    }

    //Wait until it's filled
    wait (&encoder, EVENT_FILL_BUFFER_DONE, &retrieves_events);

    //Append the buffer into the file
    if (pwrite (fd, encoder_output_buffer->pBuffer,
        encoder_output_buffer->nFilledLen,
        encoder_output_buffer->nOffset) == -1){
      fprintf (stderr, "error: pwrite\n");
      exit (1);
    }

    //When it's the end of the stream, an OMX_EventBufferFlag is emitted in the
    //camera and image_encode components. Then the FillBufferDone function is
    //called in the image_encode
    if (retrieves_events == end_flags){
      //Clear the EOS flags
      wait (&camera, EVENT_BUFFER_FLAG, 0);
      wait (&encoder, EVENT_BUFFER_FLAG, 0);
      break;
    }
  }

  printf ("------------------------------------------------\n");

  //Disable camera capture port
  printf ("disabling '%s' capture port\n", camera.name);
  cameraCapturePort.bEnabled = OMX_FALSE;
  if ((error = OMX_SetConfig (camera.handle, OMX_IndexConfigPortCapturing,
      &cameraCapturePort))){
    fprintf (stderr, "error: OMX_SetConfig: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Change state to IDLE
  change_state (&camera, OMX_StateIdle);
  wait (&camera, EVENT_STATE_SET, 0);
  change_state (&null_sink, OMX_StateIdle);
  wait (&null_sink, EVENT_STATE_SET, 0);
  change_state (&encoder, OMX_StateIdle);
  wait (&encoder, EVENT_STATE_SET, 0);

  //Disable the tunnel ports
  disable_port (&camera, 72);
  disable_port (&camera, 70);
  disable_port (&null_sink, 240);
  disable_port (&encoder, 340);
  disable_encoder_output_port (&encoder, encoder_output_buffer);

  //Change state to LOADED
  change_state (&camera, OMX_StateLoaded);
  wait (&camera, EVENT_STATE_SET, 0);
  change_state (&null_sink, OMX_StateLoaded);
  wait (&null_sink, EVENT_STATE_SET, 0);
  change_state (&encoder, OMX_StateLoaded);
  wait (&encoder, EVENT_STATE_SET, 0);

  //Deinitialize components
  deinit_component (&camera);
  deinit_component (&null_sink);
  deinit_component (&encoder);

  //Deinitialize OpenMAX IL
  if ((error = OMX_Deinit ())){
    fprintf (stderr, "error: OMX_Deinit: %s\n", dump_OMX_ERRORTYPE (error));
    exit (1);
  }

  //Deinitialize Broadcom's VideoCore APIs
  bcm_host_deinit ();

  //Close the file
  if (close (fd)){
    fprintf (stderr, "error: close\n");
    exit (1);
  }

  printf ("ok\n");

  return 0;
}


text:
The use of geostatistical methods to ide...
The use of geostatistical methods to identify severe earthquake damage in an urban area
Sertel E., Kaya Ş., Curran P.
2007 Urban Remote Sensing Joint Event, URS, Paris, France, 11 - 13 April 2007
Doi Number: 10.1109/urs.2007.371864
City: Paris
Izmit earthquake (Mw 7.4) occurred on the North Anatolian Fault Zone (NAFZ) in the northwest of Turkey on 17 August 1999 and resulted in severe damage to the urban areas of Izmit, Adapazari (Sakarya), Golcuk and Yalova. A semi-variogram approach was used to quantify earthquake-induced spatial variation and as a result, identify severely damaged regions in Adapazari inner city. The inner city of Adapazari was divided into twelve 1 km × 1 km blocks. Omnidirectional semi-variograms of these blocks were calculated using SPOT HRVIR Panchromatic images obtained before and after the earthquake. The differences between the pre and post earthquake semi-variograms were correlated with the location of severely damaged areas. These differences were determined for the range, nugget and sill of the semi-variograms and an independently produced damage map was related to the results of this semi-variogram analysis. © 2007 IEEE.


It's relatively hard to track down, but until somebody does a definitive "Waterfalls of Yosemite Valley" book, this reigns as the best available waterfall resource.
It took me a while, but I managed to track down a copy of this several years ago. It's more of a magazine than a book. It's got a lot of photographs, and doesn't merely focus on the well known falls, it includes the minor (and sadly, overlooked...) falls of the valley too.
The Bottom Line: It's sufficiently interesting to warrant addition to a collection and would likely be a staple of the Yosemite Gift Shop.


The Preschool Enrichment Program (PEP) and Kindergarten Enrichment Program (KEP) help explore and expand a child's potential in their early years. It is designed for young students who are deemed developmentally advanced.
Enrichment allows children with advanced cognitive abilities to excel among like-minded peers. Reggio Emilia-inspired classrooms give students the tools and guidance to explore and develop their full potential.
Enrichment focuses on academic enrichment and encourages community involvement. It exposes children to music, art, books and second languages, as well as provides opportunities for gross motor development through yoga, dance and other methods.
Children accepted into Enrichment must meet qualifications determined by Alberta Education. View our calendar for upcoming screening dates or contact Early Childhood Services at 780-939-4341 for more information.


text:
Q: Code is not working online but working in localhost Hello The below function contains an image which is working properly in localhost but whenever i m uploading that to cpanel its not working online.
Here is the code:
function CONshowElements()
{
var Construction = "
The construction company with several years of experience in projects valued over millions of USD having Service and Quality with satisfaction and appreciation of the clients.";
document.getElementById("contents").innerHTML = Construction;
}

A: Your server might run under Linux, while your localhost probably runs under Windows.
That means image file-names are case-sensitive.
Check if your image-name is actually
SCALE Construction.PNG

and not
SCALE Construction.png

If that's the case, you get a 404 on the development console.
Also, that whitespace in the file-name is a very bad idea...

redpajama_set_name: RedPajamaStackExchange