text:
<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <template id="website_planner">
        <t t-call="web_planner.pages">
            <t t-call="web_planner.page">
                <t t-set="page_title">Welcome</t>
                <t t-set="hide_mark_as_done" t-value="True"/>

Congratulations on taking the leap and deciding to build your own website!

                        Whether you're a beginner or a pro, we have everything you need to plan, create,
                    publish and grow your site, blog or online store.

                    This Planner will help you to think about your website and provide tips and ideas to inspire you. There are examples and explanations to guide you through the process of creating a top-notch, high quality site that meets all your needs.

                        The whole process may take a few hours, some discussions with your colleagues and
                    several cups of coffee to go through. But don't worry, you can return to this tool at any time.

We wish you a fun time!

                        <address>
                            For the Odoo Team,

                            Fabien Pinckaers, Founder
                        </address>

            </t>

            <t t-call="web_planner.category">
                <t t-set="menu_categorytitle">Plan</t>
                <t t-set="menu_categoryclasses" t-value="'fa-bullseye'"/>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Your Objectives</t>

                        Being clear on why you're creating your site and your goals is an essential first step to ensure your content and structure meet business objectives.

Your website objectives by priority:

Examples

 Attract new leads

 Sell more online

 Build awareness and credibility

 Create a community

 Promote your catalog of services

 Be mobile

#1<textarea id="input_element_website_1" value="" line="1" type="text"/>

#2<textarea id="input_element_website_2" value="" line="1" type="text"/>

#3<textarea id="input_element_website_3" value="" line="1" type="text"/>

Visitors might not be interested in your products or services when they come to your site. They could want to learn something, improve their life, grow their business, find out more about you, etc. What great content can you offer your visitors? Why should they stay on your website?

What may interest your visitors?

Examples

 Check your references before deciding to work with you

 See and buy your products

 Get an understanding of your methodology

 Download the technical documentation of a product

 Share experience on similar projects

#1<textarea id="input_element_website_5" value="" line="1" type="text"/>

#2<textarea id="input_element_website_6" value="" line="1" type="text"/>

#3<textarea id="input_element_website_7" value="" line="1" type="text"/>

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Find Inspiration</t>

                        It's often much easier not to start with a blank page. Take a look at your competitors
                        and similar companies around the world. They probably have the same objectives and
                        visitors that you do. How did they transform that into a website?

                        Try to find 3 websites that have remarkable characteristics:

Find 3 websites that you like and write down what you like about them.

                                #1

                                    <input id="input_element_stage_0" type="text" value="http://www.odoo.com/"/>

                                    <textarea id="input_element_stage_7" type="text" placeholder="ex: interesting contents, texts and articles"/>

                                #2

                                    <input id="input_element_stage_1" type="text"/>

                                    <textarea id="input_element_stage_8" type="text"/>

                                #3

                                    <input id="input_element_stage_2" type="text"/>

                                    <textarea id="input_element_stage_9" type="text"/>

                            After working on this step, you may want to go back and refine your objectives or modify your visitors interests. Those 3 first steps are essentially linked, and the more time your spend on polishing them, the better your website will be!

                </t>
            </t>
            <t t-call="web_planner.category">
                <t t-set="menu_categorytitle" name="design_placeholder">Design</t>
                <t t-set="menu_categoryclasses" t-value="'fa-image'"/>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Theme Selection</t>

The theme you choose sets the tone for the overall look and feel of your site design.

                                     1. Choose your theme

Your theme selection will define:

The building blocks

The colors palettes

The pre-loaded images

It's difficult to change your theme after creating your website, so take the time to look at all the themes, and be sure that you're happy with your choice!

                                    View our themes selection

                                     2. Customize its appearance

                                        Use the Customize menu to change the look of your theme:

Background image

Special effects and animations

Colors palette

Fonts

You can also use the integrated HTML Editor(from the Customize menu) to modify the code directly.

                                    Contact us for a custom-made theme:

We can create a customized theme for you with your company colors, logo and images from your library.

                                    Contact us now:

                                     Website Live Chat on

                                     Email Our Website Expert

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Install Apps</t>

                        Before starting to work on your website, make sure you have all the right applications installed.
                        It will be much easier for you to organize and create your content if you have all the options activated from the start.

                        Activate now the optional modules you'll need:

e-Commerce

Boost your online sales with sleek product pages.

                                     Install now

Community builder

Build and engage with communities with forums, Q&A, mailing lists.

                                 Install now

Blogs

Attract more leads with a winning content marketing strategy.

                                     Install now

Contact form

Integrate a contact form that automatically creates leads.

                                     Install now

Jobs

Organize your job board and promote your job announces easily.

                                     Install now

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Your Homepage</t>

                        Your homepage is the most important page of your website. This is where visitors get their first impressions of you. An excellent homepage will encourage them to stay on your site, guide them towards your content, reinforce your company's branding and more.

                        Here are some pointers to help you get started.

Example of Good Homepage

Find a catchy headline

                                Make sure anyone who visits your site understands what it's about without having to do a lot of reading.

                                To do that, the visible section of your homepage (above the fold) needs to be simple and straightforward. For example, use pictures of your work, screenshots of your app, a short and catchy hook.

The Banner or Big Picture building blocks are good choices for that.

Encourage to action

                                Add  one, and only one, call-to-action on your homepage. Your homepage is
                                the page that gets the most visitors.

                                It's good practice to try to engage with your visitors on the homepage:
                                Contact Us, Subscribe to Get More Information, Check the Catalog, etc.

                                    Use the Newsletter subscription (from mass mailing application) or the Big button building block for that.

Add features and content

                                You can put more content in the intermediate section of your homepage (one
                                or two scrolls down from the visible section), but try to keep your
                                paragraphs easy to read and avoid 'walls of text'.

                                    For example, use photos to help break up large areas of text by altering
                                    Text-Image and Image-Text blocks. Or if you prefer to use icons, use the Features or Feature Grid blocks.

