text:
var inherits = require("../util").inherits;
var astNode = require("../astNode");

var Literal = function(ast,parent){
    astNode.call(this,ast,parent);
    this.type = "Literal";
    this.value = ast.value;
};

Literal.prototype = inherits(astNode);

Literal.prototype.getChildProperties = function(){
    return [];
};

Literal.prototype.isString = function(){
    return typeof(this.value) === "string";
};

Literal.prototype.isNumber = function(){
    return typeof(this.value) === "number";
};

Literal.prototype.isNull = function(){
    return typeof(this.value) === "undefined";
};

Literal.prototype.isBoolean = function(){
    return typeof(this.value) === "boolean";
};

Literal.prototype.isRegExp= function(){
    return this.value instanceof RegExp;
};

var _toJSON = astNode.prototype.toJSON;
Literal.prototype.toJSON = function(){
    var returnValue = _toJSON.call(this);
    returnValue.value = this.value;
    return returnValue;
};

module.exports = Literal;


text:
Reports all methods with variable arity, which can be annotated as @SafeVarargs.
The @SafeVarargs annotation suppresses unchecked warnings about parameterized array creation at call sites.

Example:

  public class Foo<T> {
    private List<T> list = new ArrayList<>();

    public final void safeVarargs(T... elements) {
      Collections.addAll(list, elements);
    }
  }

After the quick-fix is applied:

  public class Foo<T> {
    private List<T> list = new ArrayList<>();

    @SafeVarargs
    public final void safeVarargs(T... elements) {
      Collections.addAll(list, elements);
    }
  }

  This annotation is not supported under Java 1.6 or earlier JVMs.

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<title>

            Pioneer Performance Inc -

    Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
  </title>

<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />

<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta content="width=device-width,initial-scale=1" name="viewport">

<meta name = "format-detection" content = "telephone=no">

<meta name="robots" content="noarchive">

<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" />

<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">

  	<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
  	<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />

<meta property="legalName" content="Department_of_Industry">

Skip to main content

Skip to "About this site"

Language selection

Français

<object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object> Government of Canada

Search and menus

Search and menus

Topics menu

Jobs

Immigration

Travel

Business

Benefits

Health

Taxes

More services

You are here:

Home

Industries and Business

Canadian Company Capabilities

<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>

 Company profile - Canadian Company Capabilities

New Search |

<form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">

          <input type="hidden" name="lang" value="eng" />
          <input type="hidden" name="profileId" value="" />
          <input type="hidden" name="prtl" value="1" />
          <input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D"  />

          <input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />

          <input type="hidden" name="V_SEARCH.depth" value="1" />
          <input type="hidden" name="V_SEARCH.showStricts" value="false" />
          <input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />

  </form>

| Previous Company

| Next Company

      Third-Party Information Liability Disclaimer

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

      Pioneer Performance Inc

Legal/Operating Name:

Pioneer Performance Inc

johnhill.sales@bell.net

Mailing Address:

              	<address class="mrgn-bttm-md">

                   401 Packham Place

                    SASKATOON,

                    Saskatchewan

                  S7N 2T7

                </address>

Location Address:

              	         <address class="mrgn-bttm-md">

                   401 Packham Place

                    SASKATOON,

                    Saskatchewan

                  S7N 2T7

                         </address>

Tel.:
		      (306) 202-7464

Fax:

Logo

Company Profile

            • * ISO 9001, ISO 14001 and most ISO Management Systems Consulting & Training

• * Industry and Regulatory Consulting & Training

• * Internal & External Standards Auditing

 * Organizational Coaching *

