text:
bool Processor::instrADD(const std::string& strDest, const std::string& strSource)
{
    // Destination register is int
    if (strDest[0] == 'I')
    {
        signed int* pRegDest = nullptr;
        if (getRegInt(strDest, pRegDest))
        {
            // Source register is int
            if (strSource[0] == 'I')
            {
                signed int* pRegSource = nullptr;
                if (getRegInt(strSource, pRegSource))
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += *pRegSource;

                    if (*pRegSource >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source register is long
            else if (strSource[0] == 'L')
            {
                unsigned long* pRegSource = nullptr;
                if (getRegLong(strSource, pRegSource))
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += (signed int)*pRegSource;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source is a literal value
            else
            {
                std::istringstream iss(strSource);
                signed int sourceValue = 0;
                if (iss >> sourceValue)
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += sourceValue;

                    if (sourceValue >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }
            }

            errInvalidOperand(strSource);
            return false;
        }
    }
    // Destination register is long
    else if (strDest[0] == 'L')
    {
        unsigned long* pRegDest = nullptr;
        if (getRegLong(strDest, pRegDest))
        {
            // Source register is int
            if (strSource[0] == 'I')
            {
                signed int* pRegSource = nullptr;
                if (getRegInt(strSource, pRegSource))
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += (unsigned long)*pRegSource;

                    if (*pRegSource >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source register is long
            else if (strSource[0] == 'L')
            {
                unsigned long* pRegSource = nullptr;
                if (getRegLong(strSource, pRegSource))
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += *pRegSource;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source is a literal value
            else
            {
                std::istringstream iss(strSource);
                unsigned long sourceValue = 0;
                if (iss >> sourceValue)
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += sourceValue;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }
            }

            errInvalidOperand(strSource);
            return false;
        }
    }

    errInvalidRegister(strDest);
    return false;
}

bool Processor::instrADC(const std::string& strDest)
{
    if (strDest[0] == 'I')
    {
        signed int* pReg = nullptr;
        if (getRegInt(strDest, pReg))
        {
            signed int oldValue = *pReg;
            if (m_flagCarry)
                *pReg += 1;
            m_flagCarry = (*pReg < oldValue);
            return true;
        }
    }
    else if (strDest[0] == 'L')
    {
        unsigned long* pReg = nullptr;
        if (getRegLong(strDest, pReg))
        {
            unsigned long oldValue = *pReg;
            if (m_flagCarry)
                *pReg += 1;
            m_flagCarry = (*pReg < oldValue);
            return true;
        }
    }

    errInvalidRegister(strDest);
    return false;
}

bool Processor::instrADC(const std::string& strDest, const std::string& strSource)
{
    // Destination register is int
    if (strDest[0] == 'I')
    {
        signed int* pRegDest = nullptr;
        if (getRegInt(strDest, pRegDest))
        {
            // Source register is int
            if (strSource[0] == 'I')
            {
                signed int* pRegSource = nullptr;
                if (getRegInt(strSource, pRegSource))
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += *pRegSource;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    if (*pRegSource >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source register is long
            else if (strSource[0] == 'L')
            {
                unsigned long* pRegSource = nullptr;
                if (getRegLong(strSource, pRegSource))
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += (signed int)*pRegSource;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source is a literal value
            else
            {
                std::istringstream iss(strSource);
                signed int sourceValue = 0;
                if (iss >> sourceValue)
                {
                    signed int oldValue = *pRegDest;
                    *pRegDest += sourceValue;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    if (sourceValue >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }
            }

            errInvalidOperand(strSource);
            return false;
        }
    }
    // Destination register is long
    else if (strDest[0] == 'L')
    {
        unsigned long* pRegDest = nullptr;
        if (getRegLong(strDest, pRegDest))
        {
            // Source register is int
            if (strSource[0] == 'I')
            {
                signed int* pRegSource = nullptr;
                if (getRegInt(strSource, pRegSource))
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += (unsigned long)*pRegSource;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    if (*pRegSource >= 0)
                    {
                        m_flagCarry = (*pRegDest < oldValue);
                        m_flagBorrow = false;
                    }
                    else
                    {
                        m_flagCarry = false;
                        m_flagBorrow = (*pRegDest > oldValue);
                    }

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source register is long
            else if (strSource[0] == 'L')
            {
                unsigned long* pRegSource = nullptr;
                if (getRegLong(strSource, pRegSource))
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += *pRegSource;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }

                errInvalidRegister(strSource);
                return false;
            }
            // Source is a literal value
            else
            {
                std::istringstream iss(strSource);
                unsigned long sourceValue = 0;
                if (iss >> sourceValue)
                {
                    unsigned long oldValue = *pRegDest;
                    *pRegDest += sourceValue;
                    if (m_flagCarry)
                        *pRegDest += 1;

                    m_flagCarry = (*pRegDest < oldValue);
                    m_flagBorrow = false;

                    return true;
                }
            }

            errInvalidOperand(strSource);
            return false;
        }
    }

    errInvalidRegister(strDest);
    return false;
}

redpajama_set_name: RedPajamaGithub


text:
[![Gem Version](https://badge.fury.io/rb/rbac.svg)](https://badge.fury.io/rb/rbac)

RBAC (Role Based Access Control) gem useful to enable your Rails application with the power of RBAC.
This gem is helpful to maintain roles, groups and privileges at database table level. You have user interface to manage the roles, groups and privileges.This gem is applicable in the area where you need a multiple roles and privileges. It will fulfil all your needs.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rbac'
```

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install rbac

As this gem is database based access control system, so need to run:

    $ rails g rbac:migration

after this -

    $ rake db:migrate

To setup user interface and backend for RBAC you need to run following generator. It will create necessary controllers, views, models, routes, helper method and associations.

*Note - Before this your Rails application have User model*

	$ rails g rbac:create

## Pre-requisites
This gem work with User model only. Generator of this gem add association for User model. In further development we will integrate this with any authentication gem.

## Concept
In this there is strong relationship between user, role, group and privilege.
* User and Role model have many-to-many association
	User can have multiple roles and Role can have multiple users associated. It's as per your requirements, for this you need to associate roles with user in your add/update users controller/view.

	For example -

  	![alt text](https://raw.githubusercontent.com/sandipkaranjekar/rbac/master/images/user_form.png "User new/edit form")

* Role and Group model have many-to-many association
	Here group is set of privileges group together while creating role, user need to assign groups to the role. So automatically privileges associated with this group get assigned to role (indirectly to user).
  You can access Role and Group UI -
  * http://{host_url}/rbac/roles
  * http://{host_url}/rbac/groups

* Group and Privilege model have many-to-many association
  Here Group can have multiple privileges and privilege belongs to many groups. You need to first set privileges with controller and action. If you select privilege under group it will be accessable to role.
  All privileges are controller and action based.You should have controller and action to set privilege.
  You can access Privilege UI -
  * http://{host_url}/rbac/privileges

## Usage
Here you will have one helper method to check role have access to that resource.
```ruby
has_permission(user, controller, action)
```
user = Logged in user active record object
controller = For which controller that resource belong
action = Action of controller which we need to check for having permission

This method return *true* and *false*. Accordingly you can make a decision.

For example -
```ruby
# In view
<% if has_permission(user, "users", "show") %>
  <%= link_to 'Show', user %>
<% end %>
```
## TODO
* Support API application means has_permission should work with api permission granting.
* Integrate with authentication gem.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
class Ginst::Plugin
  def self.plugins
    ::Ginst::Plugin.subclasses.map{|a| eval(a)}
  end
  def self.paths
    plugins.inject({}){|memo,plugin|
      memo.merge(plugin.paths)
    }
  end
end


text:
<img src="http://f.cl.ly/items/0z2m1E2N1B2J2A0S3147/stacker.png" alt="Drawing" width='400px'/>

Stacker is an iOS view-controller to kickstart development of hybrid native/web iOS apps. Stacker was built to keep your navigation native while the rest of your app is driven by webviews using [Stacker's special URLs.](http://www.lokimeyburg.com/Stacker/docs/url-structure/)

Built for: iPhones running iOS 7 & iOS 8 (iPad support coming soon)

## Features

- Build [URL-driven iOS apps](http://www.lokimeyburg.com/Stacker/docs/url-structure/)
- Send messages between Obj-C and JavaScript
- Custom navigation button handlers
- View external websites in a separate modal view
- Theming options
- Pull to refresh on all pages
- Error pages
- App version and device information sent in HTTP headers

## Getting Started & Documentation

[View the official Stacker documentation](http://www.lokimeyburg.com/Stacker/docs/getting-started/) to get started.

## Creating a StackerController

**If you're using [CocoaPods:](http://cocoapods.org)**

In your Podfile add:
```
pod 'LMStacker', :git => 'https://github.com/lokimeyburg/Stacker.git'
```
And then run
```
$ pod install
```

Now in your XCode project:

```
// Import Stacker
#import "LMStackerController.h"

// Create a controller and point it to your web app's url
LMStackerController *myController = [[LMStackerController alloc] initWithURL:@"http://localhost:3000?x_page_title=Home"];
```

### How to update the documentation

The [documentation site](http://www.lokimeyburg.com/Stacker/) is being created with [Github Pages](https://pages.github.com/) and so it can be found by checking out the "[gh-pages](https://github.com/lokimeyburg/Stacker/tree/gh-pages)" branch. The actual documentation is in the `/docs` folder. If you find a spelling mistake or any errors in the documentation please submit a pull request to the branch.


text:
Epool - Generic pooling library for Erlang

[![Build Status](https://api.travis-ci.org/ergenius/epool.svg?branch=master)](https://travis-ci.org/ergenius/epool)

Epool is a **generic** pooling library for Erlang **insanely documented** with a focus on **performance**, **extensibility** and **functionality**.

## Projects using epool

- ErlCash - Erlang cryptocurrency https://github.com/erlmoney/erlcash

## Quick comparison with other pooling libraries

| # | | pooler | poolboy | **epool** |
| --- | --- | --- | --- | --- |
| 1 | Keep a copy of all workers | dict (questionable) | No | No |
| 2 | Idle workers storage | lists | lists | **lists**, ets or custom (configurable) |
| 3 | Busy workers storage | dict (questionable) | local ETS (questionable) | **lists**, ets or custom (configurable) |
| 4 | Waiting calls storage | queue (questionable) | queue (questionable) | **lists**, ets or custom (configurable) |
| 5 | Answer waiting calls method | erlang:send_after (slower) | on worker release cast (faster) | on worker release cast (faster) |
| 6 | Method used to monitor consumers termination | Monitors | Monitors | Monitors |
| 7 | Method used to monitor workers termination | Monitors | erlang:link/1 and process_flag(trap_exit, true) (highly questionable) | Monitors |
| 8 | Separate process for handling workers creation | Yes (faster, avoid delays because of workers with slow initialisation, handle worker creation errors) | No (freeze the pool until new worker initialisation is complete, crush the pool on worker creation errors) | Yes (faster, avoid delays because of workers with slow initialisation(faster, avoid delays because of workers with slow initialisation, handle worker creation errors) |
| 9 | Handle workers start errors | No (fail on services downtime) | No (fail on services downtime) | Yes (configurable) |
| 10 | Support grouping | Yes using pg2 (nice feature) | No | Yes using ETS, gen_server or pg2 (configurable, nice feature) |
| 11 | Offer default supervision tree | Yes (nice feature) | No (not trivial to use) | Yes (nice feature) |
| 12 | Offer transactions for safer taking and releasing workers | No | Yes (nice feature) | Yes (nice feature) |
| 13 | Encourage automatic release of the workers for short life consumers | Yes (dangerous) | Yes (dangerous) | No (safer) |
| 14 | Encapsulation of various implementation | Partial (not trivial to change) | Partial (not trivial to change) | Yes (trivial to alter) |
| 15 | Statistics | Yes (nice feature) | No (harder to debug) | Yes (nice feature) |
| 16 | Debug logging | Yes (slower using error_logger may flood production systems with unnecessary error messages) | No (faster) | Yes & No (optional Erlang preprocessor flag) |

## Motivation

The need for epool arose while writing various Erlang applications that use different database drivers based on existing pooling libraries: pooler or poolboy.

The first problems with pooler came out for me when using cqerl Native Erlang CQL client for Cassandra.

I found some of the cqerl bottlenecks were related to the pooler application.

This situation drove my attention to another pooling library (poolboy) and push me to start building a modified Cassandra driver using poolboy. Poolboy usually offers better performance than pooler and due to its simplicity.

It was all good until i experienced some connection problems with some nodes of my database cloud. Poolboy was creating the workers on take (checkout) calls freezing the pool server for every new workers that was being created to replace the dead database connections. Calls where waiting to timeout all around. Workers kept dying, callers kept waiting for timeout. All the system was crawling to a stop despite there where enough database nodes up and running.

This was the moment building a pooler from scratch looked like something i needed to do. Epool was created from the idea to bring the best from both worlds together: the simplicity and performance of poolboy and some nice functionalities from pooler.

I also spent a lot of time to test the choice of poolboy that mixes 3 different methods for handling the idle workers, the waiting calls and the monitored processes and I found that those mechanisms can be improved.

Poolboy uses a list for handling the the idle workers, an Erlang queue for handling the waiting calls and a private ETS table for keeping the monitored processes references. Unfortunately, those implementations are hardcoded into the pooler or poolboy servers and are quite not easy to change. I wanted to detach the logic of maintaining those lists from the logic of the pooling server for being able to test different ways to maintain idle workers, waiting calls or monitors. I isolated those from the caller server in different modules that implement CRUD like operations you can easily alter. Further I offered the epool user the choice to test for himself various implementations just by altering pools configuration options. You can mix whatever implementations suit your needs: lists, queue or ETS tables with a pool configuration flag and choose the best solution for your pool.

I liked the transaction functionality from poolboy. I liked the grouping functionality from pooler. I liked the way pooler was offering a default supervision tree speeding up the implementation process for lazy programmers.

I also wanted this project to be a good educational opportunity for everybody who wants to learn Erlang.
Erlang applications, due to the nature of the language, are usually lacking documentation and look somewhat hard to understand by people that are new to Erlang.

That's why I decided to **insanely** document the code so that any Erlang beginner can understand it.

## Project roadmap

1. Continuously fix bugs and tune performance.
2. Write more testing units.
3. Test and optimize the default epool settings to suit applications that need to survive big periods of workers downtime due to network failures, database failures or any other kind of remote services failures.
4. Monitors the group pools for timeouts and prioritize the pools so best one are called first. This will solve complex problems with connections to cloud services or distributed databases.
4. Add more functionalities for calling, casting or sending messages to a bunch of workers from a pool or from a pools group.
5. Design some generic workers templates that can be used to easily write database drivers from scratch with minimal amount of effort involved related to the workers pooling mechanisms.

## Erlang versions supported

Epool officially supports OTP release 17 and later.

Development of Epool takes place using a OTP 19.3 release and tests are done on:
- 17.5
- 18.3
- 19.3
- 20.0

Unofficially you may be able to use Epool with older Erlang versions. No guarantee included.

## Dependencies

I didn't like to have any project dependencies that can easily introduce versioning conflicts in bigger applications that use the same dependencies. Epool uses only standard OTP, no other application is needed and will ever be.

## Authors

- Madalin Grigore-Enescu (ergenius) <os@ergenius.com>

## License

Epool is available in the public domain.

Epool is also optionally available under the MIT license (see `LICENSE`) for jurisdictions that do not recognize public domain works.


text:
<?php

namespace Webforge\Minimock;

class TemplateTest extends \Webforge\Code\Test\Base {

  public function setUp() {
    $this->chainClass = __NAMESPACE__ . '\\Template';
    parent::setUp();

    $this->template = new Template('my-name', $this->model = (object) array('var'=>TRUE));
  }

  public function testConstructionAndGetters() {
    $this->assertEquals('my-name', $this->template->getName());
    $this->assertSame($this->model, $this->template->getModel());
  }
}


text:
@interface ViewController2 : UIViewController

@property (nonatomic, strong) NSString* item;

@property (nonatomic, copy) void (^dismissActionBlock)(NSDictionary* userInfo);

@end


text:
{% load staticfiles %}
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

<script src="{% static 'js/ripples.min.js' %}"></script>
<script src="{% static 'js/material.min.js' %}"></script>
<script src="{% static 'js/marked.js' %}"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.2.2/ace.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ace/1.2.2/ext-language_tools.js"></script>
<script>
$(document).ready(function() {
  // This command is used to initialize some elements and make them work properly
  $.material.init();
  $('[data-toggle="tooltip"]').tooltip();
});
</script>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

 Copyright (C) 2006-2007 GtkSourceView team
 Author: Fabiano Shark <fabiano@fshark.com>

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Library General Public License for more details.

 You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.

-->
<style-scheme id="dreamweaver" _name="Dreamweaver" version="1.0">
  <author>Fabiano Shark</author>
  <_description>Color scheme based on Dreamweaver</_description>

  <!-- Global Settings -->
  <style name="text"                        foreground="#black" background="#white"/>
  <style name="selection"                   foreground="#black" background="#gray"/>
  <style name="cursor"                      foreground="#black"/>
  <style name="current-line"                background="#gray92"/>
  <style name="line-numbers"                foreground="#black" background="#gray"/>

  <!-- Bracket Matching -->
  <style name="bracket-match"               foreground="#black" background="#cyan"/>
  <style name="bracket-mismatch"            foreground="#white" background="#red"/>

  <!-- Comments -->
  <style name="def:comment"                 foreground="#FF8000"/>
  <style name="def:sheband"                 foreground="#gray"/>
  <style name="def:doc-comment-element"     italic="true"/>

  <!-- Constants -->
  <style name="def:constant"                foreground="#F00000"/>
  <style name="def:string"                  foreground="#D00000"/>
  <style name="def:special-char"            foreground="#slate blue"/>
  <style name="def:special-constant"        foreground="#slate blue"/>
  <style name="def:floating-point"          foreground="#D00000"/>

  <!-- Identifiers -->
  <style name="def:identifier"              foreground="#dark blue"/>

  <!-- Statements -->
  <style name="def:statement"               foreground="#0000FF" bold="false"/>

  <!-- Types -->
  <style name="def:type"                    foreground="#0000FF" bold="false"/>

  <!-- Others -->
  <style name="def:keyword"                 foreground="#007700" bold="false"/>
  <style name="def:preprocessor"            foreground="#blue"/>
  <style name="def:error"                   foreground="#0000FF" background="#white" bold="false"/>
  <style name="def:underlined"              italic="true" underline="true"/>
  <style name="latex:display-math"          foreground="#slate blue" bold="false"/>

</style-scheme>


text:
<?php

namespace Indigo\Shorten\Provider;

use Indigo\Shorten\Provider;
use Indigo\Http\Client;

/**
 * Shorten URL with Tiny.cc
 *
 * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
 */
class Tinycc implements Provider
{
    /**
     * API Endpoint
     */
    const ENDPOINT = 'http://tiny.cc';

    /**
     * API Version
     */
    const VERSION = '2.0.3';

    /**
     * HTTP Client
     *
     * @var Client
     */
    protected $client;

    /**
     * @var string
     */
    protected $apiKey;

    /**
     * @param Client $client
     * @param string $apiKey
     */
    public function __construct(Client $client, $apiKey = null)
    {
        $this->client = $client;
        $this->apiKey = $apiKey;
    }

    /**
     * {@inheritdoc}
     */
    public function shorten($url)
    {

    }

    /**
     * {@inheritdoc}
     */
    public function expand($url)
    {

    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>source_group — CMake 3.7.1 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="top" title="CMake 3.7.1 Documentation" href="../index.html" />
    <link rel="up" title="cmake-commands(7)" href="../manual/cmake-commands.7.html" />
    <link rel="next" title="string" href="string.html" />
    <link rel="prev" title="site_name" href="site_name.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.7.1 Documentation »

cmake-commands(7) »

source_group¶

Define a grouping for source files in IDE project generation.

source_group(<name> [FILES <src>...] [REGULAR_EXPRESSION <regex>])

Defines a group into which sources will be placed in project files.
This is intended to set up file tabs in Visual Studio.
The options are:

FILES

Any source file specified explicitly will be placed in group
<name>.  Relative paths are interpreted with respect to the
current source directory.

REGULAR_EXPRESSION

Any source file whose name matches the regular expression will
be placed in group <name>.

If a source file matches multiple groups, the last group that
explicitly lists the file with FILES will be favored, if any.
If no group explicitly lists the file, the last group whose
regular expression matches the file will be favored.

The <name> of the group may contain backslashes to specify subgroups:

source_group(outer\\inner ...)

For backwards compatibility, the short-hand signature

source_group(<name> <regex>)

is equivalent to

source_group(<name> REGULAR_EXPRESSION <regex>)

Previous topic

site_name

Next topic

string

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

    CMake »

    3.7.1 Documentation »

cmake-commands(7) »

        © Copyright 2000-2016 Kitware, Inc. and Contributors.
      Created using Sphinx 1.4a0+.


text:
import acm.program.ConsoleProgram;

public class CaesarCipher extends ConsoleProgram {

	public void run() {
		println("This program uses Caesar's cipher for encryption.");
		int key = readInt("Enter encryption key: ");
		String plainText = readLine("Plaintext: ");
		String encryptedText = encryptCaesarCipher(plainText, key);
		println(encryptedText);
	}

	private String encryptCaesarCipher(String plainText, int key) {
		String encryptedText = "";

		for (int i = 0; i < plainText.length(); i++) {
			char c = plainText.charAt(i);
			if (c >= 'A' && c <= 'Z') {
				c = (char) ((c - 'A' + key) % 26 + 'A');
			} else if (c >= 'a' && c <= 'z') {
				c = (char) ((c - 'a' + key) % 26 + 'a');
			}
			encryptedText += c;
		}

		return encryptedText;
	}

}


text:
package gps

import (
	"github.com/Masterminds/vcs"
	"github.com/pkg/errors"
)

// unwrapVcsErr recognizes *vcs.LocalError and *vsc.RemoteError, and returns a form
// preserving the actual vcs command output and error, in addition to the message.
// All other types pass through unchanged.
func unwrapVcsErr(err error) error {
	var cause error
	var out, msg string

	switch t := err.(type) {
	case *vcs.LocalError:
		cause, out, msg = t.Original(), t.Out(), t.Error()
	case *vcs.RemoteError:
		cause, out, msg = t.Original(), t.Out(), t.Error()

	default:
		return err
	}

	if cause == nil {
		cause = errors.New(out)
	} else {
		cause = errors.Wrap(cause, out)
	}
	return errors.Wrap(cause, msg)
}


text:
#region Copyright (c) 2014 Orcomp development team.
// -------------------------------------------------------------------------------------------------------------------
// <copyright file="BootStrapper.cs" company="Orcomp development team">
//   Copyright (c) 2014 Orcomp development team. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
#endregion

namespace SolutionValidator.Infrastructure
{
	#region using...
	using Catel.IoC;
	using FolderStructure;
	using ProjectFile;

	#endregion

	/// <summary>
	///     Dependency Injection initializer class
	/// </summary>
	public static class BootStrapper
	{
		#region Constants and Fields
		#endregion

		#region Public Methods and Operators
		#endregion

		#region Methods
		/// <summary>
		///     Registers the services / interface bindings.
		/// </summary>
		public static void RegisterServices()
		{
			var serviceLocator = ServiceLocator.Default;

			serviceLocator.RegisterInstance<IFileSystemHelper>(new FileSystemHelper());
			serviceLocator.RegisterInstance<IProjectFileHelper>(new ProjectFileHelper());
		}
		#endregion
	}
}


text:
package pl.grzeslowski.jsupla.protocoljava.api.serializers.dcs;

import pl.grzeslowski.jsupla.protocol.api.structs.dcs.DeviceClientServer;
import pl.grzeslowski.jsupla.protocoljava.api.entities.dcs.DeviceClientServerEntity;
import pl.grzeslowski.jsupla.protocoljava.api.serializers.Serializer;

public interface DeviceClientServerSerializer<EntityT extends DeviceClientServerEntity,
                                                     SuplaProtoT extends DeviceClientServer>
        extends Serializer<EntityT, SuplaProtoT> {
}


text:
#ifndef MEGA_RAID_H
#define MEGA_RAID_H 1

#include "http.h"
#include "utils.h"

namespace mega {

    enum { RAIDPARTS = 6 };
    enum { RAIDSECTOR = 16 };
    enum { RAIDLINE = ((RAIDPARTS - 1)*RAIDSECTOR) };

    // Holds the latest download data received.   Raid-aware.   Suitable for file transfers, or direct streaming.
    // For non-raid files, supplies the received buffer back to the same connection for writing to file (having decrypted and mac'd it),
    // effectively the same way it worked before raid.
    // For raid files, collects up enough input buffers until it can combine them to make a piece of the output file.
    // Once a piece of the output is reconstructed the caller can access it with getAsyncOutputBufferPointer().
    // Once that piece is no longer needed, call bufferWriteCompleted to indicate that it can be deallocated.
    class MEGA_API RaidBufferManager
    {
    public:

        struct FilePiece {
            m_off_t pos;
            HttpReq::http_buf_t buf;  // owned here
            chunkmac_map chunkmacs;

            std::condition_variable finalizedCV;
            bool finalized = false;

            FilePiece();
            FilePiece(m_off_t p, size_t len);    // makes a buffer of the specified size (with extra space for SymmCipher::ctr_crypt padding)
            FilePiece(m_off_t p, HttpReq::http_buf_t* b); // takes ownership of the buffer
            void swap(FilePiece& other);

            // decrypt & mac
            bool finalize(bool parallel, m_off_t filesize, int64_t ctriv, SymmCipher *cipher, chunkmac_map* source_chunkmacs);

        };

        // call this before starting a transfer. Extracts the vector content
        void setIsRaid(const std::vector<std::string>& tempUrls, m_off_t resumepos, m_off_t readtopos, m_off_t filesize, m_off_t maxDownloadRequestSize);

        // indicate if the file is raid or not.  Most variation due to raid/non-raid is captured in this class
        bool isRaid() const;

        // Is this the connection we are not using
        bool isUnusedRaidConection(unsigned connectionNum) const;

        // Is this connection unable to continue currently because other connections are too far behind
        bool isRaidConnectionProgressBlocked(unsigned connectionNum) const;

        // in case URLs expire, use this to update them and keep downloading without wasting any data
        void updateUrlsAndResetPos(const std::vector<std::string>& tempUrls);

        // pass a downloaded buffer to the manager, pre-decryption.  Takes ownership of the FilePiece. May update the connection pos (for raid)
        void submitBuffer(unsigned connectionNum, FilePiece* piece);

        // get the file output data to write to the filesystem, on the asyncIO associated with a particular connection (or synchronously).  Buffer ownership is retained here.
        std::shared_ptr<RaidBufferManager::FilePiece> getAsyncOutputBufferPointer(unsigned connectionNum);

        // indicate that the buffer written by asyncIO (or synchronously) can now be discarded.
        void bufferWriteCompleted(unsigned connectionNum, bool succeeded);

        // temp URL to use on a given connection.  The same on all connections for a non-raid file.
        const std::string& tempURL(unsigned connectionNum);

        // reference to the tempurls.  Useful for caching raid and non-raid
        const std::vector<std::string>& tempUrlVector() const;

        // Track the progress of http requests sent.  For raid download, tracks the parts.  Otherwise, uses the position through the full file.
        virtual m_off_t& transferPos(unsigned connectionNum);

        // start this part off again (eg. after abandoning slowest connection)
        void resetPart(unsigned connectionNum);

        // Return the size of a particluar part of the file, for raid.  Or for non-raid the size of the whole wile.
        m_off_t transferSize(unsigned connectionNum);

        // Get the file position to upload/download to on the specified connection
        std::pair<m_off_t, m_off_t> nextNPosForConnection(unsigned connectionNum, bool& newBufferSupplied, bool& pauseConnectionForRaid);

        // calculate the exact size of each of the 6 parts of a raid file.  Some may not have a full last sector
        static m_off_t raidPartSize(unsigned part, m_off_t fullfilesize);

        // report a failed connection.  The function tries to switch to 5 connection raid or a different 5 connections.  Two fails without progress and we should fail the transfer as usual
        bool tryRaidHttpGetErrorRecovery(unsigned errorConnectionNum, bool incrementErrors);

        // indicate that this connection has responded with headers, and see if we now know which is the slowest connection, and make that the unused one
        bool detectSlowestRaidConnection(unsigned thisConnection, unsigned& slowestConnection);

        // returns how far we are through the file on average, including uncombined data
        m_off_t progress() const;

        RaidBufferManager();
        ~RaidBufferManager();

    private:

        // parameters to control raid download
        enum { RaidMaxChunksPerRead = 5 };
        enum { RaidReadAheadChunksPausePoint = 8 };
        enum { RaidReadAheadChunksUnpausePoint = 4 };

        bool is_raid;
        bool raidKnown;
        m_off_t deliverlimitpos;   // end of the data that the client requested
        m_off_t acquirelimitpos;   // end of the data that we need to deliver that (can be up to the next raidline boundary)
        m_off_t fullfilesize;      // end of the file

        // controls buffer sizes used
        unsigned raidLinesPerChunk;

        // of the six raid URLs, which 5 are we downloading from
        unsigned unusedRaidConnection;

        // storage server access URLs.  It either has 6 entries for a raid file, or 1 entry for a non-raid file, or empty if we have not looked up a tempurl yet.
        std::vector<std::string> tempurls;
        std::string emptyReturnString;

        // a connection is paused if it reads too far ahead of others.  This prevents excessive buffer usage
        bool connectionPaused[RAIDPARTS];

        // for raid, how far through the raid part we are currently
        m_off_t raidrequestpartpos[RAIDPARTS];

        // for raid, the http requested data before combining
        std::deque<FilePiece*> raidinputparts[RAIDPARTS];

        // the data to output currently, per connection, raid or non-raid.  re-accessible in case retries are needed
        std::map<unsigned, std::shared_ptr<FilePiece>> asyncoutputbuffers;

        // piece to carry over to the next combine operation, when we don't get pieces that match the chunkceil boundaries
        FilePiece leftoverchunk;

        // the point we are at in the raid input parts.  raidinputparts buffers contain data from this point in their part.
        m_off_t raidpartspos;

        // the point we are at in the output file.  asyncoutputbuffers contain data from this point.
        m_off_t outputfilepos;

        // the point we started at in the output file.
        m_off_t startfilepos;

        // In the case of resuming a file, the point we got to in the output might not line up nicely with a sector in an input part.
        // This field allows us to start reading on a sector boundary but skip outputting data until we match where we got to last time.
        size_t resumewastedbytes;

        // track errors across the connections.  A successful fetch resets the error count for a connection.  Stop trying to recover if we hit 3 total.
        unsigned raidHttpGetErrorCount[RAIDPARTS];

        bool connectionStarted[RAIDPARTS];

        // take raid input part buffers and combine to form the asyncoutputbuffers
        void combineRaidParts(unsigned connectionNum);
        FilePiece* combineRaidParts(size_t partslen, size_t bufflen, m_off_t filepos, FilePiece& prevleftoverchunk);
        void recoverSectorFromParity(byte* dest, byte* inputbufs[], unsigned offset);
        void combineLastRaidLine(byte* dest, size_t nbytes);
        void rollInputBuffers(size_t dataToDiscard);
        virtual void bufferWriteCompletedAction(FilePiece& r);

        // decrypt and mac downloaded chunk.  virtual so Transfer and DirectNode derivations can be different
        // calcOutputChunkPos is used to figure out how much of the available data can be passed to it
        virtual void finalize(FilePiece& r) = 0;
        virtual m_off_t calcOutputChunkPos(m_off_t acquiredpos) = 0;

        friend class DebugTestHook;
    };

    class MEGA_API TransferBufferManager : public RaidBufferManager
    {
    public:
        // call this before starting a transfer. Extracts the vector content
        void setIsRaid(Transfer* transfer, std::vector<std::string>& tempUrls, m_off_t resumepos, m_off_t maxDownloadRequestSize);

        // Track the progress of http requests sent.  For raid download, tracks the parts.  Otherwise, uses the full file position in the Transfer object, as it used to prior to raid.
        m_off_t& transferPos(unsigned connectionNum) override;

        // Get the file position to upload/download to on the specified connection
        std::pair<m_off_t, m_off_t> nextNPosForConnection(unsigned connectionNum, m_off_t maxDownloadRequestSize, unsigned connectionCount, bool& newBufferSupplied, bool& pauseConnectionForRaid, m_off_t uploadspeed);

        TransferBufferManager();

    private:

        Transfer* transfer;

        // decrypt and mac downloaded chunk
        void finalize(FilePiece& r) override;
        m_off_t calcOutputChunkPos(m_off_t acquiredpos) override;
        void bufferWriteCompletedAction(FilePiece& r) override;

        friend class DebugTestHook;
    };

    class MEGA_API DirectReadBufferManager : public RaidBufferManager
    {
    public:

        // Track the progress of http requests sent.  For raid download, tracks the parts.  Otherwise, uses the full file position in the Transfer object, as it used to prior to raid.
        m_off_t& transferPos(unsigned connectionNum) override;

        DirectReadBufferManager(DirectRead* dr);

    private:

        DirectRead* directRead;

        // decrypt and mac downloaded chunk
        void finalize(FilePiece& r) override;
        m_off_t calcOutputChunkPos(m_off_t acquiredpos) override;

        friend class DebugTestHook;
    };

} // namespace

#endif


text:
package org.asynchttpclient;

import java.nio.ByteBuffer;

/**
 * A callback class used when an HTTP response body is received.
 */
public abstract class HttpResponseBodyPart {

    private final boolean last;

    public HttpResponseBodyPart(boolean last) {
        this.last = last;
    }

    /**
     * @return length of this part in bytes
     */
    public abstract int length();

    /**
     * @return  the response body's part bytes received.
     */
    public abstract byte[] getBodyPartBytes();

    /**
     * @return a {@link ByteBuffer} that wraps the actual bytes read from the response's chunk.
     * The {@link ByteBuffer}'s capacity is equal to the number of bytes available.
     */
    public abstract ByteBuffer getBodyByteBuffer();

    /**
     * @return true if this is the last part.
     */
    public boolean isLast() {
        return last;
    }
}


text:
<!DOCTYPE html>

	<title>

            MRF Geosystems Corporation -

    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.

      MRF Geosystems Corporation

Legal/Operating Name:

MRF Geosystems Corporation

http://www.mrf.com

office_admin@mrf.com

Mailing Address:

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

                   200-625 14 St NW

                    CALGARY,

                    Alberta

                  T2N 2A1

                </address>

Location Address:

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

                   200-625 14 St NW

                    CALGARY,

                    Alberta

                  T2N 2A1

                         </address>

Tel.:
		      (403) 216-5515

Tel.:
			      (877) 216-5515

Fax:
		      (403) 216-5518

Logo

Company Profile

            MRF Geosystems Corporation is a well-established GIS software and services provider.  In addition to our leading edge software solutions, MRF has been providing consulting services, custom programming services, and data conversion and migration services to customers all over the world since 1992.

MRF Professional Services includes:

§	Complete GIS database design and support for Oracle, and other databases

§	Customized software applications for ArcGIS, ArcSDE, ArcIMS, ArcGIS Server, MicroStation, GeoMedia, Geomedia Pro, GeoMedia Web Map, MGE, AutoCad, , ramme, MapInfo

§	Scanning

§	Attribute collection and/or extraction

§	Geo-referencing

§	NAD conversion

§	Cleaning and Editing

§	Buffer and overlay capabilities

§	Warping

§	Document integration

§	User interface design and development for stand-alone,

intranet and internet applications

MRF has completed numerous projects for municipalities, corporations and utilities encompassing electrical and telecommunications networks, pipeline systems, water and drainage facilities, and land base data conversion.

				Full profile

				Full profile

				Contact information

                Gary
                Zhang

                  Title:

                President

                    Area of Responsibility:

                    Domestic Sales & Marketing,

                    Export Sales & Marketing,

                    Government Relations,

                    Management Executive.

                  Telephone:

                (403) 216-5515

                    Email:

                  gzhang@mrf.com

  top of page

				Company description

            Country of Ownership:

              Canada

              Year Established:

            1992

            Exporting:

              Yes

                Primary Industry (NAICS):

				541510 - Computer Systems Design and Related Services

            Primary Business Activity:

            Services

              Total Sales ($CDN):

            $1,000,000 to $4,999,999

              Export Sales ($CDN):

            $200,000 to $499,999

              Number of Employees:

            20

				Product / Service / Licensing

                              Product Name:

                            MRF Mapping Tool Kit (MMTK for MicroStation)

                            MRF Mapping Tool Kit (MMTK for MicroStation)– An advanced data

analysis and data cleaning software package that employs multi-

tolerance and multi-level processing.

Program Modules (For MRF Clean):

NOTE : 	MicroStation – MSTN     GeoMedia Pro – GM

AutoCAD – ACAD    Windows – WD

Conflate (MSTN, GM, ACAD)– changes the geometry of one feature

to match that of another, if the two are approximately the same

to begin with.

Dangle Processor (MSTN, GM, ACAD)- either flags dangles (dead

ends) with a letter "D" or deletes them if the delete option is

chosen.

Duplicate Remover (MSTN, GM, ACAD)- is used to remove duplicate

entities.

Extend (MSTN, GM)- MRF Extend is a tolerance-controlled module

that is used to extend certain linear geometry, thereby

correcting for undershoots, while maintaining the linework

direction.

Intersect (MSTN, GM, ACAD)- flags and/or creates true and fuzzy

intersections. It has element intersection, clustering, and

splitting sub-functions.

Join (MSTN, GM, ACAD)- joins singly connected linear geometry

into longer ones.

Stroke (MSTN, ACAD)- will stroke certain non-linear elements

into line strings. The purpose of doing this is to reduce the

complexity of the MRF Clean process.

Simplify (MSTN, GM)-  involves the removal of line string

vertices based on a specified tolerance.

Short Element Processor (MSTN, GM, ACAD)- MRF Short Element

Processor is used to flag or delete elements that have lengths

smaller than specified tolerances.

                              Product Name:

                            MRF GIS Tool Kit (MGTK) for GeoMedia

                            MRF GIS Tool Kit (MGTK) for GeoMedia

MRF GIS Tool Kit (MGTK for GeoMedia) – An advanced data analysis and data cleaning software package that employs multi-tolerance and multi-feature class processing. MGTK integrates tightly with the GeoMedia® Professional environment.

Program Modules (For MRF Clean):

NOTE : 	MicroStation – MSTN     GeoMedia Pro – GM

AutoCAD – ACAD    Windows – WD

Conflate (MSTN, GM, ACAD)– changes the geometry of one feature

to match that of another, if the two are approximately the same

to begin with.

Dangle Processor (MSTN, GM, ACAD)- either flags dangles (dead

ends) with a letter "D" or deletes them if the delete option is

chosen.

Duplicate Remover (MSTN, GM, ACAD)- is used to remove duplicate

entities.

Extend (MSTN, GM)- MRF Extend is a tolerance-controlled module

that is used to extend certain linear geometry, thereby

correcting for undershoots, while maintaining the linework

direction.

Intersect (MSTN, GM, ACAD)- flags and/or creates true and fuzzy

intersections. It has element intersection, clustering, and

splitting sub-functions.

Join (MSTN, GM, ACAD)- joins singly connected linear geometry

into longer ones.

Stroke (MSTN, ACAD)- will stroke certain non-linear elements

into line strings. The purpose of doing this is to reduce the

complexity of the MRF Clean process.

Simplify (MSTN, GM)-  involves the removal of line string

vertices based on a specified tolerance.

Short Element Processor (MSTN, GM, ACAD)- MRF Short Element

Processor is used to flag or delete elements that have lengths

smaller than specified tolerances.

                              Product Name:

                            MRF MapServer

                            MRF MapServer represents the state-of-the-art web-based map

serving technology. It serves vector and raster data on the web.

MRF MapServer provides advanced web-based capabilities such

as map viewing, attribute query and linked document query. It offers more flexibility, better performance and

superior reliability than most Internet map servers on the

marketplace. It is ideal for building web-based GIS applications

in which custom functionality, short response time and system

reliability are critical.

MRF MapServer has been successfully applied in many web-

based applications for the customers. Good performance is the

key feature that impresses people in choosing MRF MapServer. Based on MRF's advanced spatial indexing technology, MRF

MapServer responds to users' requests very quickly. In a

typical Intranet environment, with fairly large datasets

including high resolution aerial photos on the server, its

response time for most GIS operations such as frequently used

Zoom, Pan and Attribute Query functions is within 2 seconds.

GIS capabilities implemented in MRF MapServer include, but

is not limited to the following:

q	Web-based vector map viewing and navigation

q	Georeferenced raster image query and display

q	Dynamic layer display control

q	Flexible feature selection and attribute query

q	Spatial query

q	Linked document retrieval

                              Product Name:

                            MRF GISNet

                            MRF GISNet is a unique webGIS system. It includes MRF MapServer technology and MRFClean technology (of MMTK). It also provides CAD-like editing tools of GIS data on the web.

MRF GISNet transfers the traditional GIS desktop capabilities of editing and geoprocessing to the web. For more information, please refer to the MRF website at  www.mrf.com

                              Product Name:

                            MRFClean for FME

                            MRFClean for FME is very similar to MMTK but works under the Safe Software FME environment. This software is licenced and sold by Safe Software worldwide.

                              Service Name:

                            GIS System Development and Integration

                            MRF's professional services offers GIS services

including system design, implementation and integration, map scanning, geo-referencing, digitizing, map clean-

up, polygon creation, attribute capture, QA/QC, applications

development, and web-based query and viewing systems.

MRF professional services include:

Consulting

·	GIS and AM/FM  implementation strategies

·	GIS user training

Data Conversion

·	Hardcopy to digital

·	Digital conversion (Including but not limited to ESRI GIS family of software, MicroStation, MGE (GeoMedia,  GeoMedia Professional, GeoMedia Web Map, FRAMME), AutoCAD, etc.

·	Document scanning

·	Attribute collection and/or extraction

·	Geo-referencing

·	Map cleaning and editing

·	NAD (North American Datum) conversion

·	Vector/Raster warping

Data integration

·	Data Migration

·	Database design and implementation

·	Database linking

·	Manual editing

·	System integration

Software Application Development

·	Stand-alone, intranet or internet-based GIS and mapping

applications

·	Software Customization

·	Data/information representation (through

internet/Intranet)

·	Customized software for data conversion.

              FSC Code:

              7030-ADP Software

  top of page

					Technology profile

            MRF specializes in mapping, AM/FM, and GIS software development, consulting, and project services.

MRF Mapping/GIS products are used by over 6000 customers in over 40 countries. These software products perform map clean-up, automated polygon creation, buffer generation, spatial overlay analysis, network tracing, and NAD conversion. MRF's industry-leading multi-layer, multi-tolerance fuzzy intersection and clustering technology allow the MRF products to offer CAD-level complexity while delivering very advanced capabilities. The MRF tools offer between 2 to 10 times productivity gains when compared with similar tools from major GIS vendors. Intergraph Corporation has licensed some of MRF's products and technology since 1995. Safe Software has also licenced the MRF Clean technology to be distributed by Safe along with their own products.

MRF has been providing web-based GIS solutions to its customers

for years. MRF developed the state-of-the-art MRF MapServer

that offers more flexibility, better performance and superior

reliability than most Internet map servers on the marketplace.

MRF webGIS technology provides advanced web-based GIS capabilities such as map viewing, attribute query, linked document query, and GIS editing. It is ideal for building web-based GIS applications in which custom functionality, short response time and system reliability are critical.

MRF webGIS technology supports different data servers via its data connectors, such as PostgreSQL Connector for open source

PostgreSQL/PostGIS database, SDE connector for ESRI ArcSDE.

MRF's professional services offers customers GIS services

including map scanning, geo-referencing, digitizing, map clean-

up, polygon creation, attribute capture, QA/QC, applications

development, and web-based query and viewing systems. Compared with other GIS service providers, MRF

					Market profile

                        Alliances:

Sales/Marketing

                          Industry sector market interests:

Environment

Information Technology and Telecommunications

Mining/Petroleum/Gas

Transportation

Defence

              Geographic markets:

                  Export experience:

United States

                  Actively pursuing:

Albania

Algeria

Austria

Bahrain

Belgium

Bulgaria

China

Cyprus

Czech Republic

Denmark

Egypt

Finland

France

Germany

Gibraltar

Greece

Hungary

Iceland

Iran, Islamic Republic of

Iraq

Ireland

Israel

Italy

Japan

Jordan

Kuwait

Lebanon

Luxembourg

Malta

Montenegro

Netherlands

Norway

Oman

Poland

Portugal

Qatar

Romania

Russian Federation

Saudi Arabia

Serbia

Spain

Sweden

Switzerland

Syrian Arab Republic

Turkey

United Arab Emirates

United Kingdom

Yemen

  top of page

					Sector information

                        Classification codes

Dun and Bradstreet Number:

250776812 +

CAGE Code:

L0200

                Key / Major clients:

              Orange County, California, USA

LA County, California, USA

Southern California Gas Company

City of Calgary

City of Edmonton

TELUS Geomatics

City of Winnipeg

City of Toronto

					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

                Gary
                Zhang

                  Title:

                President

                    Area of Responsibility:

                    Domestic Sales & Marketing,

                    Export Sales & Marketing,

                    Government Relations,

                    Management Executive.

                  Telephone:

                (403) 216-5515

                    Email:

                  gzhang@mrf.com

				Description

				Company description

            Country of Ownership:

              Canada

              Year Established:

            1992

            Exporting:

              Yes

                Primary Industry (NAICS):

				541510 - Computer Systems Design and Related Services

            Primary Business Activity:

            Services

              Total Sales ($CDN):

            $1,000,000 to $4,999,999

              Export Sales ($CDN):

            $200,000 to $499,999

              Number of Employees:

            20

				Products, services and licensing

				Product / Service / Licensing

                              Product Name:

                            MRF Mapping Tool Kit (MMTK for MicroStation)

                            MRF Mapping Tool Kit (MMTK for MicroStation)– An advanced data

analysis and data cleaning software package that employs multi-

tolerance and multi-level processing.

Program Modules (For MRF Clean):

NOTE : 	MicroStation – MSTN     GeoMedia Pro – GM

AutoCAD – ACAD    Windows – WD

Conflate (MSTN, GM, ACAD)– changes the geometry of one feature

to match that of another, if the two are approximately the same

to begin with.

Dangle Processor (MSTN, GM, ACAD)- either flags dangles (dead

ends) with a letter "D" or deletes them if the delete option is

chosen.

Duplicate Remover (MSTN, GM, ACAD)- is used to remove duplicate

entities.

Extend (MSTN, GM)- MRF Extend is a tolerance-controlled module

that is used to extend certain linear geometry, thereby

correcting for undershoots, while maintaining the linework

direction.

Intersect (MSTN, GM, ACAD)- flags and/or creates true and fuzzy

intersections. It has element intersection, clustering, and

splitting sub-functions.

Join (MSTN, GM, ACAD)- joins singly connected linear geometry

into longer ones.

Stroke (MSTN, ACAD)- will stroke certain non-linear elements

into line strings. The purpose of doing this is to reduce the

complexity of the MRF Clean process.

Simplify (MSTN, GM)-  involves the removal of line string

vertices based on a specified tolerance.

Short Element Processor (MSTN, GM, ACAD)- MRF Short Element

Processor is used to flag or delete elements that have lengths

smaller than specified tolerances.

                              Product Name:

                            MRF GIS Tool Kit (MGTK) for GeoMedia

                            MRF GIS Tool Kit (MGTK) for GeoMedia

MRF GIS Tool Kit (MGTK for GeoMedia) – An advanced data analysis and data cleaning software package that employs multi-tolerance and multi-feature class processing. MGTK integrates tightly with the GeoMedia® Professional environment.

Program Modules (For MRF Clean):

NOTE : 	MicroStation – MSTN     GeoMedia Pro – GM

AutoCAD – ACAD    Windows – WD

Conflate (MSTN, GM, ACAD)– changes the geometry of one feature

to match that of another, if the two are approximately the same

to begin with.

Dangle Processor (MSTN, GM, ACAD)- either flags dangles (dead

ends) with a letter "D" or deletes them if the delete option is

chosen.

Duplicate Remover (MSTN, GM, ACAD)- is used to remove duplicate

entities.

Extend (MSTN, GM)- MRF Extend is a tolerance-controlled module

that is used to extend certain linear geometry, thereby

correcting for undershoots, while maintaining the linework

direction.

Intersect (MSTN, GM, ACAD)- flags and/or creates true and fuzzy

intersections. It has element intersection, clustering, and

splitting sub-functions.

Join (MSTN, GM, ACAD)- joins singly connected linear geometry

into longer ones.

Stroke (MSTN, ACAD)- will stroke certain non-linear elements

into line strings. The purpose of doing this is to reduce the

complexity of the MRF Clean process.

Simplify (MSTN, GM)-  involves the removal of line string

vertices based on a specified tolerance.

Short Element Processor (MSTN, GM, ACAD)- MRF Short Element

Processor is used to flag or delete elements that have lengths

smaller than specified tolerances.

                              Product Name:

                            MRF MapServer

                            MRF MapServer represents the state-of-the-art web-based map

serving technology. It serves vector and raster data on the web.

MRF MapServer provides advanced web-based capabilities such

as map viewing, attribute query and linked document query. It offers more flexibility, better performance and

superior reliability than most Internet map servers on the

marketplace. It is ideal for building web-based GIS applications

in which custom functionality, short response time and system

reliability are critical.

MRF MapServer has been successfully applied in many web-

based applications for the customers. Good performance is the

key feature that impresses people in choosing MRF MapServer. Based on MRF's advanced spatial indexing technology, MRF

MapServer responds to users' requests very quickly. In a

typical Intranet environment, with fairly large datasets

including high resolution aerial photos on the server, its

response time for most GIS operations such as frequently used

Zoom, Pan and Attribute Query functions is within 2 seconds.

GIS capabilities implemented in MRF MapServer include, but

is not limited to the following:

q	Web-based vector map viewing and navigation

q	Georeferenced raster image query and display

q	Dynamic layer display control

q	Flexible feature selection and attribute query

q	Spatial query

q	Linked document retrieval

                              Product Name:

                            MRF GISNet

                            MRF GISNet is a unique webGIS system. It includes MRF MapServer technology and MRFClean technology (of MMTK). It also provides CAD-like editing tools of GIS data on the web.

MRF GISNet transfers the traditional GIS desktop capabilities of editing and geoprocessing to the web. For more information, please refer to the MRF website at  www.mrf.com

                              Product Name:

                            MRFClean for FME

                            MRFClean for FME is very similar to MMTK but works under the Safe Software FME environment. This software is licenced and sold by Safe Software worldwide.

                              Service Name:

                            GIS System Development and Integration

                            MRF's professional services offers GIS services

including system design, implementation and integration, map scanning, geo-referencing, digitizing, map clean-

up, polygon creation, attribute capture, QA/QC, applications

development, and web-based query and viewing systems.

MRF professional services include:

Consulting

·	GIS and AM/FM  implementation strategies

·	GIS user training

Data Conversion

·	Hardcopy to digital

·	Digital conversion (Including but not limited to ESRI GIS family of software, MicroStation, MGE (GeoMedia,  GeoMedia Professional, GeoMedia Web Map, FRAMME), AutoCAD, etc.

·	Document scanning

·	Attribute collection and/or extraction

·	Geo-referencing

·	Map cleaning and editing

·	NAD (North American Datum) conversion

·	Vector/Raster warping

Data integration

·	Data Migration

·	Database design and implementation

·	Database linking

·	Manual editing

·	System integration

Software Application Development

·	Stand-alone, intranet or internet-based GIS and mapping

applications

·	Software Customization

·	Data/information representation (through

internet/Intranet)

·	Customized software for data conversion.

              FSC Code:

              7030-ADP Software

							Technology

							Technology profile

            MRF specializes in mapping, AM/FM, and GIS software development, consulting, and project services.

MRF Mapping/GIS products are used by over 6000 customers in over 40 countries. These software products perform map clean-up, automated polygon creation, buffer generation, spatial overlay analysis, network tracing, and NAD conversion. MRF's industry-leading multi-layer, multi-tolerance fuzzy intersection and clustering technology allow the MRF products to offer CAD-level complexity while delivering very advanced capabilities. The MRF tools offer between 2 to 10 times productivity gains when compared with similar tools from major GIS vendors. Intergraph Corporation has licensed some of MRF's products and technology since 1995. Safe Software has also licenced the MRF Clean technology to be distributed by Safe along with their own products.

MRF has been providing web-based GIS solutions to its customers

for years. MRF developed the state-of-the-art MRF MapServer

that offers more flexibility, better performance and superior

reliability than most Internet map servers on the marketplace.

MRF webGIS technology provides advanced web-based GIS capabilities such as map viewing, attribute query, linked document query, and GIS editing. It is ideal for building web-based GIS applications in which custom functionality, short response time and system reliability are critical.

MRF webGIS technology supports different data servers via its data connectors, such as PostgreSQL Connector for open source

PostgreSQL/PostGIS database, SDE connector for ESRI ArcSDE.

MRF's professional services offers customers GIS services

including map scanning, geo-referencing, digitizing, map clean-

up, polygon creation, attribute capture, QA/QC, applications

development, and web-based query and viewing systems. Compared with other GIS service providers, MRF

					Market

					Market profile

                        Alliances:

Sales/Marketing

                          Industry sector market interests:

Environment

Information Technology and Telecommunications

Mining/Petroleum/Gas

Transportation

Defence

              Geographic markets:

                  Export experience:

United States

                  Actively pursuing:

Albania

Algeria

Austria

Bahrain

Belgium

Bulgaria

China

Cyprus

Czech Republic

Denmark

Egypt

Finland

France

Germany

Gibraltar

Greece

Hungary

Iceland

Iran, Islamic Republic of

Iraq

Ireland

Israel

Italy

Japan

Jordan

Kuwait

Lebanon

Luxembourg

Malta

Montenegro

Netherlands

Norway

Oman

Poland

Portugal

Qatar

Romania

Russian Federation

Saudi Arabia

Serbia

Spain

Sweden

Switzerland

Syrian Arab Republic

Turkey

United Arab Emirates

United Kingdom

Yemen

					Sector

					Sector information

                        Classification codes

Dun and Bradstreet Number:

250776812 +

CAGE Code:

L0200

                Key / Major clients:

              Orange County, California, USA

LA County, California, USA

Southern California Gas Company

City of Calgary

City of Edmonton

TELUS Geomatics

City of Winnipeg

City of Toronto

    Last Update Date 2017-03-17

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:
require 'simplecov'
SimpleCov.start do
  SimpleCov.minimum_coverage 100
end

require_relative '../lib/journey_walker'
require_relative 'journey_walker/helpers/journey_walker_tests'
require_relative 'journey_walker/helpers/class_builder'

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.include ClassBuilder
end


text:
// flow-typed signature: f2c93e6623b9d49179690c4d96cb0276
// flow-typed version: <<STUB>>/spectron_v^3.4.0/flow_v0.37.1

/**
 * This is an autogenerated libdef stub for:
 *
 *   'spectron'
 *
 * Fill this stub out by replacing all the `any` types.
 *
 * Once filled out, we encourage you to share your work with the
 * community by sending a pull request to:
 * https://github.com/flowtype/flow-typed
 */

declare module 'spectron' {
  declare module.exports: any;
}

/**
 * We include stubs for each file inside this npm package in case you need to
 * require those files directly. Feel free to delete any files that aren't
 * needed.
 */
declare module 'spectron/lib/accessibility' {
  declare module.exports: any;
}

declare module 'spectron/lib/api' {
  declare module.exports: any;
}

declare module 'spectron/lib/application' {
  declare module.exports: any;
}

declare module 'spectron/lib/chrome-driver' {
  declare module.exports: any;
}

declare module 'spectron/lib/launcher' {
  declare module.exports: any;
}

declare module 'spectron/vendor/axs_testing' {
  declare module.exports: any;
}

// Filename aliases
declare module 'spectron/index' {
  declare module.exports: $Exports<'spectron'>;
}
declare module 'spectron/index.js' {
  declare module.exports: $Exports<'spectron'>;
}
declare module 'spectron/lib/accessibility.js' {
  declare module.exports: $Exports<'spectron/lib/accessibility'>;
}
declare module 'spectron/lib/api.js' {
  declare module.exports: $Exports<'spectron/lib/api'>;
}
declare module 'spectron/lib/application.js' {
  declare module.exports: $Exports<'spectron/lib/application'>;
}
declare module 'spectron/lib/chrome-driver.js' {
  declare module.exports: $Exports<'spectron/lib/chrome-driver'>;
}
declare module 'spectron/lib/launcher.js' {
  declare module.exports: $Exports<'spectron/lib/launcher'>;
}
declare module 'spectron/vendor/axs_testing.js' {
  declare module.exports: $Exports<'spectron/vendor/axs_testing'>;
}


text:
set -ex
shopt -s extglob

COMMIT=$(git rev-parse HEAD)

# import generated content from this git reference ..
SOURCE_BRANCH=${1:-$COMMIT}

# into this git branch
GENERATED_BRANCH=${2:-generated}

git clean -f -d

# switch to generated branch for working env; and switch back later
git checkout "$GENERATED_BRANCH"
git submodule update

# Clean everything in generated branch.
rm -rf -- *

srcdir=srcdir

cleanup ()
{
    exit_status=$?
    rm -rf "$srcdir"

    # switch back to initial ranch
    git checkout "$SOURCE_BRANCH"
    git submodule update

    return $exit_status
}
trap cleanup EXIT

(
    # Copy the actual repo into $srcdir, and generate there
    mkdir "$srcdir"
    cd "$srcdir"
    git clone .. .
    git checkout "$SOURCE_BRANCH"
    git submodule update --init
    make generate-all
)

# copy the relevant (generated) content from $srcdir
versions=$(sed -n 's/^VERSIONS[[:space:]]*=//p' "$srcdir"/Makefile)
for i in $versions; do
    cp -r "$srcdir/$i" .
done

# source directory is not needed anymore
rm -rf "$srcdir"

# shellcheck disable=SC2086
git add $versions

# Add deleted files to the index as well
(
    IFS=$'\n'
    for i in $(git ls-files --deleted) ;do
        git add --all "$i"
    done
)

if ! git diff --cached --exit-code --quiet ; then
    git commit -m "auto-sync: master commit $COMMIT"
else
    echo "Nothing changed"
fi


text:
class ThinkingSphinx::RealTime::Transcriber
  def initialize(index)
    @index = index
  end

  def copy(instance)
    return unless copy? instance

    columns, values = ['id'], [index.document_id_for_key(instance.id)]
    (index.fields + index.attributes).each do |property|
      columns << property.name
      values  << property.translate(instance)
    end

    sphinxql = Riddle::Query::Insert.new index.name, columns, values
    ThinkingSphinx::Connection.take do |connection|
      connection.execute sphinxql.replace!.to_sql
    end
  end

  private

  attr_reader :index

  def copy?(instance)
    index.conditions.empty? || index.conditions.all? { |condition|
      case condition
      when Symbol
        instance.send(condition)
      when Proc
        condition.call instance
      else
        "Unexpected condition: #{condition}. Expecting Symbol or Proc."
      end
    }
  end
end


text:
package com.github.scribejava.apis;

import com.github.scribejava.apis.google.GoogleJsonTokenExtractor;
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.extractors.TokenExtractor;
import com.github.scribejava.core.model.OAuth2AccessToken;

public class GoogleApi20 extends DefaultApi20 {

    protected GoogleApi20() {
    }

    private static class InstanceHolder {
        private static final GoogleApi20 INSTANCE = new GoogleApi20();
    }

    public static GoogleApi20 instance() {
        return InstanceHolder.INSTANCE;
    }

    @Override
    public String getAccessTokenEndpoint() {
        return "https://www.googleapis.com/oauth2/v4/token";
    }

    @Override
    protected String getAuthorizationBaseUrl() {
        return "https://accounts.google.com/o/oauth2/auth";
    }

    @Override
    public TokenExtractor<OAuth2AccessToken> getAccessTokenExtractor() {
        return GoogleJsonTokenExtractor.instance();
    }
}


text:
/**
 * HomeController
 *
 * @description :: Server-side logic for managing homes
 * @help        :: See http://links.sailsjs.org/docs/controllers
 */

module.exports = {

    // Index page
    index: function (req, res) {
        sails.log.info("+ HOME.INDEX");

        return res.view();
    }
};


text:
/*
 * =====================================================================================
 *
 *       Filename:  CompositionTest.cpp
 *
 *    Description:  Test file for class Composition.
 *
 *        Version:  1.0
 *        Created:  04/28/2012 12:26:57 AM
 *       Revision:  none
 *       Compiler:  msvc
 *
 *         Author:  Han Hu (HH), hh.earlydays@gmail.com
 *   Organization:  Boston University
 *
 * =====================================================================================
 */

#include <GAGPL/CHEMISTRY/Composition.h>
#include <iostream>

int main ( int argc, char *argv[] )
{
	using namespace gag;
	// The Periodic Table should be loaded at least once;
	PeriodicTable& pt = PeriodicTable::Instance();
	//pt.load();

	/* Set composition. */
	Composition cp("C7H20OHCl3");

	const std::map<std::string, int>& cp_map = cp.get();

	for(std::map<std::string, int>::const_iterator iter = cp_map.begin(); iter != cp_map.end(); iter++)
	{
		std::cout << iter->first << " " << iter->second << std::endl;
	}

	std::cout << "Mass: " << cp.getMass() << std::endl;
	std::cout << "size is: " << cp.getCompositionString().length() << std::endl;

	/* Add composition. */
	cp.add("CCa2");
	std::cout << "String: " << cp.getCompositionString() << std::endl;

	//cp_map = cp.get();
	for(std::map<std::string, int>::const_iterator iter = cp_map.begin(); iter != cp_map.end(); iter++)
	{
		std::cout << iter->first << " " << iter->second << std::endl;
	}

	std::cout << "Mass: " << cp.getMass() << std::endl;
	std::cout << "size is: " << cp.getCompositionString().length() << std::endl;
	/* Substract composition */
	cp.deduct("COH");
	std::cout << "String: " << cp.getCompositionString() << std::endl;

	//cp_map = cp.get();
	for(std::map<std::string, int>::const_iterator iter = cp_map.begin(); iter != cp_map.end(); iter++)
	{
		std::cout << iter->first << " " << iter->second << std::endl;
	}

	std::cout << "Mass: " << cp.getMass() << std::endl;
	std::cout << "size is: " << cp.getCompositionString().length() << std::endl;

	/* Assignment */
	Composition cm = cp;
	std::cout << "CP String: " << cp.getCompositionString() << std::endl;
	const std::map<std::string, int>& cm_map = cm.get();

	for(std::map<std::string, int>::const_iterator iter = cp_map.begin(); iter != cp_map.end(); iter++)
	{
		std::cout << iter->first << " " << iter->second << std::endl;
	}

	std::cout << "CP Mass: " << cp.getMass() << std::endl;
	std::cout << "CP size is: " << cp.getCompositionString().length() << std::endl;

	/* clear */
	cp.clear();
	std::cout << "After clear, size is: " << cp.getCompositionString().length() << std::endl;

	std::cout << "**************************************" << std::endl;
	std::cout << "         Test 2: Comparison            " << std::endl;
	std::cout << "**************************************" << std::endl;

	Composition comp0("C3HO3");
	Composition comp1("H2O");
	std::cout << "Compare" << comp0.getCompositionString() << " and " << comp1.getCompositionString() << std::endl;
	std::cout << "Results: ";
	if(comp1 < comp0)
		std::cout << "smaller" << std::endl;
	else
		std::cout << "larger" << std::endl;

	return EXIT_SUCCESS;
}				/* ----------  end of function main  ---------- */


text:
package hprose.example.tcp;

import hprose.server.HproseTcpServer;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.Set;

public class Server {
    public static Message<Set<User>> getMessage() {
        Message<Set<User>> message = new Message();
        Set<User> set = new HashSet();
        User user1 = new User();
        user1.name = "Tom";
        user1.age = 18;
        set.add(user1);
        User user2 = new User();
        user2.name = "Jerry";
        user2.age = 15;
        set.add(user2);
        message.setId(1);
        message.setData(set);
        return message;
    }
    public static void main(String[] args) throws URISyntaxException, IOException {
        HproseTcpServer server = new HproseTcpServer("tcp://0.0.0.0:8081");
        server.add("getMessage", Server.class);
        server.start();
        System.out.println("START");
        System.in.read();
        server.stop();
        System.out.println("STOP");
    }
}


text:
function a()
<caret>end


text:
https://www.w3.org/TR/css-syntax-3/

CSS Syntax Module Level 3

W3C Candidate Recommendation, 20 February 2014


text:
namespace bluez {

// BluetoothAdvertisementMonitorManagerClient is used to communicate with the
// advertisement monitor manager object of the Bluetooth daemon.
class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisementMonitorManagerClient
    : public BluezDBusClient {
 public:
  // Structure of properties associated with the advertisement monitor manager.
  struct Properties : public dbus::PropertySet {
    Properties(dbus::ObjectProxy* object_proxy,
               const std::string& interface_name,
               const PropertyChangedCallback& callback);
    ~Properties() override;

    // This lists the supported types of advertisement monitors. [read-only]
    dbus::Property<std::vector<std::string>> supported_monitor_types;

    // This lists the features of advertisement monitoring supported by the
    // Bluetooth stack. [read-only]
    dbus::Property<std::vector<std::string>> supported_features;
  };

  // Interface for observing changes in advertisement monitor client properties.
  class Observer : public base::CheckedObserver {
   public:
    ~Observer() override;

    // Called when the advertisement monitoring supported features change.
    virtual void SupportedAdvertisementMonitorFeaturesChanged() = 0;
  };

  ~BluetoothAdvertisementMonitorManagerClient() override;

  using ErrorCallback = base::OnceCallback<void(std::string error_name,
                                                std::string error_message)>;

  virtual void AddObserver(Observer* observer) = 0;
  virtual void RemoveObserver(Observer* observer) = 0;

  // Registers an advertisement monitor manager at the D-bus object path
  // |application| with the remote BlueZ advertisement monitor manager. After
  // successful registration applications can register advertisement monitors
  // under the root |application|.
  virtual void RegisterMonitor(const dbus::ObjectPath& application,
                               const dbus::ObjectPath& adapter,
                               base::OnceClosure callback,
                               ErrorCallback error_callback) = 0;

  // Unregisters the advertisement monitor manager with the D-Bus object path
  // |application| from the remote advertisement monitor manager.
  virtual void UnregisterMonitor(const dbus::ObjectPath& application,
                                 const dbus::ObjectPath& adapter,
                                 base::OnceClosure callback,
                                 ErrorCallback error_callback) = 0;

  // Obtain the properties for the advertisement monitor manager associated with
  // object path |object_path|. Values should be copied if needed.
  virtual Properties* GetProperties(const dbus::ObjectPath& object_path) = 0;

  // Creates the instance.
  static std::unique_ptr<BluetoothAdvertisementMonitorManagerClient> Create();

 protected:
  BluetoothAdvertisementMonitorManagerClient();
};

}  // namespace bluez

#endif  // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADVERTISEMENT_MONITOR_MANAGER_CLIENT_H_


text:
package org.cthul.parser.annotation.scan;

import java.lang.annotation.*;

/**
 * When the {@link AnnotationScanner} finds an annotation whose type
 * is annotated with {@code ProcessedBy}, the specified
 * {@link AnnotationProcessor reader} is invoked.
 */
@Documented
@Target(ElementType.ANNOTATION_TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface ProcessedBy {

    Class<? extends AnnotationProcessor> value();

}


text: ./fly -t myconcourse set-pipeline -p hello-world -c pipelines/hello-world.yaml


text:
/**
 * @file hello_example.h
 * Example app for Linux
 *
 * @author Mark Charlebois <charlebm@gmail.com>
 */
#pragma once

#include <px4_platform_common/app.h>

class HelloExample
{
public:
	HelloExample() {}

	~HelloExample() {}

	int main();

	static px4::AppState appState; /* track requests to terminate app */
};


text:
package de.xneo.hetznerstatusfilter;

import org.w3c.dom.Document;
import org.xml.sax.SAXException;

import java.io.IOException;

public interface FeedSource {
    Document getFeed(Language language) throws IOException, SAXException;
}


text:
package eagle.jfaster.org.server;

import eagle.jfaster.org.EmbedZookeeperServer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.CountDownLatch;

import static eagle.jfaster.org.server.Server.EMBED_ZOOKEEPER_PORT;

/**
 * Created by fangyanpeng1 on 2017/8/9.
 */
public class ServerAnnotation {
    public static void main(String[] args) throws InterruptedException {
        //启动Curator框架提供的内置zookeeper 仅供测试使用,生产环境请使用真实zookeeper地址
        EmbedZookeeperServer.start(EMBED_ZOOKEEPER_PORT);
        ClassPathXmlApplicationContext appCtx = new ClassPathXmlApplicationContext("server_annotation.xml");
        appCtx.start();
        CountDownLatch latch = new CountDownLatch(1);
        latch.await();
    }
}


text:
package com.signalcollect.interfaces

import com.signalcollect.Vertex
import com.signalcollect.GraphEditor
import com.signalcollect.Edge

trait ExistingVertexHandler[Id, Signal] {

  /**
   *  Sets the function that can intervene when a vertex with the same ID is added
   *  repeatedly. The new vertex will be thrown out for sure, but some of its
   *  information might be added to the existing vertex.
   *
   *  @note By default the addition of a vertex is ignored if an existing vertex has the same ID.
   */
  def mergeVertices(existing: Vertex[Id, _, Id, Signal], failedVertexAddition: Vertex[Id, _, Id, Signal], ge: GraphEditor[Id, Signal])

}

trait UndeliverableSignalHandler[@specialized(Int, Long) Id, Signal] {

  /**
   *  Sets the function that handles signals that could not be delivered to a vertex.
   *
   *  @note By default an exception is thrown when a signal is not deliverable. The handler function
   *  		receives the signal and an instance of GraphEditor as parameters in order to take some
   *  		action that handles this case.
   */
  def vertexForSignalNotFound(signal: Signal, inexistentTargetId: Id, senderId: Option[Id], graphEditor: GraphEditor[Id, Signal])

}

trait EdgeAddedToNonExistentVertexHandler[@specialized(Int, Long) Id, Signal] {

  /**
   *  Sets the handler that gets triggered, when the vertex to which an edge should be added does not exist.
   *  Optionally returns the vertex that should be created and to whioch the edge can then be added.
   *
   *  @note By default an exception is thrown when an edge cannot be added. The handler function
   *  		receives the edge, the id of the vertex that does not exist and an instance of GraphEditor as parameters in order to
   *    		potentially create a vertex to which the edge should be added.
   */
  def handleImpossibleEdgeAddition(edge: Edge[Id], vertexId: Id): Option[Vertex[Id, _, Id, Signal]]

}


text:
sap.ui.define([
	"sap/ui/integration/designtime/baseEditor/validator/IsValidBinding",
	"sap/base/util/restricted/_isNil"
], function (
	IsValidBinding,
	_isNil
) {
	"use strict";

	/**
	 * Validates if the provided value is a boolean or binding string.
	 *
	 * @namespace sap.ui.integration.designtime.baseEditor.validator.IsBoolean
	 * @author SAP SE
	 * @version ${version}
	 *
	 * @static
	 * @since 1.81
	 * @public
	 * @experimental 1.81
	 */
	return {
		async: false,
		errorMessage: "BASE_EDITOR.VALIDATOR.NOT_A_BOOLEAN",
		/**
		 * Validator function
		 *
		 * @param {boolean|string} vValue - Value to validate
		 * @returns {boolean} Validation result
		 *
		 * @public
		 * @function
		 * @name sap.ui.integration.designtime.baseEditor.validator.IsBoolean.validate
		 */
		validate: function (vValue) {
			return _isNil(vValue)
				|| typeof vValue === "boolean"
				|| IsValidBinding.validate(vValue, { allowPlainStrings: false });
		}
	};
});


text:
import {isArray} from 'lodash';
import {oneFlight, patterns, tap} from '@ciscospark/common';
import {SparkPlugin} from '@ciscospark/spark-core';
import UserUUIDBatcher from './user-uuid-batcher';
import UserUUIDStore from './user-uuid-store';

const User = SparkPlugin.extend({
  namespace: `User`,

  children: {
    batcher: UserUUIDBatcher
  },

  session: {
    store: {
      default() {
        return new UserUUIDStore();
      },
      type: `any`
    }
  },

  /**
   * Converts a user-identifying object to a uuid, perhaps by doing a network
   * lookup
   * @param {string|Object} user
   * @param {Object} options
   * @param {boolean} options.create if true, ensures the return UUID refers to
   * an existing user (rather than creating one deterministically based on email
   * address), even if that user must be created
   * @returns {Promise<string>}
   */
  asUUID(user, options) {
    if (!user) {
      return Promise.reject(new Error(`\`user\` is required`));
    }

    if (isArray(user)) {
      return Promise.all(user.map((u) => this.asUUID(u, options)));
    }

    const id = this._extractUUID(user);
    if (!(options && options.force) && patterns.uuid.test(id)) {
      return Promise.resolve(id);
    }

    const email = this._extractEmailAddress(user);

    if (!patterns.email.test(email)) {
      return Promise.reject(new Error(`Provided user object does not appear to identify a user`));
    }

    return this.getUUID(email, options);
  },

  /**
   * Requests a uuid from the api
   * @param {string} email
   * @param {Object} options
   * @param {boolean} options.create
   * @returns {Promise<string>}
   */
  fetchUUID(email, options) {
    return this.batcher.request({
      email,
      create: options && options.create
    })
      .then((user) => this.recordUUID(Object.assign({emailAddress: email}, user))
        .then(() => user.id));
  },

  /**
   * Fetches details about the current user
   * @returns {Promise<Object>}
   */
  get() {
    return this.request({
      service: `conversation`,
      resource: `users`
    })
      .then((res) => res.body)
      .then(tap((user) => this.recordUUID(user)));
  },

  /**
   * Converts an email address to a uuid, perhaps by doing a network lookup
   * @param {string} email
   * @param {Object} options
   * @param {boolean} options.create
   * @returns {Promise<string>}
   */
  @oneFlight((email, options) => email + String(options.create))
  getUUID(email, options) {
    return this.store.getByEmail(email)
      .then((user) => {
        if (options && options.create && !user.userExists) {
          return Promise.reject(new Error(`User for specified email cannot be confirmed to exist`));
        }

        if (!user.id) {
          return Promise.reject(new Error(`No id recorded for specified user`));
        }

        return user.id;
      })
      .catch(() => this.fetchUUID(email, options));
  },

  /**
   * Caches the uuid for the specified email address
   * @param {Object} user
   * @param {string} user.id
   * @param {string} user.emailAddress
   * @returns {Promise}
   */
  recordUUID(user) {
    if (!user) {
      return Promise.reject(new Error(`\`user\` is required`));
    }

    if (!user.id) {
      return Promise.reject(new Error(`\`user.id\` is required`));
    }

    if (!patterns.uuid.test(user.id)) {
      return Promise.reject(new Error(`\`user.id\` must be a uuid`));
    }

    if (!user.emailAddress) {
      return Promise.reject(new Error(`\`user.emailAddress\` is required`));
    }

    if (!patterns.email.test(user.emailAddress)) {
      return Promise.reject(new Error(`\`user.emailAddress\` must be an email address`));
    }

    return this.store.add(user);
  },

  /**
   * Updates the current user's display name
   * @param {Object} options
   * @param {string} options.displayName
   * @returns {Promise<Object>}
   */
  update(options) {
    if (!options.displayName) {
      return Promise.reject(new Error(`\`options.displayName\` is required`));
    }

    return this.request({
      method: `PATCH`,
      service: `conversation`,
      resource: `users/user`,
      body: options
    })
      .then((res) => res.body);
  },

  /**
   * Extracts a user object for a user specified by userId(UUID) and organization specified by orgId(UUID)
   * @param {Object} options
   * @param {string} options.userId
   * @param {string} options.orgId
   * @private
   * @returns {Promise<Object>}
   */
  getUserForOrg(options) {
    // var scimServiceUrl = this.spark.config.device.preDiscoveryServices.scim;
    if (!options.userId || !options.orgId) {
      return Promise.reject(`Both userId and orgId must be passed in.`);
    }
    return this.request({
      method: `GET`,
      service: `scim`,
      resource: `${options.orgId}/v1/Users/${options.userId}`
    })
     .then((res) => res.body)
     .catch((reason) => {
       this.logger.error(`plugin-user : Error occurred in retrieving user`, reason);
       return Promise.reject(reason);
     });
  },

  /**
   * Extracts the uuid from a user identifying object
   * @param {string|Object} user
   * @private
   * @returns {string}
   */
  _extractUUID: function _extractUUID(user) {
    return user.entryUUID || user.id || user;
  },

  /**
   * Extracts the email address from a user identifying object
   * @param {string|Object} user
   * @private
   * @returns {string}
   */
  _extractEmailAddress: function _extractEmailAddress(user) {
    return user.email || user.emailAddress || user.entryEmail || user;
  }
});

export default User;


text:
#ifndef TRACE_H_
#define TRACE_H_

#include <stdarg.h>

extern void fatal(const char *, ...);
extern void error(const char *, ...);
extern void warn(const char *, ...);

#endif /* !TRACE_H_ */