Display social proof

                                Below your main banner or call-to-action, it's a good practice to put
                                social proofs about your products or services; customer quotes, videos,
                                photos of your products in actions, twitter quotes, etc.

                                    You have a lot of choices for that: the References, Quotes Slider, Twitter Scroller,...

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Your Main Menu</t>

                        Creating your main menu is an important and difficult stage in building your website.

                        It needs to be organized, so that your visitors can see all the main content you offer at a glance.

                        It needs to be clear, so that when they click on an item, they get the content they expected.

                        In fact, you need to build your navigation menu for your visitors and not for your own purposes or objectives.

                            The best and simplest way to start is to create a few pages and link them directly from the main menu.
                            Just try not to go over 6 items, otherwise your main menu will be difficult to use.

                            As you add more pages to your website, you main menu will begin to feel overcrowded.
                            You can regroup similar pages into a sub-menu, so they will appear under a unique drop-down menu.

                            Finally don't try to make all your content accessible from the main menu or the footer.
                            Indeed, a page can also be accessible through a direct link or button, from any other page of your website.

Example of Good Menu

With that in mind, try to define the structure of your main menu:

1. Your main menu items and 2. Your secondary menu items (optional):

                                #1

                                    <input id="input_element_menu_0" type="text" placeholder="ex: About us"/>

                                    <textarea id="input_element_stage_7" type="text" placeholder="ex: Blog, Success stories, References, Events, Jobs"/>

                                #2

                                    <input id="input_element_menu_1" type="text"/>

                                    <textarea id="input_element__menu_4" type="text"/>

                                #3

                                    <input id="input_element_menu_2" type="text"/>

                                    <textarea id="input_element_menu_5" type="text"/>

                                #4

                                    <input id="input_element_menu_3" type="text"/>

                                    <textarea id="input_element_menu_6" type="text"/>

                                #5

                                    <input id="input_element_menu_7" type="text"/>

                                    <textarea id="input_element_menu_8" type="text"/>

                                #6

                                    <input id="input_element_menu_9" type="text"/>

                                    <textarea id="input_element_menu_10" type="text"/>

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Your Footer</t>

                        A footer, as its name implies, is located at the very bottom of your website.
                        Because of that, your visitors won't see it immediately so it's very useful for linking
                        pages you don't want in your main menu e.g. social media, terms and conditions, privacy
                        terms, etc.

                            If you have a lot of pages in your website, you can create a small top-menu to focus
                            on the main six pages and make all secondary pages accessible from a footer. You can
                            have a look at the Odoo.com website, it's a great example of this type of structure.

Example of Good Footer

Now try to write down you footer structure:

3. Your footer titles and 4. Your footer links:

#1

                                <input id="input_element_footer_0" type="text" placeholder="ex: About us"/>

                                <textarea id="input_element_footer_7" type="text" placeholder="ex: Contact us, Our Customers, Privacy Policy, Events, Bolg, Jobs"/>

                                #2

                                    <input id="input_element_footer_1" type="text"/>

                                    <textarea id="input_element_footer_8" type="text"/>

                                #3

                                    <input id="input_element_footer_3" type="text"/>

                                    <textarea id="input_element_footer_9" type="text"/>

                                #4

                                    <input id="input_element_footer_4" type="text"/>

                                    <textarea id="input_element_footer_10" type="text"/>

                                #5

                                    <input id="input_element_footer_5" type="text"/>

                                    <textarea id="input_element_footer_11" type="text"/>

                                #6

                                    <input id="input_element_footer_6" type="text"/>

                                    <textarea id="input_element_footer_12" type="text"/>

                </t>
            </t>
            <t t-call="web_planner.category">
                <t t-set="menu_categorytitle">Launch</t>
                <t t-set="menu_categoryclasses" t-value="'fa-rocket'"/>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Your Domain Name</t>

                        You can set Odoo on a custom domain name (e.g. yourcompany.com) for both the website
                        and your emails. Because your website address is as important to your branding as the
                        name of your business or organization, you'll want to put some thought into changing it
                        for a proper domain, or change it to one you already own.

                                How to get a custom domain name ?

Find a good domain name (see tips on the right)

Check its availability or see who currently owns it

Contact a Domain Manager in your country to buy it

                                Tips for a good domain:

Simple and obvious

Easy to remember and spell

The shorter the better

Avoid special characters

Aim for a .com and/or your country extension

                        You have your domain name ?

Then simply Contact us and we'll configure your website and/or email for you.

Please note that you'll need an Odoo Standard or Business subscriptions for that

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Ready For Launch!</t>

                        Launching your website is an important step.

                        Here is a checklist of actions to help you launch a new website efficiently:

Initial Teaser

                                Before launching to the masses, it's good practice to tease around 100 of
                                your contacts. Start with your friends, colleagues and family. Whether or
                                not they're interested in your area of business, they will be ready to help
                                you with feedback if you engage in a personal discussion with them.

                                    Explain to them why you launched your new website and ask them for their
                                    views on it. Avoid using a mass survey, it's a lot more efficient to have
                                    personal discussions with everyone. If you efficiently engage them in the
                                    reviewing process, they will even help you promote your website when it's
                                    ready for the big launch.

                                    To get an external assessment of your website, you can also submit it to
                                    peek.usertesting.com for a free evaluation of the usability of your homepage.

The big launch

Send an email to all your contacts

Announce it on social media (and update your profiles): Twitter,Facebook, LinkedIn, Youtube, etc.

 Update your internal documents: footer of sales order, contracts,invoices, business cards, etc.

Be announced on the Odoo Twitter account

                                We like to hear from people using Odoo to build their website. Tweet us
                                @odoo a reference to your new website. We will retweet it (we have 30,000 followers) and feature it in our different communications.

                </t>
            </t>

            <t t-call="web_planner.category">
                <t t-set="menu_categorytitle">Grow</t>
                <t t-set="menu_categoryclasses" t-value="'fa-bar-chart'"/>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Promote</t>

Once you've launched your website, it's time to grow your traffic.

                        You can do this by optimizing your referencing by search engines like Google: it's
                        called SEO. This  is the process of increasing the visibility of a website or a web
                        page in a search engine's natural and unpaid ("organic") search results. In general,
                        the earlier (or higher ranked on the search results page), and more frequently a site
                        appears in the search results list, the more visitors it will receive from the search
                        engine.

                        You can also place online advertisements on web pages that show results from search
                        engine queries: this is called SEA.

Optimize your content

                                Writing content that includes frequently searched-for keywords and phrases
                                tends to increase  traffic to your website.

                                    With Odoo, you can automatically check which keywords are ranked best for a
                                    specific query, then add them in the content of your page.

                                    To do that, simply use the Promote menu on each page of your website.