•    Pioneer Performance Inc handpicks only the best-in-class specialists to create systems, provide implementation guidance and audit training to a full spectrum of ISO Management and many Regulatory Certifications.  We take the "scare" out of introducing internationally-proven standards by using much of what our clients already have in place.  Going forward, the focus becomes continual development with measureable results.

     With offices in Saskatchewan and Ontario, we have supervised several hundred Standards implementations throughout North America.  Our primary partner has assisted over 10,000 organizations worldwide to improve their performance by using a simple approach.  We carefully look at what our customer's need and create a solution sensitive to our client's culture.  We demonstrate how international practices will create wealth while allowing people to accomplish more… in less time… with less stress.  When ready for external Certification we will help source the appropriate Registrar.

     Of Canadian Aboriginal heritage, our Founder and President, John Hill, has been requested by Business Associations and Chambers of Commerce to speak on the subject of business strategies and quality management since 1980.  Having achieved the prestigious Certified Sales Professional designation, he has been a continuous education college instructor.  Pioneer Performance Inc demands that our highly skilled, client-focused specialists provide Quality Service and use a strict Code of Ethics.  Our clients are treated with the dignity and respect they deserve throughout the entire process.

     If your needs are operational improvement, compliance to ISO management systems or industry regulations, business coaching and training...… discover the path with Pioneer Performance Inc.

				Full profile

				Full profile

				Contact information

                John
                Hill

                  Title:

                President

                    Area of Responsibility:

                    Management Executive.

                  Telephone:

                (416) 460-9280

                    Email:

                  johnhill.sales@bell.net

  top of page

				Company description

            Exporting:

              Yes

                Primary Industry (NAICS):

				541611 - Administrative Management and General Management Consulting Services

            Alternate Industries (NAICS):

            541619 - Other Management Consulting Services

            541620 - Environmental Consulting Services

            611430 - Professional and Management Development Training

            611690 - All Other Schools and Instruction

            Primary Business Activity:

            Services

              Aboriginal Firm:

          				Registered Aboriginal Business under the Procurement Strategy for Aboriginal Business (PSAB)

				Product / Service / Licensing

                              Service Name:

                            ISO Management Systems and Industry Regulations Consulting & Training

                              Service Name:

                            Sales & Marketing Coaching & Training

                              Service Name:

                            Auditing

              FSC Code:

              E000-Environmental Services

              H100-Quality Control Services

              R000-Professional, Administrative and Management Support Services

              R004-Certifications and Accreditations for products and institutions other than Educatonal Institutions

              R007-Systems Engineering Services

              R010-Auditing Services

              R011-Ongoing Audit Operations Support

              U000-Educational and Training Services

  top of page

					Sector information

                Unique applications:

              Clients include professional services, IT, contractors, transportation, associations and manufacturing.  Having Aboriginal heritage gives me a passion to implement international standards into other Aboriginal businesses, associations and governments.

                Testimonial:

              ""It was everything we were looking for.  Any concerns we initially had were gone.  I would not hesitate to recommend their services.""  JL from an Ontario plastic injection molder

""John Hill and his team understood our schedule and so we could take our time to fit our need.  That was great.  We are looked at with more credibility.  This has resulted in more high quality and high value orders from both current and new clients.""  SC, from a Saskatchewan alternative energy equipment distributor/installer

""It gives us a clear and defined set of guidelines to work with.  These guidelines will help to keep us focused on how to be first class in our field and how to stay there.""  PT, from a Saskatchewan tradesperson supply company

""I can''t tell you what a difference it makes to have someone in here that actually knows how to talk to people and can answer questions without making us all feel stupid!""  LD, from an Ontario HVAC contractor

""With his knowledge and guidance our staff was able to properly complete all the information with a minimum of disruption to our Company.  We would like to thank you for hiring the Professionals that made our process of becoming ISO 9001 a pleasurable experience.""  AW, from an Ontario machine shop

					Third-Party Information Liability Disclaimer

					Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

				Contacts

				Contact information

                John
                Hill

                  Title:

                President

                    Area of Responsibility:

                    Management Executive.

                  Telephone:

                (416) 460-9280

                    Email:

                  johnhill.sales@bell.net

				Description

				Company description

            Exporting:

              Yes

                Primary Industry (NAICS):

				541611 - Administrative Management and General Management Consulting Services

            Alternate Industries (NAICS):

            541619 - Other Management Consulting Services

            541620 - Environmental Consulting Services

            611430 - Professional and Management Development Training

            611690 - All Other Schools and Instruction

            Primary Business Activity:

            Services

              Aboriginal Firm:

          				Registered Aboriginal Business under the Procurement Strategy for Aboriginal Business (PSAB)

				Products, services and licensing

				Product / Service / Licensing

                              Service Name:

                            ISO Management Systems and Industry Regulations Consulting & Training

                              Service Name:

                            Sales & Marketing Coaching & Training

                              Service Name:

                            Auditing

              FSC Code:

              E000-Environmental Services

              H100-Quality Control Services

              R000-Professional, Administrative and Management Support Services

              R004-Certifications and Accreditations for products and institutions other than Educatonal Institutions

              R007-Systems Engineering Services

              R010-Auditing Services

              R011-Ongoing Audit Operations Support

              U000-Educational and Training Services

					Sector

					Sector information

                Unique applications:

              Clients include professional services, IT, contractors, transportation, associations and manufacturing.  Having Aboriginal heritage gives me a passion to implement international standards into other Aboriginal businesses, associations and governments.

                Testimonial:

              ""It was everything we were looking for.  Any concerns we initially had were gone.  I would not hesitate to recommend their services.""  JL from an Ontario plastic injection molder