Add relevant keywords

                                Adding relevant keywords to a web page's meta data, including the title tag
                                and meta description, will tend to improve the relevancy of a site's search
                                listings, also increasing your traffic.

                                    For example, you'll want your company name, your country/city and a few
                                    words describing your business in your homepage title so that potential
                                    customers near your location will find your website easily.
                                    WIth Odoo, this can be done easily by using the Promote menu.

Reference your images...

                                If you are an artist or a photographer, you can potentially bring in a lot
                                of  visitors by referencing your images so they are displayed in image
                                search engines, like Google Images. To do that, simply add an 'Alt text'
                                containing descriptions and keywords for relevant pictures.

... and your location too!

                                Millions of people use Google Maps everyday. Whether you are a restaurant
                                or a huge business, you have no excuse not to register your location in
                                Google Business.

Start a blog

                                Google loves websites which are updated often or ones where new content is
                                added regularly. This is why starting a blog is an excellent way of
                                improving your search ranking. If you have the time and dedication to write
                                good articles, check out our blog application to get started.

Be linked by trusted websites

                                The more sites that link to your own site, the more Google trusts your site
                                to be worthwhile:

Configure all your social media (Twitter, Facebook, LinkedIn) so that the address of your website appears on them.

Alternatively, you can write a good article about your business and publish it on an article database websites (ex: squidoo.com) or send it to a press website and your local newspapers.

Also, don't hesitate to post on other people blogs, forums, websites, but don't go overboard and post everywhere without considering whether it's a good place for you to be.

Use Google Webmaster

                                This tool will help you understand your search traffic and learn how users
                                are finding your site and make optimizations to help Google better
                                understand and represent your site.
                                http://www.google.com/webmasters/tools/

Advertise to get the first visitors

                                If you have a small budget to allocate to advertising (around $100), you
                                should start a Google Adwords campaign.

                                    Start by looking how often people search phrases related to your business,
                                    how competitive the keywords are in AdWords, and how much it'll cost to
                                    advertise on each keyword. All of this information will  help you determine
                                    which keywords you want to use in your first campaign. Use Google Adword to do that (make sure the Advanced Options are set to your country and
                                    language).

                                    There are three questions you should ask before deciding whether or not to advertise on a particular keyword:

 Is the keyword searched for in Google? If there is no search volume,
                                    then that tells you no one is typing that phrase into Google. There is no
                                    point in advertising on keywords no one is searching for.

Is the person searching with this keyword likely to buy my product or
                                    service? Or is the person more likely to be just carrying out research
                                    with no intention of making a purchase? In other words, what is the
                                    intent of the keyword? When starting out, you'll want to advertise on
                                    what we call "buying intent" keywords - that is, ones where the person
                                    is clearly looking to buy.

Can I afford to advertise on the keyword?

                                    If you answer yes to these 3 questions, then go ahead and position your website on these keywords.

                            You can retrieve a 75$ coupon code to start your campaign here: http://www.google.com/ads/adwords-coupon.html

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">A/B Testing</t>

                        A/B testing is the process of testing two versions of a page to see which one performs
                        better in reaching your business objectives. For example, imagine you have an existing
                        page (A) where you ask your customers to subscribe to your mailing list.
                        You create a variation (B) of this page with a slightly different subscription message.
                        Then your randomly display this page to half the visitors of your website, and after a
                        while, you analyze the subscription statistics and see that page B performs 10% better
                        than page A. Of course, you now decide to make B your new current page!

                    <t t-if="not is_module_installed('website_version')">Note: To use those features, you need to install the Website Versioning.</t>

Here is a basic guide for your first A/B testing:

1. Define what to test

                                Your choice of what to test will obviously depend on your goals, but should
                                always be linked to one of your business objectives (don't spend energy
                                improving something that brings you no ROI). Then, find the best page to
                                test and the variation you think will bring the best results.Here are a
                                few examples of good testing variables:

The call to action's (i.e. the button's) wording, size, color and placement,

Headline or product description,

Form's length and types of fields,

Product pricing and promotional offers,

Images on landing and product pages,

Amount of text on the page (short vs. long).

2. Create the page variation

                                Once you're clear on the measurable objective, the page and the variable
                                you want to test, duplicate the page in Odoo using the 'Versions'
                                menu and apply the modification you decided.

3. Configure a Google Analytics account

                                This is necessary in order to record the statistics of your test.

Before starting, create a Google Analytics account if you don't have one yet.

Then, go to Google's developer console and connect with the Google account you created

Create a new project (this may take some time)

In the left-side menu of the project, go to APIs and auth > APIs and activate Analytics API by clicking on the Off button.

Still in the left-side menu, go to APIs and auth > Credentials and click on 'Create New Client ID'

In the pop-up window, simply enter your domain name in the first textbox (the second will complete automatically)

Then, copy the Client ID and Client Secret codes and paste them in Odoo's Google Analytics settings

4. Create your campaign in Google Analytics

                                Simply follow the wizard by creating a new experiment in the Behavior >
                                Experiments menu of Google Analytics.
                                To learn more, take a look at their online help.

  Good practices

  Bad practices

                                Know how long to run a test before giving up.

                                Giving up too early can cost you because you may have gotten meaningful
                                results had you waited a little longer. Giving up too late isn't good either,
                                because poorly performing variations could cost you conversions and sales.
                                Don't test versions at different time periods.
If you
                                test one version one week and the second the next, your results won't be
                                accurate, or worse, wrong!

                                Do many A/B tests.

                                Chances are, your first A/B test will turn out a lemon. But don't despair. An A/B test can have only three outcomes: no result, a negative result or a
                                positive result. The key to optimizing conversion rates is to do a ton of A/B
                                tests, so that all positive results add up to a huge boost to your sales and
                                achieved goals.
                                Don't conclude too early.

                                Wait for your test results to be significant. Take a look at the statistical
                                confidence in Google Analytics, it should be at least 95%.

                                Don't surprise regular visitors.

                                If you are testing a core part of your website, include only new visitors in
                                the test. You want to avoid shocking regular visitors, especially because the
                                variations may not ultimately be implemented.

                        Try to limit yourself to 1 testing variable, otherwise you won't be able to clearly interpret the results of your modifications.

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title" name="translate_placeholder">Translate</t>

                        Translating your website into other languages is the best way to broaden its audience.
                        In Odoo, you can either manually translate your pages as they are displayed, use an
                        automatic machine translation service for free or pay professional translators to do
                        it for you.

 1. Add your desired languages

                                Use the link in the footer of your website (when logged in) to add
                                languages from the available list. Also, you can change the
                                default language in Settings > Website

 2. Setup Gengo