""John Hill and his team understood our schedule and so we could take our time to fit our need.  That was great.  We are looked at with more credibility.  This has resulted in more high quality and high value orders from both current and new clients.""  SC, from a Saskatchewan alternative energy equipment distributor/installer

""It gives us a clear and defined set of guidelines to work with.  These guidelines will help to keep us focused on how to be first class in our field and how to stay there.""  PT, from a Saskatchewan tradesperson supply company

""I can''t tell you what a difference it makes to have someone in here that actually knows how to talk to people and can answer questions without making us all feel stupid!""  LD, from an Ontario HVAC contractor

""With his knowledge and guidance our staff was able to properly complete all the information with a minimum of disruption to our Company.  We would like to thank you for hiring the Professionals that made our process of becoming ISO 9001 a pleasurable experience.""  AW, from an Ontario machine shop

    Last Update Date 2016-04-01

Date Modified:

      <time>2017-03-02</time>

About government

Contact us

Departments and agencies

Public service and military

News

Treaties, laws and regulations

Government-wide reporting

Prime Minister

How government works

Open government

About this site

Social media

Mobile applications

About Canada.ca

Terms and conditions

Privacy

Top of Page

<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>


text:
package org.eclipse.cft.server.core.internal.client;

import java.util.List;

import org.cloudfoundry.client.lib.domain.CloudService;
import org.eclipse.cft.server.core.internal.CloudFoundryServer;
import org.eclipse.cft.server.core.internal.application.ModuleChangeEvent;
import org.eclipse.wst.server.core.IModule;

public class CloudRefreshEvent extends ModuleChangeEvent {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private final List<CloudService> services;

	public CloudRefreshEvent(CloudFoundryServer server, IModule module, int type, List<CloudService> services) {
		super(server, type, module, null);
		this.services = services;
	}

	public List<CloudService> getServices() {
		return services;
	}

}


text:
var helper = require('./helpers/helper.js'),
    url = helper.BASE_URL,
    Lab = require('lab'),
    describe = Lab.experiment,
    it = Lab.test,
    before = Lab.before,
    after = Lab.after,
    expect = Lab.expect,
    wd = require('wd');

describe('Respond to interest', function () {
  var browser;
  helper.testHelper(before, after, function (browserInstance, done) {
    browser = browserInstance;
    done();
  });

  // the documents are bootstrapped
  it('displays responses to an interest', helper.options, function (done) {
    browser
      .get(url + '/')
      .elementByLinkText('This interest gets two responses')
      .click()
      .elementsByCssSelector('.response-to-interest')
      .then(function (elements) {
        return expect(elements.length).to.equal(2);
      })
      .elementsByCssSelector('.response-to-interest')
      .then(function (elements) {
        var Q = wd.Q;

        return Q.all([
          elements[0].text()
            .then(function (value) {
              return expect(value).to.contain('ES6 Features you can use today');
            }),
          elements[1].text()
            .then(function (value) {
              return expect(value).to.contain('My life as JS Dev');
            })
        ]);
      })
      // check that responsed are properly linked
      .elementByLinkText('ES6 Features you can use today')
      .click()
      .elementsByCssSelector('h2')
      .text()
      .then(function (value) {
        return expect(value).to.contain('ES6 Features you can use today');
      })
      .nodeify(done);
  });
});


text:
package com.sun.beans.decoder;

/**
 * This class is intended to handle <class> element.
 * This element specifies {@link Class} values.
 * The result value is created from text of the body of this element.
 * The body parsing is described in the class {@link StringElementHandler}.
 * For example:

 * <class>java.lang.Class</class>

 * is shortcut to

 * <method name="forName" class="java.lang.Class">
 *     <string>java.lang.Class</string>
 * </method>

 * which is equivalent to {@code Class.forName("java.lang.Class")} in Java code.
 *
The following attribute is supported:
 *

 *
id
 *
the identifier of the variable that is intended to store the result
 *

 *
 * @since 1.7
 *
 * @author Sergey A. Malenkov
 */