Install the Gengo module in Odoo

Configure your Gengo API key in your Company details form

                    3. Select a translation method

                                        Machine translation
Free, but quality may vary

Use a free, automatic machine translation (quality will vary depending on languages)

                                        Human translation
Pay for professionnal quality

Real professional translators will translate all your contents

The cost is from $0.05 to $0.15 per word, depending on the translator's level of expertise

Translated versions are updated automatically after 32 hours on average.

More info on pricing: http://gengo.com/pricing-languages/

A good way to start is to use machine translation then apply corrections yourself.

Go to the page you want to translate

Select the untranslated language

Click on 'Translate' on the menu bar

                </t>
                <t t-call="web_planner.page">
                    <t t-set="page_title">Communicate</t>

                        Your website is an important part of your online business strategy, but it shouldn't be
                        the only one. There are so many ways to communicate with your customers, visitors and
                        prospects that it's sometimes difficult to know what to put your energy into. Here is
                        some advice on what to focus on next.

Use contact forms:

They allow a detailed qualification of the visitor, which is perfect to link them later to marketing campaigns.

You will get your leads filled up automatically in our integrated CRM application.

                                 Install now

Organize physical events

Meet your existing customers and encourage them to 'repeat buy'.

Discuss with propects for a face-to-face sales pitch.

                                 Install now

Create an online Q&A

Allows your customers and the whole community to ask and answer questions about their interests.

Provide fast, professional and accurate information to your visitors and customers.

Reduce the time and resources spent on support.

                                 Install now

Discuss live

Improve your conversion from visitor to customer.

Learn what your visitors are thinking, what question they have, what problems they encounter.

                                 Install now

                </t>
            </t>

            <t t-call="web_planner.page">
                <t t-set="page_title">End</t>
                <t t-set="hide_title" t-value="True"/>
                <t t-set="hide_from_menu" t-value="True"/>
                <t t-set="hide_mark_as_done" t-value="True"/>

Congratulations, you're done !

We hope this planner helped you to create your website.

Don't hesitate to
                    send us an email to describe

 your experience or to suggest improvements !

- The Odoo Team

            </t>
        </t>
    </template>

    <record id="planner_website" model="web.planner">
        <field name="name">Website Planner</field>
        <field name="view_id" ref="website_planner"/>
        <field name="menu_id" ref="website.menu_website"/>
        <field name="progress">6</field>
        <field name="planner_application">planner_website</field>
        <field name="tooltip_planner"><![CDATA[
        Plan your website strategy, design your pages, sell your products and grow your online business!
        ]]>
        </field>
    </record>

</odoo>


text:
module Livefyre
  # Public: Primary interface to the Livefyre API
  class Client
    extend Forwardable
    # Public: Valid roles for #set_user_role
    ROLES = %w(admin member none outcast owner)

    # Public: Valid scopes for #set_user_role
    SCOPES = %w(domain site conv)

    attr_accessor :host, :key, :options, :system_token, :http_client, :site_key, :quill, :stream, :bootstrap, :search

    def_delegators :http_client, :get, :post, :delete, :put

    # Public: Create a new Livefyre client.
    #
    # options - [Hash] array of options to pass to the client for initialization
    # :host         - your Livefyre network_host
    # :key          - your Livefyre network_key
    # :system_token - your Livefyre long-lived system user key
    def initialize(options = {})
      @options = options.clone
      @host = options.delete(:network) || options.delete(:host)
      raise "Invalid host" if @host.nil?
      @http_client = Faraday.new(:url => "http://#{@host}")
      @quill = Faraday.new(:url => "http://quill.#{@host}")
      @stream = Faraday.new(:url => "http://stream.#{@host}")
      @search = Faraday.new(:url => "http://search.#{@host}")
      @bootstrap = Faraday.new(:url => "http://bootstrap.#{@host}")
      @site_key = options[:site_key]

      @key = options.delete(:secret) || options.delete(:key) || options.delete(:network_key)
      raise "Invalid secret key" if @key.nil?

      @system_token = options.delete(:system_token)
      raise "Invalid system token" if @system_token.nil?
    end

    # Public: Sign a data structure with this client's network key.
    #
    # Returns [String] A signed JWT token
    def sign(data)
      JWT.encode(data, @key)
    end

    # Public: Validates and decodes a JWT token
    #
    # Returns [Hash] A hash of data passed from the token
    # Raises [JWT::DecodeError] if invalid token contents or signature
    def validate(data)
      JWT.decode(data, @key)
    end

    # Public: Create a {Livefyre::User} with this client's credentials.
    #
    # uid          - the user ID to create a Livefyre user for. This should be the ID used to reference this user in Livefyre's system.
    # display_name - the displayed name for this user. Optional.
    #
    # Returns [Livefyre::User]
    def user(uid, display_name = nil)
      User.new(uid, self, display_name)
    end

    # Public: Sets a user's role (affiliation) in a given scope.
    #
    # user_id   - The user ID (without the host) to set roles for
    # role      - The {ROLES role} to set.
    # scope     - The {SCOPES scope} for which to set this role.
    # scope_id  - In the case that the given scope requires identification, specifies which scope to operate on.
    #
    # Examples
    #
    #   set_user_role(1234, "owner", "domain")
    #   set_user_role(1234, "moderator", "site", site_id)
    #   set_user_role(1234, "moderator", "conv", conversation_id)
    #
    #
    # Returns [Bool] true on success
    # Raises APIException if the request failed
    def set_user_role(user_id, role, scope = 'domain', scope_id = nil)
      raise "Invalid scope" unless SCOPES.include? scope
      raise "Invalid role" unless ROLES.include? role

      post_data = {
        :affiliation => role,
        :lftoken => system_token,
      }
      case scope
      when "domain"
        post_data[:domain_wide] = 1
      when "conv"
        raise "Invalid scope_id" if scope_id.nil?
        post_data[:conv_id] = scope_id
      when "site"
        raise "Invalid scope_id" if scope_id.nil?
        post_data[:site_id] = scope_id
      end
      result = post "/api/v1.1/private/management/user/#{jid(user_id)}/role/", post_data
      if result.success?
        true
      else
        raise APIException.new(result.body)
      end
    end

    # Public: Transform the given ID into a jid
    #
    # id - a string value to compose the JID with
    #
    # Returns [String] JID
    def jid(id)
      "%s@%s" % [id, host]
    end

    # Internal: Identifier to use to uniquely identify this client.
    #
    # Returns string ID
    def identifier
      @identifier ||= "RubyLib-#{Process.pid}-#{local_ip}-#{object_id}"
    end

    # Internal: Returns a cleaner string representation of this object
    #
    # Returns [String] representation of this class
    def to_s
      "#<#{self.class.name}:0x#{object_id.to_s(16).rjust(14, "0")} host='#{host}' key='#{key}'>"
    end

    private

    def local_ip
      orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true  # turn off reverse DNS resolution temporarily
      UDPSocket.open do |s|
        s.connect '64.233.187.99', 1
        s.addr.last
      end
    ensure
      Socket.do_not_reverse_lookup = orig
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
var intSelectedConsole = 1;

function moverCategory(intCategoryNum) {

	var strCategoryName = "categoryName"+intCategoryNum;
	document.getElementById(strCategoryName).className = "consoleCategory_clicked";

}

function moutCategory(intCategoryNum) {

	if(intSelectedConsole != intCategoryNum) {
		var strCategoryName = "categoryName"+intCategoryNum;
		document.getElementById(strCategoryName).className = "consoleCategory";
	}

}

function selectCategory(intCategoryNum) {

	var strOldCat = "#categoryOption"+intSelectedConsole;
	var strNewCat = "#categoryOption"+intCategoryNum;
	var intOldCat = intSelectedConsole;

	intSelectedConsole = intCategoryNum;
	moverCategory(intCategoryNum);
	moutCategory(intOldCat);

	$(document).ready(function() {
		$(strOldCat).hide();
		$(strNewCat).show();

		$('#myAccountPageCategories').removeClass("showConsoleCategories").addClass("hideConsoleCategories");
		$('#myAccountPageOptions').removeClass("hideConsoleOptions").addClass("showConsoleOptions");
	});

}

function sendPostData(arrData, strPageName) {

	$(document).ready(function() {
		$.post(strPageName, { postData: arrData }, function(data) {
			alert(data);
		});
	});

}

$(document).ready(function() {
	$("div[data-goback='yes']").click(function() {
		$('#myAccountPageCategories').removeClass('hideConsoleCategories').addClass('showConsoleCategories');
		$('#myAccountPageOptions').removeClass('showConsoleOptions').addClass('hideConsoleOptions');
	});
});


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>Sesión de Entrenamiento</title>
    <meta name="description" content="Contenido disponible para practicas de fútbol Sala,  observar, analizar y ejercer es la clave." />

    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="shortcut icon" href="//allancorra.github.io/themes/Casper/favicon.ico">

    <link rel="stylesheet" type="text/css" href="//allancorra.github.io/themes/Casper/assets/css/screen.css?v=1.0.0" />
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />

    <link rel="canonical" href="https://allancorra.github.io" />
    <meta name="generator" content="Ghost ?" />
    <link rel="alternate" type="application/rss+xml" title="Sesión de Entrenamiento" href="https://allancorra.github.io/rss" />
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">

        Home

coberturas

                    A 1-post collection

        Page 1 of 1

Fundamentos Defensivas

Observar los videos que se muestran a continuacón, estudiar para el proximo entrenamiento, entre mas los observen mejor. Video # 1 posturas. »

             on coberturas,  defensa,  maniobras,
            <time class="post-date" datetime="2016-05-13">13 May 2016</time>

        Page 1 of 1

Sesión de Entrenamiento © 2016

Proudly published with HubPress


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace InternationalCompany.USA {

    public partial class Usa {

        /// <summary>
        /// ContentPlaceHolderUsa control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolderUsa;
    }
}


text:
'use strict';
(function (window) {
  var angular = window.angular;
  var module = angular.module('pgApexApp.application');

  function ManageApplicationController($scope, $location, $routeParams, applicationService,
                                      databaseService, formErrorService, helperService) {
    this.$scope = $scope;
    this.$scope.helper = helperService;
    this.$location = $location;
    this.$routeParams = $routeParams;
    this.applicationService = applicationService;
    this.databaseService = databaseService;
    this.formErrorService = formErrorService;

    this.init();
  }

  ManageApplicationController.prototype.init = function() {
    this.$scope.mode = this.isCreatePage() ? 'create' : 'edit';
    this.$scope.application = {};
    this.$scope.formError = this.formErrorService.empty();
    this.$scope.databases = [];
    this.$scope.passwordFieldType = 'password';

    this.$scope.togglePasswordFieldType = this.togglePasswordFieldType.bind(this);
    this.$scope.saveApplication = this.saveApplication.bind(this);

    this.initDatabases();
    this.loadApplication();
  };

  ManageApplicationController.prototype.togglePasswordFieldType = function() {
    this.$scope.passwordFieldType = (this.$scope.passwordFieldType == 'text') ? 'password' : 'text';
  };

  ManageApplicationController.prototype.isCreatePage = function() {
    return this.$location.path().endsWith('/create');
  };

  ManageApplicationController.prototype.isEditPage = function() {
    return this.$location.path().endsWith('/edit');
  };

  ManageApplicationController.prototype.getApplicationId = function() {
    return this.$routeParams.applicationId ? parseInt(this.$routeParams.applicationId) : null;
  };

  ManageApplicationController.prototype.initDatabases = function() {
    this.databaseService.getDatabases().then(function (response) {
      this.$scope.databases = response.getDataOrDefault([]);
    }.bind(this));
  };

  ManageApplicationController.prototype.loadApplication = function() {
    if (!this.isEditPage()) { return; }
    this.applicationService.getApplication(this.getApplicationId()).then(function (response) {
      this.$scope.application = response.getDataOrDefault({'attributes':{}}).attributes;
    }.bind(this));
  };

  ManageApplicationController.prototype.saveApplication = function() {
    this.applicationService.saveApplication(
      this.getApplicationId(),
      this.$scope.application.name,
      this.$scope.application.alias || null,
      this.$scope.application.database,
      this.$scope.application.databaseUsername,
      this.$scope.application.databasePassword
    ).then(this.handleSaveResponse.bind(this));
  };

  ManageApplicationController.prototype.handleSaveResponse = function(response) {
    if (!response.hasErrors()) {
      this.$location.path('/application-builder/applications');
      return;
    } else {
      this.$scope.formError = this.formErrorService.parseApiResponse(response);
    }
  };

  function init() {
    module.controller('pgApexApp.application.ManageApplicationController',
      ['$scope', '$location', '$routeParams', 'applicationService', 'databaseService',
        'formErrorService', 'helperService', ManageApplicationController]);
  }

  init();
})(window);


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>linuschien</groupId>
	<artifactId>spring-batch-admin-boot</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>spring-batch-admin-boot</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.2.3.RELEASE</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>log4j-over-slf4j</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.batch</groupId>
			<artifactId>spring-batch-admin-manager</artifactId>
			<version>1.3.1.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>1.8.0.7</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<configuration>
							<classifier>exec</classifier>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