final class ClassElementHandler extends StringElementHandler {

    /**
     * Creates class by the name from
     * the text of the body of this element.
     *
     * @param argument  the text of the body
     * @return evaluated {@code Class} value
     */
    @Override
    public Object getValue(String argument) {
        return getOwner().findClass(argument);
    }
}


text:
<form model="bom">
    <group form_layout="stacked">
        <field name="number" span="2"/>
        <field name="routing_id" span="2"/>
    </group>
    <group form_layout="stacked">
        <field name="product_id" span="2"/>
        <field name="qty" span="2"/>
        <field name="uom_id" span="2"/>
        <field name="location_id" span="2"/>
        <field name="container" span="2"/>
        <field name="lot" span="2"/>
    </group>
    <field name="lines" nolabel="1">
        <list>
            <field name="product_id"/>
            <field name="qty"/>
            <field name="uom_id"/>
            <field name="location_id"/>
            <field name="container"/>
            <field name="lot"/>
            <field name="issue_method"/>
            <field name="qty2"/>
            <field name="notes"/>
        </list>
    </field>
    <separator/>
    <field name="qc_tests"/>
    <field name="max_qty_loss"/>
    <related>
        <field name="documents">
            <list>
                <field name="file" target="_blank" preview="1"/>
                <field name="categ_id"/>
                <field name="description"/>
                <field name="date"/>
            </list>
            <form>
                <field name="categ_id"/>
                <field name="file" target="_blank" onchange="onchange_file"/>
                <field name="date"/>
                <field name="description"/>
                <field name="contact_id" invisible="1"/>
            </form>
        </field>
        <field name="comments"/>
    </related>
</form>


text:
namespace shaka {
namespace media {

class SdlManualVideoRenderer::Impl : public VideoRendererCommon {
 public:
  explicit Impl(SDL_Renderer* renderer)
      : mutex_("SdlManualVideoRenderer"), renderer_(renderer) {
    sdl_drawer_.SetRenderer(renderer);
  }

  void SetRenderer(SDL_Renderer* renderer) {
    std::unique_lock<Mutex> lock(mutex_);
    sdl_drawer_.SetRenderer(renderer);
    renderer_ = renderer;
  }

  SDL_Renderer* GetRenderer() const {
    std::unique_lock<Mutex> lock(mutex_);
    return renderer_;
  }

  double Render(const SDL_Rect* region) {
    std::shared_ptr<DecodedFrame> frame;
    const double delay = GetCurrentFrame(&frame);

    std::unique_lock<Mutex> lock(mutex_);
    if (frame && renderer_) {
      SDL_Texture* texture = sdl_drawer_.Draw(frame);
      if (texture) {
        ShakaRect<uint32_t> region_shaka;
        if (region) {
          region_shaka = {region->x, region->y, region->w, region->h};
        } else {
          int w = frame->stream_info->width;
          int h = frame->stream_info->height;
          SDL_GetRendererOutputSize(renderer_, &w, &h);
          region_shaka.x = region_shaka.y = 0;
          region_shaka.w = w;
          region_shaka.h = h;
        }

        ShakaRect<uint32_t> src, dest;
        ShakaRect<uint32_t> frame_region = {0, 0, frame->stream_info->width,
                                            frame->stream_info->height};
        FitVideoToRegion(frame_region, region_shaka,
                         frame->stream_info->sample_aspect_ratio, fill_mode(),
                         &src, &dest);
        SDL_Rect src_sdl = {src.x, src.y, src.w, src.h};
        SDL_Rect dest_sdl = {dest.x, dest.y, dest.w, dest.h};
        SDL_RenderCopy(renderer_, texture, &src_sdl, &dest_sdl);
      }
    }

    return delay;
  }

 private:
  mutable Mutex mutex_;
  SdlFrameDrawer sdl_drawer_;
  SDL_Renderer* renderer_;
};

class SdlThreadVideoRenderer::Impl {
 public:
  Impl(SdlThreadVideoRenderer* renderer, const SDL_Rect* region)
      : renderer_(renderer),
        region_(region ? optional<SDL_Rect>(*region) : nullopt),
        shutdown_(false),
        thread_("SdlThreadVideo", std::bind(&Impl::ThreadMain, this)) {}
  ~Impl() {
    shutdown_.store(true, std::memory_order_relaxed);
    thread_.join();
  }