text:
[Table of contents](https://github.com/Lasoloz/easyout/tree/master/doc/tut)

## Using more targets with one output

Sorry, you have to wait until I'll have time to update it.


text:
function dialogService() {
};

dialogService.prototype.createAlertDialog = function(message, title){
	message = message || "Alert!";

	alertDialog = Ti.UI.createAlertDialog({
        message: message,
	});
	if (title){
		alertDialog.title = title;
	}
	return alertDialog;
};

module.exports = dialogService;


text:
package com.fanfou.app.opensource.adapter;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import android.content.Context;
import android.text.TextPaint;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.fanfou.app.opensource.AppContext;
import com.fanfou.app.opensource.R;
import com.fanfou.app.opensource.api.bean.Status;
import com.fanfou.app.opensource.ui.ActionManager;
import com.fanfou.app.opensource.util.DateTimeHelper;
import com.fanfou.app.opensource.util.OptionHelper;
import com.fanfou.app.opensource.util.StringHelper;

/**
 * @author mcxiaoke
 * @version 1.0 2011.06.25
 * @version 1.1 2011.10.26
 * @version 2.0 2011.12.06
 *
 */
public class StatusArrayAdapter extends BaseArrayAdapter<Status> {

    static class ViewHolder {
        ImageView headIcon = null;
        ImageView replyIcon = null;
        ImageView photoIcon = null;
        TextView nameText = null;
        TextView metaText = null;
        TextView contentText = null;

        ViewHolder(final View base) {
            this.headIcon = (ImageView) base
                    .findViewById(R.id.item_status_head);
            this.replyIcon = (ImageView) base
                    .findViewById(R.id.item_status_icon_reply);
            this.photoIcon = (ImageView) base
                    .findViewById(R.id.item_status_icon_photo);
            this.contentText = (TextView) base
                    .findViewById(R.id.item_status_text);
            this.metaText = (TextView) base.findViewById(R.id.item_status_meta);
            this.nameText = (TextView) base.findViewById(R.id.item_status_user);

        }
    }

    private static final String TAG = StatusArrayAdapter.class.getSimpleName();
    private static final int NONE = 0;
    private static final int MENTION = 1;
    private static final int SELF = 2;

    private static final int[] TYPES = new int[] { StatusArrayAdapter.NONE,
            StatusArrayAdapter.MENTION, StatusArrayAdapter.SELF, };

    private boolean colored;
    private int mMentionedBgColor;// = 0x332266aa;

    private int mSelfBgColor;// = 0x33999999;

    private List<Status> mStatus;

    public StatusArrayAdapter(final Context context, final List<Status> ss) {
        super(context, ss);
        init(context, false);
        if (ss == null) {
            this.mStatus = new ArrayList<Status>();
        } else {
            this.mStatus = ss;
        }
    }

    public StatusArrayAdapter(final Context context, final List<Status> ss,
            final boolean colored) {
        super(context, ss);
        init(context, colored);
        if (ss == null) {
            this.mStatus = new ArrayList<Status>();
        } else {
            this.mStatus = ss;
        }
    }

    @Override
    public int getCount() {
        return this.mStatus.size();
    }

    protected String getDateString(final Date date) {
        return DateTimeHelper.getInterval(date);
    }

    @Override
    public Status getItem(final int position) {
        return this.mStatus.get(position);
    }

    @Override
    public long getItemId(final int position) {
        return position;
    }

    @Override
    public int getItemViewType(final int position) {
        final Status s = getItem(position);
        if ((s == null) || s.isNull()) {
            return StatusArrayAdapter.NONE;
        }
        if (s.simpleText.contains("@" + AppContext.getUserName())) {
            return StatusArrayAdapter.MENTION;
        } else {
            return s.self ? StatusArrayAdapter.SELF : StatusArrayAdapter.NONE;
        }
    }

    @Override
    int getLayoutId() {
        return R.layout.list_item_status;
    }

    @Override
    public View getView(final int position, View convertView,
            final ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = this.mInflater.inflate(getLayoutId(), null);
            holder = new ViewHolder(convertView);
            setTextStyle(holder);
            setHeadImage(holder.headIcon);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        final Status s = this.mStatus.get(position);

        if (!isTextMode()) {
            holder.headIcon.setTag(s.userProfileImageUrl);
            this.mLoader.displayImage(s.userProfileImageUrl, holder.headIcon,
                    R.drawable.default_head);
            holder.headIcon.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(final View v) {
                    if (s != null) {
                        ActionManager.doProfile(
                                StatusArrayAdapter.this.mContext, s);
                    }
                }
            });
        }

        if (this.colored) {
            final int itemType = getItemViewType(position);
            switch (itemType) {
            case MENTION:
                convertView.setBackgroundColor(this.mMentionedBgColor);
                break;
            case SELF:
                convertView.setBackgroundColor(this.mSelfBgColor);
                break;
            case NONE:
                break;
            default:
                break;
            }
        }

        if (StringHelper.isEmpty(s.inReplyToStatusId)) {
            holder.replyIcon.setVisibility(View.GONE);
        } else {
            holder.replyIcon.setVisibility(View.VISIBLE);
        }

        if (StringHelper.isEmpty(s.photoLargeUrl)) {
            holder.photoIcon.setVisibility(View.GONE);
        } else {
            holder.photoIcon.setVisibility(View.VISIBLE);
        }

        holder.nameText.setText(s.userScreenName);
        holder.contentText.setText(s.simpleText);
        holder.metaText.setText(getDateString(s.createdAt) + " 通过" + s.source);

        return convertView;
    }

    @Override
    public int getViewTypeCount() {
        return StatusArrayAdapter.TYPES.length;
    }

    private void init(final Context context, final boolean colored) {
        this.colored = colored;
        if (colored) {
            this.mMentionedBgColor = OptionHelper.readInt(this.mContext,
                    R.string.option_color_highlight_mention, context
                            .getResources().getColor(R.color.mentioned_color));
            this.mSelfBgColor = OptionHelper.readInt(this.mContext,
                    R.string.option_color_highlight_self, context
                            .getResources().getColor(R.color.self_color));
            if (AppContext.DEBUG) {
                log("init mMentionedBgColor="
                        + Integer.toHexString(this.mMentionedBgColor));
                log("init mSelfBgColor="
                        + Integer.toHexString(this.mSelfBgColor));
            }
        }
    }

    void log(final String message) {
        Log.e(StatusArrayAdapter.TAG, message);
    }

    private void setTextStyle(final ViewHolder holder) {
        final int fontSize = getFontSize();
        holder.contentText.setTextSize(fontSize);
        holder.nameText.setTextSize(fontSize);
        holder.metaText.setTextSize(fontSize - 4);
        final TextPaint tp = holder.nameText.getPaint();
        tp.setFakeBoldText(true);
    }

    public void updateDataAndUI(final List<Status> ss) {
        this.mStatus = ss;
        notifyDataSetChanged();
    }

}