  SHAKA_NON_COPYABLE_OR_MOVABLE_TYPE(Impl);

 private:
  void ThreadMain() {
    while (!shutdown_.load(std::memory_order_relaxed)) {
      const double delay =
          renderer_->Render(region_.has_value() ? &region_.value() : nullptr);
      SDL_RenderPresent(renderer_->GetRenderer());

      util::Clock::Instance.SleepSeconds(delay);
    }
  }

  SdlThreadVideoRenderer* renderer_;
  const optional<SDL_Rect> region_;
  std::atomic<bool> shutdown_;
  Thread thread_;
};

SdlManualVideoRenderer::SdlManualVideoRenderer(SDL_Renderer* renderer)
    : impl_(new Impl(renderer)) {}
SdlManualVideoRenderer::~SdlManualVideoRenderer() {}

void SdlManualVideoRenderer::SetRenderer(SDL_Renderer* renderer) {
  impl_->SetRenderer(renderer);
}
SDL_Renderer* SdlManualVideoRenderer::GetRenderer() const {
  return impl_->GetRenderer();
}

double SdlManualVideoRenderer::Render(const SDL_Rect* region) {
  return impl_->Render(region);
}

void SdlManualVideoRenderer::SetPlayer(const MediaPlayer* player) {
  impl_->SetPlayer(player);
}
void SdlManualVideoRenderer::Attach(const DecodedStream* stream) {
  impl_->Attach(stream);
}
void SdlManualVideoRenderer::Detach() {
  impl_->Detach();
}
VideoPlaybackQuality SdlManualVideoRenderer::VideoPlaybackQuality() const {
  return impl_->VideoPlaybackQuality();
}
bool SdlManualVideoRenderer::SetVideoFillMode(VideoFillMode mode) {
  return impl_->SetVideoFillMode(mode);
}

SdlThreadVideoRenderer::SdlThreadVideoRenderer(SDL_Renderer* renderer)
    : SdlManualVideoRenderer(renderer), impl_(new Impl(this, nullptr)) {}
SdlThreadVideoRenderer::SdlThreadVideoRenderer(SDL_Renderer* renderer,
                                               const SDL_Rect* region)
    : SdlManualVideoRenderer(renderer), impl_(new Impl(this, region)) {}
SdlThreadVideoRenderer::~SdlThreadVideoRenderer() {}

}  // namespace media
}  // namespace shaka


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
    <stroke android:width="1dp" android:color="@color/my_border_color" />
    <solid android:color="@color/my_panel_color" />
    <corners android:radius="4dp" />
    <padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp" />
</shape>


text:
set -e

# Make sure docker daemon is running
if ( ! ps -ef | grep "/usr/bin/docker" | grep -v 'grep' &> /dev/null  ); then
    echo "Docker is not running on this machine!"
    exit 1
fi

# Make sure k8s version env is properly set
K8S_VERSION=${K8S_VERSION:-"1.2.0-alpha.7"}
FLANNEL_VERSION=${FLANNEL_VERSION:-"0.5.5"}
FLANNEL_IFACE=${FLANNEL_IFACE:-"eth0"}
FLANNEL_IPMASQ=${FLANNEL_IPMASQ:-"true"}
ARCH=${ARCH:-"amd64"}

# Run as root
if [ "$(id -u)" != "0" ]; then
    echo >&2 "Please run as root"
    exit 1
fi

# Make sure master ip is properly set
if [ -z ${MASTER_IP} ]; then
    echo "Please export MASTER_IP in your env"
    exit 1
fi

echo "K8S_VERSION is set to: ${K8S_VERSION}"
echo "FLANNEL_VERSION is set to: ${FLANNEL_VERSION}"
echo "FLANNEL_IFACE is set to: ${FLANNEL_IFACE}"
echo "FLANNEL_IPMASQ is set to: ${FLANNEL_IPMASQ}"
echo "MASTER_IP is set to: ${MASTER_IP}"
echo "ARCH is set to: ${ARCH}"

# Check if a command is valid
command_exists() {
    command -v "$@" > /dev/null 2>&1
}

lsb_dist=""

# Detect the OS distro, we support ubuntu, debian, mint, centos, fedora dist
detect_lsb() {
    case "$(uname -m)" in
        *64)
            ;;
        *)
	        echo "Error: We currently only support 64-bit platforms."
	        exit 1
	        ;;
    esac

    if command_exists lsb_release; then
        lsb_dist="$(lsb_release -si)"
    fi
    if [ -z ${lsb_dist} ] && [ -r /etc/lsb-release ]; then
        lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")"
    fi
    if [ -z ${lsb_dist} ] && [ -r /etc/debian_version ]; then
        lsb_dist='debian'
    fi
    if [ -z ${lsb_dist} ] && [ -r /etc/fedora-release ]; then
        lsb_dist='fedora'
    fi
    if [ -z ${lsb_dist} ] && [ -r /etc/os-release ]; then
        lsb_dist="$(. /etc/os-release && echo "$ID")"
    fi

    lsb_dist="$(echo ${lsb_dist} | tr '[:upper:]' '[:lower:]')"

    case "${lsb_dist}" in
        amzn|centos|debian|ubuntu)
            ;;
        *)
            echo "Error: We currently only support ubuntu|debian|amzn|centos."
            exit 1
            ;;
    esac
}

# Start the bootstrap daemon
bootstrap_daemon() {
    docker -d \
        -H unix:///var/run/docker-bootstrap.sock \
        -p /var/run/docker-bootstrap.pid \
        --iptables=false \
        --ip-masq=false \
        --bridge=none \
        --graph=/var/lib/docker-bootstrap \
            2> /var/log/docker-bootstrap.log \
            1> /dev/null &

    sleep 5
}

DOCKER_CONF=""

# Start k8s components in containers
start_k8s() {
    # Start flannel
    flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run \
        -d \
        --restart=on-failure \
        --net=host \
        --privileged \
        -v /dev/net:/dev/net \
        quay.io/coreos/flannel:${FLANNEL_VERSION} \
        /opt/bin/flanneld \
            --ip-masq="${FLANNEL_IPMASQ}" \
            --etcd-endpoints=http://${MASTER_IP}:4001 \
            --iface="${FLANNEL_IFACE}")

    sleep 10

    # Copy flannel env out and source it on the host
    docker -H unix:///var/run/docker-bootstrap.sock \
        cp ${flannelCID}:/run/flannel/subnet.env .
    source subnet.env

    # Configure docker net settings, then restart it
    case "${lsb_dist}" in
        centos)
            DOCKER_CONF="/etc/sysconfig/docker"
            echo "OPTIONS=\"\$OPTIONS --mtu=${FLANNEL_MTU} --bip=${FLANNEL_SUBNET}\"" | tee -a ${DOCKER_CONF}
            if ! command_exists ifconfig; then
                yum -y -q install net-tools
            fi
            ifconfig docker0 down
            yum -y -q install bridge-utils && brctl delbr docker0 && systemctl restart docker
            ;;
        amzn)
            DOCKER_CONF="/etc/sysconfig/docker"
            echo "OPTIONS=\"\$OPTIONS --mtu=${FLANNEL_MTU} --bip=${FLANNEL_SUBNET}\"" | tee -a ${DOCKER_CONF}
            ifconfig docker0 down
            yum -y -q install bridge-utils && brctl delbr docker0 && service docker restart
            ;;
        ubuntu|debian) # TODO: today ubuntu uses systemd. Handle that too
            DOCKER_CONF="/etc/default/docker"
            echo "DOCKER_OPTS=\"\$DOCKER_OPTS --mtu=${FLANNEL_MTU} --bip=${FLANNEL_SUBNET}\"" | tee -a ${DOCKER_CONF}
            ifconfig docker0 down
            apt-get install bridge-utils
            brctl delbr docker0
            service docker stop
            while [ `ps aux | grep /usr/bin/docker | grep -v grep | wc -l` -gt 0 ]; do
                echo "Waiting for docker to terminate"
                sleep 1
            done
            service docker start
            ;;
        *)
            echo "Unsupported operations system ${lsb_dist}"
            exit 1
            ;;
    esac

    # sleep a little bit
    sleep 5

    # Start kubelet & proxy in container
    # TODO: Use secure port for communication
    docker run \
        --net=host \
        --pid=host \
        --privileged \
        --restart=on-failure \
        -d \
        -v /sys:/sys:ro \
        -v /var/run:/var/run:rw  \
        -v /:/rootfs:ro \
        -v /var/lib/docker/:/var/lib/docker:rw \
        -v /var/lib/kubelet/:/var/lib/kubelet:rw \
        gcr.io/google_containers/hyperkube-${ARCH}:v${K8S_VERSION} \
        /hyperkube kubelet \
            --allow-privileged=true \
            --api-servers=http://${MASTER_IP}:8080 \
            --address=0.0.0.0 \
            --enable-server \
            --cluster-dns=10.0.0.10 \
            --cluster-domain=cluster.local \
            --containerized \
            --v=2

    docker run \
        -d \
        --net=host \
        --privileged \
        --restart=on-failure \
        gcr.io/google_containers/hyperkube-${ARCH}:v${K8S_VERSION} \
        /hyperkube proxy \
            --master=http://${MASTER_IP}:8080 \
            --v=2
}