text:
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Written (W) 2013 Heiko Strathmann
 */

#include <shogun/base/init.h>
#include <shogun/statistics/LinearTimeMMD.h>
#include <shogun/kernel/GaussianKernel.h>
#include <shogun/features/DenseFeatures.h>
#include <shogun/features/streaming/generators/MeanShiftDataGenerator.h>
#include <shogun/mathematics/Statistics.h>

using namespace shogun;

void linear_time_mmd()
{
	/* note that the linear time statistic is designed for much larger datasets
	 * so increase to get reasonable results */
	index_t m=1000;
	index_t dim=2;
	float64_t difference=0.5;

	/* streaming data generator for mean shift distributions */
	CMeanShiftDataGenerator* gen_p=new CMeanShiftDataGenerator(0, dim);
	CMeanShiftDataGenerator* gen_q=new CMeanShiftDataGenerator(difference, dim);

	/* set kernel a-priori. usually one would do some kernel selection. See
	 * other examples for this. */
	float64_t width=10;
	CGaussianKernel* kernel=new CGaussianKernel(10, width);

	/* create linear time mmd instance */
	index_t blocksize=1000;
	CLinearTimeMMD* mmd=new CLinearTimeMMD(kernel, gen_p, gen_q, m, blocksize);

	/* perform test: compute p-value and test if null-hypothesis is rejected for
	 * a test level of 0.05 */
	float64_t alpha=0.05;

	/* using bootstrapping (not reccomended for linear time MMD, since slow).
	 * Also, in practice, use at least 250 iterations */
	mmd->set_null_approximation_method(PERMUTATION);
	mmd->set_num_null_samples(10);
	float64_t p_value_bootstrap=mmd->perform_test();
	/* reject if p-value is smaller than test level */
	SG_SPRINT("bootstrap: p!=q: %d\n", p_value_bootstrap<alpha);

	/* using Gaussian approximation (use large sample size, check type I error).
	 * Also, in practice, use at least 250 iterations */
	mmd->set_null_approximation_method(MMD1_GAUSSIAN);
	float64_t p_value_gaussian=mmd->perform_test();
	/* reject if p-value is smaller than test level */
	SG_SPRINT("gaussian approx: p!=q: %d\n", p_value_gaussian<alpha);

	/* compute tpye I and II error (use many more trials in practice).
	 * Type I error is only estimated to check MMD1_GAUSSIAN method for
	 * estimating the null distribution. Note that testing has to happen on
	 * difference data than kernel selection, but the linear time mmd does this
	 * implicitly and we used a fixed kernel here. */
	index_t num_trials=5;
	SGVector<float64_t> typeIerrors(num_trials);
	SGVector<float64_t> typeIIerrors(num_trials);
	for (index_t i=0; i<num_trials; ++i)
	{
		/* this effectively means that p=q - rejecting is tpye I error */
		mmd->set_simulate_h0(true);
		typeIerrors[i]=mmd->perform_test()>alpha;
		mmd->set_simulate_h0(false);

		typeIIerrors[i]=mmd->perform_test()>alpha;
	}

	SG_SPRINT("type I error: %f\n", CStatistics::mean(typeIerrors));
	SG_SPRINT("type II error: %f\n", CStatistics::mean(typeIIerrors));

	SG_UNREF(mmd);
}

int main(int argc, char** argv)
{
	init_shogun_with_defaults();
//	sg_io->set_loglevel(MSG_DEBUG);

	linear_time_mmd();

	exit_shogun();
	return 0;
}


text:
require File.dirname(__FILE__) + '/spec_helper'