echo "Detecting your OS distro ..."
detect_lsb

echo "Starting bootstrap docker ..."
bootstrap_daemon

echo "Starting k8s ..."
start_k8s

echo "Worker done!"


text:
package io.jvm.json.serializers;

import io.jvm.json.JsonSerializer;
import io.jvm.json.JsonWriter;

import java.io.IOException;

public class DoubleArrayJsonSerializer implements JsonSerializer<double[]> {
    @Override
    public boolean isDefault(final double[] value) {
        return value.length == 0;
    }

    @Override
    public void toJson(final JsonWriter jsonWriter, final double[] values) throws IOException {
        jsonWriter.writeOpenArray();
        boolean needComma = false;
        for (final double value : values) {
            if (needComma) {
                jsonWriter.writeComma();
            }
            jsonWriter.writeRaw(Double.toString(value));
            needComma = true;
        }
        jsonWriter.writeCloseArray();
    }
}


text:
import os
import sys
import struct
import bluetooth._bluetooth as bluez # Libreria BlueZ
from matplotlib.pylab import *  # Libreria para pintar parecido a los plots de matlab

mac=sys.argv[1]
ion()
potenciay=[0]       # Vector donde se ira anadiendo la señal de potencia
datox=[0]           # Vector para indicar el numero de medida
rssim=[0]
media=0

def printpacket(pkt):
    for c in pkt:
        sys.stdout.write("%02x " % struct.unpack("B",c)[0])
    print

def read_inquiry_mode(sock): #Modo de obtencion de lectura
    """returns the current mode, or -1 on failure"""
    # save current filter
    old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14)

    # Setup socket filter to receive only events related to the
    # read_inquiry_mode command
    flt = bluez.hci_filter_new()
    opcode = bluez.cmd_opcode_pack(bluez.OGF_HOST_CTL,
            bluez.OCF_READ_INQUIRY_MODE)
    bluez.hci_filter_set_ptype(flt, bluez.HCI_EVENT_PKT)
    bluez.hci_filter_set_event(flt, bluez.EVT_CMD_COMPLETE);
    bluez.hci_filter_set_opcode(flt, opcode)
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, flt )

    # first read the current inquiry mode.
    bluez.hci_send_cmd(sock, bluez.OGF_HOST_CTL,
            bluez.OCF_READ_INQUIRY_MODE )

    pkt = sock.recv(255)

    status,mode = struct.unpack("xxxxxxBB", pkt)
    if status != 0: mode = -1

    # restore old filter
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, old_filter )
    return mode

def write_inquiry_mode(sock, mode): #Modo de obteccion de escritura
    """returns 0 on success, -1 on failure"""
    # save current filter
    old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14)

    # Setup socket filter to receive only events related to the
    # write_inquiry_mode command
    flt = bluez.hci_filter_new()
    opcode = bluez.cmd_opcode_pack(bluez.OGF_HOST_CTL,
            bluez.OCF_WRITE_INQUIRY_MODE)
    bluez.hci_filter_set_ptype(flt, bluez.HCI_EVENT_PKT)
    bluez.hci_filter_set_event(flt, bluez.EVT_CMD_COMPLETE);
    bluez.hci_filter_set_opcode(flt, opcode)
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, flt )

    # send the command!
    bluez.hci_send_cmd(sock, bluez.OGF_HOST_CTL,
            bluez.OCF_WRITE_INQUIRY_MODE, struct.pack("B", mode) )

    pkt = sock.recv(255)

    status = struct.unpack("xxxxxxB", pkt)[0]

    # restore old filter
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, old_filter )
    if status != 0: return -1
    return 0