describe Polish, "loading locales" do
  before(:all) do
    Polish.init_i18n
  end

  %w(
    date.formats.default
    date.formats.short
    date.formats.long
    date.order

    time.formats.default
    time.formats.short
    time.formats.long
    time.am
    time.pm
  ).each do |key|
    it "should define '#{key}' in datetime translations" do
      lookup(key).should_not be_nil
    end

    it "should define month_names in datetime translations" do
      lookup(:"date.month_names").should_not be_nil
      lookup(:"date.month_names").is_a?(Proc).should be_true
    end

    it "should define abbr_month_names in datetime translations" do
      lookup(:"date.abbr_month_names").should_not be_nil
      lookup(:"date.abbr_month_names").is_a?(Proc).should be_true
    end

    it "should define day_names in datetime translations" do
      lookup(:"date.day_names").should_not be_nil
      lookup(:"date.day_names").is_a?(Proc).should be_true
    end

    it "should define abbr_day_names in datetime translations" do
      lookup(:"date.abbr_day_names").should_not be_nil
      lookup(:"date.abbr_day_names").is_a?(Proc).should be_true
    end
  end

  it "should load pluralization rules" do
    lookup(:"i18n.plural.rule").should_not be_nil
    lookup(:"i18n.plural.rule").is_a?(Proc).should be_true
  end

  %w(
    number.format.separator
    number.format.delimiter
    number.format.precision
    number.currency.format.format
    number.currency.format.unit
    number.currency.format.separator
    number.currency.format.delimiter
    number.currency.format.precision
    number.percentage.format.delimiter
    number.precision.format.delimiter
    number.human.format.delimiter
    number.human.format.precision
    number.human.storage_units

    datetime.distance_in_words.half_a_minute
    datetime.distance_in_words.less_than_x_seconds
    datetime.distance_in_words.x_seconds
    datetime.distance_in_words.less_than_x_minutes
    datetime.distance_in_words.x_minutes
    datetime.distance_in_words.about_x_hours
    datetime.distance_in_words.x_days
    datetime.distance_in_words.about_x_months
    datetime.distance_in_words.x_months
    datetime.distance_in_words.about_x_years
    datetime.distance_in_words.over_x_years

    datetime.prompts.year
    datetime.prompts.month
    datetime.prompts.day
    datetime.prompts.hour
    datetime.prompts.minute
    datetime.prompts.second

    activerecord.errors.template.header
    activerecord.errors.template.body

    helpers.select.prompt
    helpers.submit.create
    helpers.submit.update
    helpers.submit.submit
  ).each do |key|
    it "should define '#{key}' in actionview translations" do
      lookup(key).should_not be_nil
    end
  end

  %w(
    errors.messages.inclusion
    errors.messages.exclusion
    errors.messages.invalid
    errors.messages.confirmation
    errors.messages.accepted
    errors.messages.empty
    errors.messages.blank
    errors.messages.too_long
    errors.messages.too_short
    errors.messages.wrong_length
    errors.messages.taken
    errors.messages.not_a_number
    errors.messages.greater_than
    errors.messages.greater_than_or_equal_to
    errors.messages.equal_to
    errors.messages.less_than
    errors.messages.less_than_or_equal_to
    errors.messages.odd
    errors.messages.even
    errors.messages.record_invalid
   ).each do |key|
    it "should define 'activerecord.#{key}' in activerecord translations" do
      lookup('activerecord.' + key).should_not be_nil
    end

    it "should define 'activemodel.#{key}' in activemodel translations" do
      lookup('activemodel.' + key).should_not be_nil
    end
  end

  %w(
    support.array.sentence_connector
    support.array.skip_last_comma

    support.array.words_connector
    support.array.two_words_connector
    support.array.last_word_connector
  ).each do |key|
    it "should define '#{key}' in activesupport translations" do
      lookup(key).should_not be_nil
    end
  end

  def lookup(*args)
    I18n.backend.send(:lookup, Polish.locale, *args)
  end
end


text:
#licensebtnl {
    position: absolute;
    top: 550px;
    left: 976px;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    -webkit-border-radius: 24px;
    border: solid 1px #000000;
    opacity: 0.3;
    color: white;
}

#licensebtnl:hover {
    opacity: 1.0;
}

#licensepage {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background: -webkit-gradient(linear, left top, right top, from(#ccc6cc), to(#393739));
    z-index: 99;
}

#licensetext {
    width: 98.7%;
    height: 88%;
    background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #FFFFFF), color-stop(1, #393739));
    -webkit-border-radius: 12px;
    border-radius: 12px;
    box-shadow: inset 1px 1px 2px 1px black;
    margin-bottom: 2px;
    padding-left: 10px;
    padding-bottom: 10px;
    overflow: hidden;
    cursor: move;
}

.licensebtn {
    position: absolute;
    color: #d7d7d7;
    border: solid 1px #333;
    text-align: center;
    text-decoration: none;
    font: 30px/100% Arial, Helvetica, sans-serif;
    text-shadow: 0 1px 1px rgba(0,0,0,.3);
    -webkit-border-radius: 12px;
    border-radius: 12px;
    background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#000));
    height: 52px;
    width: 52px;
    line-height: 48px;
    cursor: pointer;
    box-shadow: 2px 2px 14px #000;
}

.licensebtn:hover {
    background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#000));
}

.licensebtn:active {
    color: #666;
    background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#444));
}

#licensebtnq {
    left: 412px;
    width: 200px;
}


text:
class ReservationStation(object):
	"""docstring for ReservationStation"""
	def __init__(self, name , cycles):
		self.name = name
		self.busy = False
		self.op = None
		self.readySource1 = None
		self.readySource2 = None
		self.notReadySource1 = None
		self.notReadySource2 = None
		self.dest = None
		self.address = None
		self.branchOffset = None
		self.currentCycles = cycles
		self.cycles = cycles
	def check(self):
		return self.busy

	def reserve(self, op , readySource1 , readySource2 , notReadySource1 , notReadySource2 , dest , address, branchOffset):
		self.op = op
		self.readySource1 = readySource1
		self.readySource2 = readySource2
		self.notReadySource1 = notReadySource1
		self.notReadySource2 = notReadySource2
		self.dest = dest
		self.address = address
		self.branchOffset = branchOffset
		self.busy = True

	def execute(self):
		self.currentCycles -= 1

	def flush(self):
		self.busy = False
		self.op = None
		self.readySource1 = None
		self.readySource2 = None
		self.notReadySource1 = None
		self.notReadySource2 = None
		self.dest = None
		self.address = None
		self.branchOffset = None
		self.currentCycles = self.cycles


text:
package flag

import (
	"flag"
	"strconv"

	"go.chromium.org/luci/common/errors"
)

// int32Flag is a flag.Getter implementation representing an int32.
type int32Flag int32

// String returns a string representation of the flag value.
func (f int32Flag) String() string {
	return strconv.FormatInt(int64(f), 10)
}

// Set records seeing a flag value.
func (f *int32Flag) Set(s string) error {
	i, err := strconv.ParseInt(s, 10, 32)
	if err != nil {
		return errors.Reason("values must be 32-bit integers").Err()
	}
	*f = int32Flag(i)
	return nil
}

// Get retrieves the flag value.
func (f int32Flag) Get() interface{} {
	return int32(f)
}

// Int32 returns a flag.Getter which reads flags into the given int32 pointer.
func Int32(i *int32) flag.Getter {
	return (*int32Flag)(i)
}