def device_inquiry_with_with_rssi(sock): #Obteccion del
    # save current filter
    old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, 14)

    # perform a device inquiry on bluetooth device #0
    # The inquiry should last 8 * 1.28 = 10.24 seconds
    # before the inquiry is performed, bluez should flush its cache of
    # previously discovered devices
    flt = bluez.hci_filter_new()
    bluez.hci_filter_all_events(flt)
    bluez.hci_filter_set_ptype(flt, bluez.HCI_EVENT_PKT)
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, flt )

    duration = 32 #4
    max_responses = 255
    cmd_pkt = struct.pack("BBBBB", 0x33, 0x8b, 0x9e, duration, max_responses)
    bluez.hci_send_cmd(sock, bluez.OGF_LINK_CTL, bluez.OCF_INQUIRY, cmd_pkt)

    results = []

    done = False

    line, = plot(datox,potenciay) #Ponemos la grafica
    axis([1,50,-90,0]) #Definimos la dimension de los ejes
    ylabel('Potencia (dBm)') #Nombre eje y
    xlabel('Iteracion') #Nombre eje x
    w=1
    while not done:
        pkt = sock.recv(255)
        ptype, event, plen = struct.unpack("BBB", pkt[:3])

        if event == bluez.EVT_INQUIRY_RESULT_WITH_RSSI:
            pkt = pkt[3:]
            nrsp = struct.unpack("B", pkt[0])[0]
            for i in range(nrsp):
                addr = bluez.ba2str( pkt[1+6*i:1+6*i+6] )
                rssi = struct.unpack("b", pkt[1+13*nrsp+i])[0]
                results.append( ( addr, rssi ) )
                print "[%s] RSSI: [%d]" % (addr, rssi)
                if addr== mac:
                    rssim.append(rssi)
                    potenciay.append(rssi) #Anadimos el nuevo valor de RSSI al vector potenciay
                    datox.append(w) #Anadimos el numero de iteracion al vector
                    w=w+1
                    line.set_ydata(potenciay)  # Actualizamos los datos del plot
                    line.set_xdata(datox)
                    draw() #Redibujamos la grafica

        elif event == bluez.EVT_INQUIRY_COMPLETE:
            savefig('potencia.png') #Guardamos la imagen en un archivo
            media=sum(rssim)/len(rssim)
            print(media)
            done = True

        elif event == bluez.EVT_CMD_STATUS:
            status, ncmd, opcode = struct.unpack("BBH", pkt[3:7])
            if status != 0:
                print "uh oh..."
                printpacket(pkt[3:7])
                done = True
        elif event == bluez.EVT_INQUIRY_RESULT:
            pkt = pkt[3:]
            nrsp = struct.unpack("B", pkt[0])[0]
            for i in range(nrsp):
                addr = bluez.ba2str( pkt[1+6*i:1+6*i+6] )
                results.append( ( addr, -1 ) )
                print "[%s] (no RRSI)" % addr
        else:
            print "unrecognized packet type 0x%02x" % ptype
	    print "event ", event

    # restore old filter
    sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, old_filter )

    return results

dev_id = 0
try:
    sock = bluez.hci_open_dev(dev_id)
except:
    print "error accessing bluetooth device..."
    sys.exit(1)

try:
    mode = read_inquiry_mode(sock)
except Exception, e:
    print "error reading inquiry mode.  "
    print "Are you sure this a bluetooth 1.2 device?"
    print e
    sys.exit(1)
print "Modo de obtenccion actual %d" % mode

if mode != 1:
    print "writing inquiry mode..."
    try:
        result = write_inquiry_mode(sock, 1)
    except Exception, e:
        print "error writing inquiry mode.  Are you sure you're root?"
        print e
        sys.exit(1)
    if result != 0:
        print "error while setting inquiry mode"
    print "result: %d" % result

print "Empezamos a medir"
device_inquiry_with_with_rssi(sock)
print (media)


text:
/* Simple executable that will print it's pid and then do nothing for 10
 * minutes.  You can finish it earlier by sending a SIGTERM. */

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

int
main(int argc, char **argv)
{
    int i;

    printf("%ld\n", (long)getpid());
    fflush(stdout);

    for (i = 0; i < 60; i++)
        sleep(10);
    return 0;
}