text:
#include "relational_operators/DestroyHashOperator.hpp"

#include "query_execution/QueryContext.hpp"
#include "query_execution/WorkOrderProtosContainer.hpp"
#include "query_execution/WorkOrdersContainer.hpp"
#include "relational_operators/WorkOrder.pb.h"

#include "tmb/id_typedefs.h"

namespace quickstep {

bool DestroyHashOperator::getAllWorkOrders(
    WorkOrdersContainer *container,
    QueryContext *query_context,
    StorageManager *storage_manager,
    const tmb::client_id scheduler_client_id,
    tmb::MessageBus *bus) {
  if (blocking_dependencies_met_ && !work_generated_) {
    work_generated_ = true;
    container->addNormalWorkOrder(
        new DestroyHashWorkOrder(query_id_, hash_table_index_, query_context),
        op_index_);
  }
  return work_generated_;
}

bool DestroyHashOperator::getAllWorkOrderProtos(WorkOrderProtosContainer *container) {
  if (blocking_dependencies_met_ && !work_generated_) {
    work_generated_ = true;

    serialization::WorkOrder *proto = new serialization::WorkOrder;
    proto->set_work_order_type(serialization::DESTROY_HASH);
    proto->set_query_id(query_id_);
    proto->SetExtension(serialization::DestroyHashWorkOrder::join_hash_table_index, hash_table_index_);

    container->addWorkOrderProto(proto, op_index_);
  }
  return work_generated_;
}

void DestroyHashWorkOrder::execute() {
  query_context_->destroyJoinHashTable(hash_table_index_);
}

}  // namespace quickstep


text:
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * ActivityGroupServiceInterface.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.admanager.axis.v202202;

public interface ActivityGroupServiceInterface extends java.rmi.Remote {

    /**
     * Creates a new {@link ActivityGroup} objects.
     */
    public com.google.api.ads.admanager.axis.v202202.ActivityGroup[] createActivityGroups(com.google.api.ads.admanager.axis.v202202.ActivityGroup[] activityGroups) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202202.ApiException;

    /**
     * Gets an {@link ActivityGroupPage} of {@link ActivityGroup}
     * objects that satisfy the given
     *         {@link Statement#query}. The following fields are supported
     * for filtering:
     *
     *

     *

     *         PQL Property	 Object Property
     *

     *

     *         {@code id}
     *         {@link ActivityGroup#id}
     *

     *

     *         {@code name}
     *         {@link ActivityGroup#name}
     *

     *

     *         {@code impressionsLookback}
     *         {@link ActivityGroup#impressionsLookback}
     *

     *

     *         {@code clicksLookback}
     *         {@link ActivityGroup#clicksLookback}
     *

     *

     *         {@code status}
     *         {@link ActivityGroup#status}
     *

     *

     */
    public com.google.api.ads.admanager.axis.v202202.ActivityGroupPage getActivityGroupsByStatement(com.google.api.ads.admanager.axis.v202202.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202202.ApiException;

    /**
     * Updates the specified {@link ActivityGroup} objects.
     */
    public com.google.api.ads.admanager.axis.v202202.ActivityGroup[] updateActivityGroups(com.google.api.ads.admanager.axis.v202202.ActivityGroup[] activityGroups) throws java.rmi.RemoteException, com.google.api.ads.admanager.axis.v202202.ApiException;
}

redpajama_set_name: RedPajamaGithub


text:
@implementation VibeShowMoneyView

-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        self.userInteractionEnabled = YES;

        _backView = [[UIView alloc]initWithFrame:frame];
        [_backView setBackgroundColor:[UIColor clearColor]];
        [self addSubview:_backView];

        _moneyLabel = [[UILabel alloc]init];
        [_moneyLabel setTextAlignment:NSTextAlignmentLeft];
        [_moneyLabel setText:@"¥"];
        [_backView addSubview:_moneyLabel];

        _priceLabel = [[UILabel alloc]init];
        [_priceLabel setTextAlignment:NSTextAlignmentLeft];
        [_backView addSubview:_priceLabel];
    }

    return self;
}

-(CGSize )setMoneyViewWithMoneyFont:(UIFont *)moneyFont GapWidth:(float)gapWidth PriceFont:(UIFont *)priceFont Price:(NSString *)priceString TextColor:(UIColor *)textColor
{
    [_moneyLabel setFont:moneyFont];
    [_priceLabel setFont:priceFont];

    [_moneyLabel setTextColor:textColor];
    [_priceLabel setTextColor:textColor];

    NSString * moneyString = _moneyLabel.text;

    CGSize moneySize = [moneyString getSizeWithLimitSize:CGSizeMake(20, 20) withFont:moneyFont];
    CGSize priceSize = [priceString getSizeWithLimitSize:CGSizeMake(200, 20) withFont:priceFont];
    [_backView setFrame:CGRectMake(0, 0, moneySize.width +gapWidth +priceSize.width, priceSize.height)];

    //居中显示
    if (self.isShowMoneyMiddle == YES) {
        [_moneyLabel setFrame:CGRectMake(0, 1, moneySize.width, _backView.frame.size.height)];
        [_priceLabel setFrame:CGRectMake(moneySize.width +gapWidth, 0, priceSize.width, _backView.frame.size.height)];
    }
    //底部
    else{
        [_moneyLabel setFrame:CGRectMake(0, _backView.frame.size.height -moneySize.height, moneySize.width, moneySize.height)];
        [_priceLabel setFrame:CGRectMake(moneySize.width +gapWidth, _backView.frame.size.height -priceSize.height, priceSize.width, priceSize.height)];
    }

    [_priceLabel setText:priceString];

    return CGSizeMake(moneySize.width +gapWidth +priceSize.width, priceSize.height +1);
}

@end


text:
<?php

namespace App\DataTransformer;

use App\Entity\Recipe;

/**
 * Class RecipeTransformer
 *
 * @package App\DataTransformer
 */
class RecipeTransformer
{
    /**
     * @param Recipe $recipe
     *
     * @return array
     */
    public static function transform(Recipe $recipe)
    {
        return [
            'title'       => $recipe->getTitle(),
            'ingredients' => $recipe->getIngredients()
        ];
    }

    /**
     * @param Recipe[] $recipes
     *
     * @return array
     */
    public static function transformList(array $recipes)
    {
        return array_map(
            function (Recipe $recipe) {
                return self::transform($recipe);
            },
            $recipes
        );
    }
}


text:
import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {MockTimer} from 'chrome://test/mock_timer.js';
import {eventToPromise} from 'chrome://webui-test/test_util.js';
// clang-format on

// Test that tapping "Export passwords..." notifies the browser.
export function runStartExportTest(exportDialog, passwordManager, done) {
  passwordManager.exportPasswords = (callback) => {
    callback();
    done();
  };

  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
}

// Test the export flow. If exporting is fast, we should skip the
// in-progress view altogether.
export function runExportFlowFastTest(exportDialog, passwordManager, done) {
  const progressCallback =
      passwordManager.lastCallback.addPasswordsFileExportProgressListener;

  // Use this to freeze the delayed progress bar and avoid flakiness.
  const mockTimer = new MockTimer();
  mockTimer.install();

  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.SUCCEEDED});

  flush();
  // When we are done, the export dialog closes completely.
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_start'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_error'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_progress'));
  done();

  mockTimer.uninstall();
}

// The error view is shown when an error occurs.
export function runExportFlowErrorTest(exportDialog, passwordManager, done) {
  const progressCallback =
      passwordManager.lastCallback.addPasswordsFileExportProgressListener;

  // Use this to freeze the delayed progress bar and avoid flakiness.
  const mockTimer = new MockTimer();
  mockTimer.install();

  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
  progressCallback({
    status: chrome.passwordsPrivate.ExportProgressStatus.FAILED_WRITE_FAILED,
    folderName: 'tmp',
  });

  flush();
  // Test that the error dialog is shown.
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_error').open);
  // Test that the error dialog can be dismissed.
  exportDialog.shadowRoot.querySelector('#cancelErrorButton').click();
  flush();
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_error'));
  done();

  mockTimer.uninstall();
}

// The error view allows to retry.
export function runExportFlowErrorRetryTest(
    exportDialog, passwordManager, done) {
  const progressCallback =
      passwordManager.lastCallback.addPasswordsFileExportProgressListener;
  // Use this to freeze the delayed progress bar and avoid flakiness.
  const mockTimer = new MockTimer();

  new Promise(resolve => {
    mockTimer.install();

    passwordManager.exportPasswords = resolve;
    exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  }).then(() => {
    // This wait allows the BlockingRequestManager to process the click if
    // the test is running in ChromeOS.
    progressCallback(
        {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
    progressCallback({
      status: chrome.passwordsPrivate.ExportProgressStatus.FAILED_WRITE_FAILED,
      folderName: 'tmp',
    });

    flush();
    // Test that the error dialog is shown.
    assertTrue(exportDialog.shadowRoot.querySelector('#dialog_error').open);
    // Test that clicking retry will start a new export.
    passwordManager.exportPasswords = (callback) => {
      callback();
      done();
    };
    exportDialog.shadowRoot.querySelector('#tryAgainButton').click();

    mockTimer.uninstall();
  });
}

// Test the export flow. If exporting is slow, Chrome should show the
// in-progress dialog for at least 1000ms.
export function runExportFlowSlowTest(exportDialog, passwordManager, done) {
  const progressCallback =
      passwordManager.lastCallback.addPasswordsFileExportProgressListener;

  const mockTimer = new MockTimer();
  mockTimer.install();

  // The initial dialog remains open for 100ms after export enters the
  // in-progress state.
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);

  // After 100ms of not having completed, the dialog switches to the
  // progress bar. Chrome will continue to show the progress bar for 1000ms,
  // despite a completion event.
  mockTimer.tick(99);
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_start').open);
  mockTimer.tick(1);
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_progress').open);
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.SUCCEEDED});
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_progress').open);

  // After 1000ms, Chrome will display the completion event.
  mockTimer.tick(999);
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_progress').open);
  mockTimer.tick(1);
  flush();
  // On SUCCEEDED the dialog closes completely.
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_progress'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_start'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_error'));
  done();

  mockTimer.uninstall();
}

// Test that canceling the dialog while exporting will also cancel the
// export on the browser.
export function runCancelExportTest(exportDialog, passwordManager, done) {
  const progressCallback =
      passwordManager.lastCallback.addPasswordsFileExportProgressListener;

  passwordManager.cancelExportPasswords = () => {
    done();
  };

  const mockTimer = new MockTimer();
  mockTimer.install();

  // The initial dialog remains open for 100ms after export enters the
  // in-progress state.
  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  progressCallback(
      {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
  // The progress bar only appears after 100ms.
  mockTimer.tick(100);
  flush();
  assertTrue(exportDialog.shadowRoot.querySelector('#dialog_progress').open);
  exportDialog.shadowRoot.querySelector('#cancel_progress_button').click();

  flush();
  // The dialog should be dismissed entirely.
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_progress'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_start'));
  assertFalse(!!exportDialog.shadowRoot.querySelector('#dialog_error'));

  mockTimer.uninstall();
}

export function runFireCloseEventAfterExportCompleteTest(
    exportDialog, passwordManager) {
  const wait = eventToPromise('passwords-export-dialog-close', exportDialog);
  exportDialog.shadowRoot.querySelector('#exportPasswordsButton').click();
  passwordManager.lastCallback.addPasswordsFileExportProgressListener(
      {status: chrome.passwordsPrivate.ExportProgressStatus.IN_PROGRESS});
  passwordManager.lastCallback.addPasswordsFileExportProgressListener(
      {status: chrome.passwordsPrivate.ExportProgressStatus.SUCCEEDED});
  return wait;
}


text:
package io.task.exception;

/**
 *

 * Created By : Ahmed Mobasher Khan
 *
 * Purpose :
 *
 * Updated By :
 * Updated Date :
 * Comments :
 *

 */
public class InvalidDataFormatException extends InvalidDataException
{

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

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param message
	 *

	 */
	public InvalidDataFormatException(String message)
	{
		super(message);
	}

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param message
	 * @param logLevel
	 *

	 */
	public InvalidDataFormatException(String message, String logLevel)
	{
		super(message, logLevel);
	}

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param exception
	 *

	 */
	public InvalidDataFormatException(Throwable exception)
	{
		super(exception);
	}

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param exception
	 * @param logLevel
	 *

	 */
	public InvalidDataFormatException(Throwable exception, String logLevel)
	{
		super(exception, logLevel);
	}

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param message
	 * @param exception
	 *

	 */
	public InvalidDataFormatException(String message, Throwable exception)
	{
		super(message, exception);

	}

	/**
	 *

	 * Default constructor
	 *
	 * @author - Ahmed Mobasher Khan
	 *
	 * @param exception
	 * @param message
	 * @param logLevel
	 *

	 */
	public InvalidDataFormatException(Throwable exception, String message, String logLevel)
	{
		super(message, exception);
		setLogLevel(logLevel);
	}

}


text:
layout: kanji
v4: 214
v6: 227
kanji: 案
keyword: plan
elements: plan, relax, house, woman, tree, wood
strokes: 10
image: E6A188
on-yomi: アン
kun-yomi: つくえ
permalink: /rtk/案/
prev: 暦
next: 燥
---

1) [Christine_Tham] 31-7-2007(250): I plan to RELAX on top of that TREE.

2) [MichaelAnd] 15-4-2008(189): If you bring a woman to your house, generally its not a good plan to stick your wood up her bottom, she may scream in pain あん!

3) [dziewuliz] 3-5-2008(133): Man's plan of life: build a house, find a woman, plant a tree.

4) [Danieru] 17-6-2008(31): Calvin and Hobbes sit in their treehouse, which has a big "no girls" sign on it, deviously making their PLAN for their next water-balloon attack against the 'stinky girls'.

5) [DrWarrior12] 14-8-2007(29): How can you relax when you have a tree jammed up your ass?! Quickly make a plan to get down from there!


text:
sap.ui.define(['sap/ui/core/mvc/Controller', 'sap/ui/model/json/JSONModel'],
	function(Controller, JSONModel) {
	"use strict";

	var PageController = Controller.extend("sap.m.sample.TreeSelection.Page", {
		onInit : function (evt) {
			// set explored app's demo model on this sample
			var oModel = new JSONModel("test-resources/sap/m/demokit/sample/TreeSelection/Tree.json");
			this.getView().setModel(oModel);
		},

		handleSelectChange: function (oEvent) {
			var mode = oEvent.getParameter("selectedItem").getKey();
			this.byId("Tree").setMode(mode);
		}
	});

	return PageController;

});


text:
<?php

namespace Pum\Bundle\AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request;

class ConfigController extends Controller
{
    /**
     * @Route(path="/woodwork/config", name="app_config")
     */
    public function listAction(Request $request)
    {
        $this->assertGranted('ROLE_APP_CONFIG');

        return $this->render('PumAppBundle:Settings:index.html.twig', array(
            'config' => $this->get('pum.config')->all()
        ));
    }

    /**
     * @Route(path="/woodwork/config/edit", name="app_config_edit")
     */
    public function editAction(Request $request)
    {
        $this->assertGranted('ROLE_APP_CONFIG');

        $form = $this->createForm('pum_config');
        if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {
            return $this->redirect($this->generateUrl('app_config'));
        }

        return $this->render('PumAppBundle:Settings:edit.html.twig', array(
            'form' => $form->createView()
        ));
    }

    /**
     * @Route(path="/woodwork/config/clearcache", name="app_config_clearcache")
     */
    public function clearCacheAction(Request $request)
    {
        $this->assertGranted('ROLE_APP_CONFIG');

        $config = $this->get('pum.config');

        if ($config->clear()) {
            $this->addSuccess('Config cache cleared');
        } else {
            $this->addWarning('The config cache has not been deleted');
        }

        return $this->render('PumAppBundle:Settings:index.html.twig', array(
            'config' => $config->all()
        ));
    }
}


text:
<!DOCTYPE html>

    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,target-densitydpi=160" name="viewport">
    <meta http-equiv="cleartype" content="on">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="keywords" content="event, google, i/o, programming, android, chrome, developers, moscone, san francisco">
    <meta property="og:title" content="Google I/O 2014">
    <meta property="og:description" content="Google I/O 2014 brings developers together for an immersive, two-day experience focused on exploring the next generation of technology. Join us online or in person June 25-26, 2014.">
    <meta property="og:image" content="/events/io/images/io.png">

    <title>Find Azan - Help</title>
    <link rel="shortcut icon" href="/events/io/images/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon" href="/events/io/images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="57x57" href="/events/io/images/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/events/io/images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/events/io/images/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/events/io/images/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/events/io/images/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/events/io/images/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/events/io/images/apple-touch-icon-152x152.png">
    <link href="//fonts.googleapis.com/css?family=Roboto:400,300,100" rel="stylesheet">
    <link href="/css/site.css" rel="stylesheet">

          I/O
          Home
          Sandbox
          Schedule
          I/O Extended
          Logistics
          Videos
          Experiment
          Help

            I/O
            Home
            Sandbox
            Schedule
            I/O Extended
            Logistics
            Videos
            Experiment

              Navigation

          Have a question?

General

2014 Dates & Location

On-site Check-in

Stay Informed

Live Stream & Recordings

Live Blogging Gadget

Registration

Registration

Google Wallet Tips

Terms & Conditions

Academic Tickets

Press

Attendance Details

Badges

After Hours

Accessibility

Conduct

Child Care

General

2014 dates & location

              The 2014 conference will be held from June 25 – 26 at
              Moscone West Convention Center
              in San Francisco.

On-site Check-in

              To expedite the check-in process, we will begin on-site registration on
              Tuesday, June 24th. Make sure to bring your photo ID, as we'll need to
              verify it prior to assigning you your Google I/O badge. We're OK with
              government issued licenses, passports, and other forms of identification.
              If you do not have proper identification, you won't be able to receive a
              badge and will not be admitted into the conference. If you're an Academic
              attendee, please remember to bring proof of eligibility.

              Check-in for Google I/O will be located on Level 1 of Moscone West and open during the following times:

                  Tuesday, June 24: 2pm PDT to 8pm PDT

                  Wednesday, June 25: 7am PDT to 6pm PDT

                  Thursday, June 26: 7am PDT to 6 pm PDT

Stay informed

              To stay up to date on the latest information on sessions, speakers, and activities, be sure to visit the Google I/O 2014 website, as well as follow our Google+ page and Google Developers Blog. In addition, we'll be emailing all registered attendees the latest information and check-in instructions prior to the conference.

Live stream and recordings

              Even if you're not coming to Google I/O, you can be part of the magic. You can watch live streams of the keynotes and many other sessions via I/O Live  on our website. Even better, be part of Google I/O by attending an I/O Extended event in your area. If you can't watch live, you can see YouTube recordings of all sessions  after the conference.

Live Blogging Gadget

              If you're interested in embedding the Live Blogging Widget on your Website, access the configuration tool and FAQs here.

Registration

General Admission Ticket: $900

Academic Admission Ticket: $300

Registration

              We're making some changes to this year's registration process. The window to submit a registration application will open at 4:00pm PDT on April 15th and stay open until 2:00pm PDT on April 18th, so you'll have plenty of time to apply. We'll randomly select applicants after the window closes on the 18th and notify those selected with their ticket purchase confirmations via email. Qualified registration applicants will be selected at random for ticket assignments. The order in which registration applications are received has no bearing on the final outcome.

Here's what to expect during the registration application window:

                  You will need to sign into Google+  to begin the registration application.

                  You will then complete the required registration fields and continue on to authorize the purchase of your ticket via Google Wallet. At this time, Google Wallet will not complete the charge, but a pre-authorization will be placed to ensure the funds are available.

                  Your credit card will only be charged if you are assigned a ticket. By completing the registration application, you are authorizing Google Wallet to complete the charge at the conclusion of the application window, should you be randomly selected to receive a ticket.

                  Tickets can only be used by the original registrant and cannot be transferred or resold.

                  Ticket holders have until June 1, 2014 to request a full refund.

                  In order to obtain your Google I/O badge at check-in, a photo ID is mandatory.

Google Wallet Pro Tips

                To begin the registration application, we'll ask you to sign in with your Google+ account and to pay with your Google Wallet account.

                  If you've ever bought anything on Google Play, you already have Google Wallet.

                  Check your Google Wallet settings to make sure your postal address is complete and accurate, and your payment method is correct and up to date.

                  If this is the first time you'll be making a large payment with Google Wallet, you may want to notify your bank or credit card company in advance that you plan to make a $900 or $300 (academic ticket) charge that will appear as GOOGLE*IO Tickets. This will help ensure your payment is processed.

Registration Terms and Conditions

                  Each individual may  purchase only one ticket. Tickets for Google I/O are for the full two-day conference and no single-day tickets are available.

                  You must use your own Google+ account to register. All tickets must be purchased using a Google Wallet account.

                  By completing the registration application, you are authorizing Google Wallet to complete the charge at the conclusion of the application window, should you be randomly selected to receive a ticket.

                  Google I/O tickets must be used by the original registrant and are non-transferable.

                  Tickets may not be sold, bartered, auctioned, or transferred in any way and doing so may result in Google rendering the ticket null and void without any responsibility to Google.

                  At check-in, we will check your photo ID prior to assigning you your Google I/O badge. We're OK with government issued licenses, passports, and other forms of identification. If you do not have proper identification, you won't be able to receive a badge and will not be admitted into the conference.

                  If you buy an academic ticket and can't provide academic documentation during check-in at Google I/O, you won't be admitted or offered a refund, nor will you be able to convert your ticket to general admission. Please be sure to bring a current school ID or other proof that you are qualified to receive this special rate when you check in at the conference.

                  If you can't attend, you can request a refund. Send the refund request to googleio2014@google.com by June 1, 2014. Any refund requests made after that date will not be approved.

                  Attendees must be at least 15 years of age to attend Google I/O. 15, 16 and  17 year old attendees do not require an adult to accompany them; however, they must provide a signed parental consent form in advance or during on-site check-in. In addition, Google will not offer chaperone tickets for 15, 16 and 17 year old attendees. To request a parental consent form, please email googleio2014@google.com.

                  Attendees are not permitted to bring guests to Google I/O or to the After Hours party. If you have someone traveling with you, they will need to register themselves and purchase an attendee ticket.

                  Photographs and/or video taken at Google I/O by Google, or others on behalf of Google, may include your image or likeness. You agree that Google may use such photographs and/or video for any purpose without compensation to you

                  All information entered into the registration form must be correct and accurate to the best of your knowledge. All information must be entered in English. Some of the information entered (such as name and company), will be displayed on the attendee badge along with your Google+ profile photo.

                  Google I/O badges may contain NFC, BLE, or other RFID technologies to help us serve attendees and determine participation in various sessions and activities.

                  All registered attendees agree to allow Google to contact them regarding their registration and attendance at the event. By purchasing a ticket, you agree to allow Google to communicate with you via email with information regarding the event.

                  Attendance at Google I/O is not allowed by the following:

                      residents of embargoed countries,

                      individuals ordinarily resident in embargoed countries, or

                      individuals otherwise prohibited by applicable export controls and sanctions programs.

More registration details

                  Once you have completed registration, you will be able to review and edit most of the information on your registration form by logging into your Google+ account and returning to the Google I/O registration page. Once registered, you will not be able to change the name on the registration. Please make sure to register using the name that matches the photo ID you will be presenting when you check in to the conference.

                  Registration for Google I/O includes two full days of sessions, product demos, admission to the After Hours reception, and attendance at the keynote. We also provide complimentary breakfast, lunch, and snacks each day along with food and drinks at After Hours. In addition, attendees receive a conference badge and t-shirt and may be offered additional gifts. If you are not sure whether the professional guidelines for your school, university, organization, or agency would allow you to accept these items, please check with your local ethics officer before the event. The food and gifts are optional, so it may be possible to attend Google I/O even if you cannot accept any giveaways.

                  The City of San Francisco requires us to collect information regarding where attendees are going to stay during Google I/O. If you are unable to provide this information before the event, you will be required to do so during conference check-in. While this information is typically shared with the City of San Francisco in anonymous aggregate form, we may be required to provide the first and last names of some attendees to allow for the City's post-event audit of particular hotels.

                  Transportation will not be provided to Google I/O. Moscone West Convention Center is accessible via BART, MUNI Metro, and Caltrain.

                  If you are not a resident of the USA, you should check with your local government to determine the required documents and arrangements needed for your travel to the USA. If you require a visa letter regarding your Google I/O attendance, you can send a request to googleio2014@google.com. Google will not be able to contact an embassy on your behalf.

Academic tickets

                We offer a limited number of tickets at a discounted rate of $300 for Academia. To qualify, you need to be an active full-time student, professor, faculty or staff at a high school or higher education institution. This also includes those who graduated in 2014 prior to the event. When you check in at the conference, you'll need to provide a current school ID, transcript, credential, or other form of documentation which demonstrates that you are qualified to receive this special rate.

                  Once purchased, general admission tickets can't be converted to academic tickets, and vice versa.

                  If you buy an academic ticket and can't provide academic documentation when you arrive at Google I/O, you won't be admitted or offered a refund, nor will you be able to convert your ticket to general admission.

Press

              Unfortunately, we have a limited number of press passes, which have already been distributed. If you are a journalist and have questions about Google I/O, please email googleiopress@google.com.

Attendance Details

All presentations at Google I/O will be in English. Attendance at all sessions, code labs and events for Google I/O is on a first-come, first-serve basis.

Badges

              Badges and conference materials will be available on site at registration check-in.

              All attendees will be required to present a passport or other government-issued photo identification before they obtain an attendee badge and are admitted to Google I/O. You may not share, give, or otherwise provide your badge to anyone. Google I/O badges are not replaceable, so don't lose yours or you will not be readmitted to the conference.

              You must wear your Google I/O badge to gain admission to Google I/O and to visit the sessions, Developer Sandbox, and After Hours party. If requested by security, please display or provide additional identification. Google I/O badges include your name, company or organization (if provided), Google+ ID and profile photo.

After Hours

              All registered attendees are invited to the After Hours party. Conference credentials will be required for entry. Please join us for food, drinks, music, games, and more. Alcoholic beverages will be available for those 21 and over.

Event attire

              Google I/O is a developers conference, so please be comfortable and casual. There is no enforced dress code.

Accessibility accommodations for attendees

              We will be providing live real-time transcription (CART) for the keynote and some of our sessions. Caption text displayed on a large screen at the front of the room will be accessible to all attendees. We will also use the text to provide captions for YouTube videos of the sessions, which will be posted after the event. If you have other specific needs, please let us know during your registration or send an email to googleio2014@google.com.

              We will be happy to provide an ASL interpreter to accompany you in the sessions at Google I/O. We will do our best to find a technical translator that is familiar with the domain, but please keep in mind that the interpreter will probably not be able to meet with the speakers beforehand. Please let us know during registration if you need an ASL interpreter at Google I/O.

              Moscone West is fully ADA certified. If you have questions regarding specific accommodations please let us know during registration or send an email to googleio2014@google.com.

Anti-harassment policy

              Google is dedicated to providing a harassment-free event experience for everyone, regardless of gender, sexual orientation, disability, gender identity, age, race, national identity, or religion. We do not tolerate harassment of event participants in any form. All attendees of Google I/O must abide by our anti-harassment policy.

Conduct policy

              Google reserves the right to refuse admittance to, or remove any person from Google I/O (including future Google I/O events) at any time in its sole discretion. This includes but is not limited to attendees behaving in a disorderly manner or failing to comply with the terms and conditions herein.

Smoking

              Smoking is not permitted anywhere inside Moscone West Convention Center. Smoking is only permitted in designated outdoor smoking areas.

No soliciting

              No solicitation or selling of items or services is allowed at Google I/O. Any attendee conducting these activities may be removed from the conference.

Child care

              We will offer group child care at Moscone West to conference attendees at no charge. Children ages 6 months through 11 years are eligible. When you complete your registration form, please indicate if you're interested in child care. After you've registered, we will contact you to gather more information and provide specific details on child care. Please note that we have limited availability and may not be able to accommodate all requests.

Back to top

                Google

                  Help


text:
<?php

namespace PHPExiftool\Driver\Tag\IFD0;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class FrameRate extends AbstractTag
{

    protected $Id = 51044;

    protected $Name = 'FrameRate';

    protected $FullName = 'Exif::Main';

    protected $GroupName = 'IFD0';

    protected $g0 = 'EXIF';

    protected $g1 = 'IFD0';

    protected $g2 = 'Image';

    protected $Type = 'rational64s';

    protected $Writable = true;

    protected $Description = 'Frame Rate';
}


text:
#include <Beard/tty/Ops.hpp>

#include <cstring>
#include <stdio.h>

namespace Beard {
namespace tty {

String
this_path() noexcept {
	char buf[L_ctermid];
	buf[L_ctermid - 1u] = '\0';
	::ctermid(buf);
	return String{buf};
}

} // namespace tty
} // namespace Beard


text:
 Opinionated electron.atom.io boilerplate / template that incorporates _less_, _react_ (w/ es2015/react plugins of _babel_). Using _gulp_ as the main task runner.

---

## Get started

### Prerequisites

Make sure you have [**node and npm**](https://nodejs.org/en/download/) installed on your machine. It's also handy to have [**gulp**](http://gulpjs.com/) installed globally (use `npm install gulp -g` to install) as the build process relies on this.

### Ok, I have those prerequisites, now what?

1. Open a terminal or console and execute the following command to clone the boilerplate and create a new repo with your own project name.

   ```
   git clone https://github.com/aredfox/electron-boiler my-electron-project
   ```

2. Then navigate via your terminal or console to the project folder and execute the following command to install the needed npm modules.

   ```
   npm install
   ```

3. To run the application (in "dev" mode) use the following command.

    ```
    npm start
    ```

    _TIP: run command "`npm install && npm start`" to combine steps 2 and 3._

## Development

Open your favourite code editor and run `npm run dev` to edit & view live changes in your application.

## Packaging/Deployment

Packaging is done via the [**electron-builder**](https://github.com/electron-userland/electron-builder#readme) project, and basic setup has been made via npm scripts that are configure in the _build_ and _directories_ sections in _package.json_. Run the scripts below to build for a given platform, and read through the [**electron-builder**](https://github.com/electron-userland/electron-builder#readme) documentation to tweak the building process (e.g.: include installers).

* `npm package-win`
* `npm package-linux`
* `npm package-mac`


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.LanguageServer.Protocol;

namespace Microsoft.CodeAnalysis.LanguageServer.Handler.Commands
{
    internal abstract class AbstractExecuteWorkspaceCommandHandler : IRequestHandler<ExecuteCommandParams, object>
    {
        public string Method => GetRequestNameForCommandName(Command);

        public abstract string Command { get; }

        public abstract bool MutatesSolutionState { get; }
        public abstract bool RequiresLSPSolution { get; }

        public abstract TextDocumentIdentifier? GetTextDocumentIdentifier(ExecuteCommandParams request);

        public abstract Task<object> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken);

        public static string GetRequestNameForCommandName(string commandName) => $"{Methods.WorkspaceExecuteCommandName}/{commandName}";
    }
}


text:
.class Lcom/google/android/gms/internal/gm$b;
.super Lcom/google/android/gms/location/c$a;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/google/android/gms/internal/gm;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "b"
.end annotation

# instance fields
.field private xU:Landroid/os/Handler;

# direct methods
.method constructor <init>(Lcom/google/android/gms/location/LocationListener;Landroid/os/Looper;)V
    .locals 1

    invoke-direct {p0}, Lcom/google/android/gms/location/c$a;-><init>()V

    if-nez p2, :cond_0

    new-instance v0, Lcom/google/android/gms/internal/gm$a;

    invoke-direct {v0, p1}, Lcom/google/android/gms/internal/gm$a;-><init>(Lcom/google/android/gms/location/LocationListener;)V

    goto :goto_0

    :cond_0
    new-instance v0, Lcom/google/android/gms/internal/gm$a;

    invoke-direct {v0, p1, p2}, Lcom/google/android/gms/internal/gm$a;-><init>(Lcom/google/android/gms/location/LocationListener;Landroid/os/Looper;)V

    :goto_0
    iput-object v0, p0, Lcom/google/android/gms/internal/gm$b;->xU:Landroid/os/Handler;

    return-void
.end method

# virtual methods
.method public onLocationChanged(Landroid/location/Location;)V
    .locals 3

    iget-object v0, p0, Lcom/google/android/gms/internal/gm$b;->xU:Landroid/os/Handler;

    if-nez v0, :cond_0

    return-void

    :cond_0
    invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;

    move-result-object v0

    move-object v2, v0

    const/4 v1, 0x1

    iput v1, v0, Landroid/os/Message;->what:I

    iput-object p1, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    iget-object v0, p0, Lcom/google/android/gms/internal/gm$b;->xU:Landroid/os/Handler;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method

.method public release()V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/android/gms/internal/gm$b;->xU:Landroid/os/Handler;

    return-void
.end method


text:
import {Hero} from "../../../../model/hero.model";
import {HeroStore} from "../../../../model/hero.store";
import {Store} from "@ngrx/store";
import {HeroService} from "../../../../services/hero.service";
import {Component} from '@angular/core';
import {FormBuilder, Control, ControlGroup, Validators} from '@angular/common';

@Component({
  selector: 'hero-form',
  template: `
    <form [ngFormModel]="heroForm" (submit)="addHero()">

              Heros Name
              <input type="text" class="form-control" ngControl="heroName"/>

                  Please select a heros name

                Heros Skill
                <input type="text" class="form-control" ngControl="heroSkill"/>

                    Please select a skill for your hero

          <button type="submit" class="btn btn-danger" [disabled]="!heroForm.valid">Add Hero</button>
          <button type="button" class="btn btn-danger" [disabled]="!heroForm.valid || !heroToUpdate"
          (click)="updateHero()">Update Hero</button>
    </form>
  `,
  providers: [FormBuilder],
  styles: [`
      .errormessage{
        color: red;
      }
      label{
        color: white;
      }
    `]
})
export class HeroForm{

    heroForm: ControlGroup;
    heroName: Control;
    heroSkill: Control;
    static counter: number = 0;
    heroToUpdate: Hero = undefined;

    constructor(private _fb: FormBuilder, private _heroService: HeroService,
      private store: Store<HeroStore>){
      this.heroName = this._fb.control('', Validators.required);
      this.heroSkill = this._fb.control('', Validators.required);
      this.heroForm = this._fb.group({
        heroName: this.heroName,
        heroSkill: this.heroSkill
      });

      this.store.select('selectedHero').subscribe((hero: Hero) => {
        if(hero){
        this.heroToUpdate = hero;
        this.heroName.updateValue(this.heroToUpdate.heroName);
        this.heroSkill.updateValue(this.heroToUpdate.heroSkill);
        }
      })

    }

    addHero(): void{
      let newHero = {
        id: HeroForm.counter++,
        heroName: this.heroName.value,
        heroSkill: this.heroSkill.value
      }
      this._heroService.addHero(newHero);
      this._resetForm();
    }

    updateHero(): void{
      let updatedHero = {
        id: this.heroToUpdate.id,
        heroName: this.heroName.value,
        heroSkill: this.heroSkill.value
      };
      this._heroService.updateHero(updatedHero);
    }

    private _resetForm(){
      this.heroName.updateValue('');
      this.heroName.setErrors(null);
      this.heroSkill.updateValue('');
      this.heroSkill.setErrors(null);
    }
}


text:
runit () {
	echo -n "Test $1:"
	./$1 > $2
	if test $? -ne 0; then
		echo " failed (execution failed)"
		exit 1
	fi
}

# check output files $1 and $2, exit on failure
diffit () {
	if diff $1 $2; then
		echo " OK"
	else
		echo " failed (differences above)"
		exit 1
	fi
}

# check output of program $1, known_good must be in $1.good
checkoutput () {
	runit $1 output
	diffit output $1.good
}

# filter out TTL and bindata stuff from $1 to $2
filterout () {
	sed -e '/"ttl"/d' -e '/"ipv4_address"/d' -e '/"ipv6_address"/d' -e '/"rdata_raw"/d' -e '/<bindata/d' -e '/"serial"/d' <$1 >$2
}

# like checkoutput but removes addresses and TTLs and bindata
# this makes the test almost useless, but it tests runtime lookup
# and the structure of the answer format, against the live internet.
checkpacket () {
	runit $1 output
	cp $1.good output.good
	filterout output output2
	filterout output.good output2.good
	diffit output2 output2.good
}

echo "./check_getdns"
./check_getdns
if test $? -ne 0; then
	echo " failed (unit test execution failed)"
	exit 1
fi
checkoutput tests_dict
checkoutput tests_list

# the packets are too different to compare for people
#checkpacket tests_stub_async
#checkpacket tests_stub_sync

runit tests_stub_async output
echo " exitcode-OK"
runit tests_stub_sync output
echo " exitcode-OK"
runit tests_dnssec output
echo " exitcode-OK"

rm -f output output.good output2 output2.good
exit 0


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/rel-2.0-xr-osx64-bld/build/security/manager/ssl/public/nsIPKCS11Slot.idl
 */

#ifndef __gen_nsIPKCS11Slot_h__
#define __gen_nsIPKCS11Slot_h__

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIPK11Token; /* forward declaration */

/* starting interface:    nsIPKCS11Slot */
#define NS_IPKCS11SLOT_IID_STR "c2d4f296-ee60-11d4-998b-00b0d02354a0"

#define NS_IPKCS11SLOT_IID \
  {0xc2d4f296, 0xee60, 0x11d4, \
    { 0x99, 0x8b, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIPKCS11Slot : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPKCS11SLOT_IID)

  /* readonly attribute wstring name; */
  NS_SCRIPTABLE NS_IMETHOD GetName(PRUnichar **aName) = 0;

  /* readonly attribute wstring desc; */
  NS_SCRIPTABLE NS_IMETHOD GetDesc(PRUnichar **aDesc) = 0;

  /* readonly attribute wstring manID; */
  NS_SCRIPTABLE NS_IMETHOD GetManID(PRUnichar **aManID) = 0;

  /* readonly attribute wstring HWVersion; */
  NS_SCRIPTABLE NS_IMETHOD GetHWVersion(PRUnichar **aHWVersion) = 0;

  /* readonly attribute wstring FWVersion; */
  NS_SCRIPTABLE NS_IMETHOD GetFWVersion(PRUnichar **aFWVersion) = 0;

  enum { SLOT_DISABLED = 0U };

  enum { SLOT_NOT_PRESENT = 1U };

  enum { SLOT_UNINITIALIZED = 2U };

  enum { SLOT_NOT_LOGGED_IN = 3U };

  enum { SLOT_LOGGED_IN = 4U };

  enum { SLOT_READY = 5U };

  /* readonly attribute unsigned long status; */
  NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint32 *aStatus) = 0;

  /* nsIPK11Token getToken (); */
  NS_SCRIPTABLE NS_IMETHOD GetToken(nsIPK11Token **_retval NS_OUTPARAM) = 0;

  /* readonly attribute wstring tokenName; */
  NS_SCRIPTABLE NS_IMETHOD GetTokenName(PRUnichar **aTokenName) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIPKCS11Slot, NS_IPKCS11SLOT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIPKCS11SLOT \
  NS_SCRIPTABLE NS_IMETHOD GetName(PRUnichar **aName); \
  NS_SCRIPTABLE NS_IMETHOD GetDesc(PRUnichar **aDesc); \
  NS_SCRIPTABLE NS_IMETHOD GetManID(PRUnichar **aManID); \
  NS_SCRIPTABLE NS_IMETHOD GetHWVersion(PRUnichar **aHWVersion); \
  NS_SCRIPTABLE NS_IMETHOD GetFWVersion(PRUnichar **aFWVersion); \
  NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint32 *aStatus); \
  NS_SCRIPTABLE NS_IMETHOD GetToken(nsIPK11Token **_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetTokenName(PRUnichar **aTokenName);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIPKCS11SLOT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetName(PRUnichar **aName) { return _to GetName(aName); } \
  NS_SCRIPTABLE NS_IMETHOD GetDesc(PRUnichar **aDesc) { return _to GetDesc(aDesc); } \
  NS_SCRIPTABLE NS_IMETHOD GetManID(PRUnichar **aManID) { return _to GetManID(aManID); } \
  NS_SCRIPTABLE NS_IMETHOD GetHWVersion(PRUnichar **aHWVersion) { return _to GetHWVersion(aHWVersion); } \
  NS_SCRIPTABLE NS_IMETHOD GetFWVersion(PRUnichar **aFWVersion) { return _to GetFWVersion(aFWVersion); } \
  NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint32 *aStatus) { return _to GetStatus(aStatus); } \
  NS_SCRIPTABLE NS_IMETHOD GetToken(nsIPK11Token **_retval NS_OUTPARAM) { return _to GetToken(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetTokenName(PRUnichar **aTokenName) { return _to GetTokenName(aTokenName); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIPKCS11SLOT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetName(PRUnichar **aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_SCRIPTABLE NS_IMETHOD GetDesc(PRUnichar **aDesc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDesc(aDesc); } \
  NS_SCRIPTABLE NS_IMETHOD GetManID(PRUnichar **aManID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManID(aManID); } \
  NS_SCRIPTABLE NS_IMETHOD GetHWVersion(PRUnichar **aHWVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHWVersion(aHWVersion); } \
  NS_SCRIPTABLE NS_IMETHOD GetFWVersion(PRUnichar **aFWVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFWVersion(aFWVersion); } \
  NS_SCRIPTABLE NS_IMETHOD GetStatus(PRUint32 *aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStatus(aStatus); } \
  NS_SCRIPTABLE NS_IMETHOD GetToken(nsIPK11Token **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetToken(_retval); } \
  NS_SCRIPTABLE NS_IMETHOD GetTokenName(PRUnichar **aTokenName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTokenName(aTokenName); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsPKCS11Slot : public nsIPKCS11Slot
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIPKCS11SLOT

  nsPKCS11Slot();

private:
  ~nsPKCS11Slot();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsPKCS11Slot, nsIPKCS11Slot)

nsPKCS11Slot::nsPKCS11Slot()
{
  /* member initializers and constructor code */
}

nsPKCS11Slot::~nsPKCS11Slot()
{
  /* destructor code */
}

/* readonly attribute wstring name; */
NS_IMETHODIMP nsPKCS11Slot::GetName(PRUnichar **aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring desc; */
NS_IMETHODIMP nsPKCS11Slot::GetDesc(PRUnichar **aDesc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring manID; */
NS_IMETHODIMP nsPKCS11Slot::GetManID(PRUnichar **aManID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring HWVersion; */
NS_IMETHODIMP nsPKCS11Slot::GetHWVersion(PRUnichar **aHWVersion)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring FWVersion; */
NS_IMETHODIMP nsPKCS11Slot::GetFWVersion(PRUnichar **aFWVersion)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long status; */
NS_IMETHODIMP nsPKCS11Slot::GetStatus(PRUint32 *aStatus)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIPK11Token getToken (); */
NS_IMETHODIMP nsPKCS11Slot::GetToken(nsIPK11Token **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring tokenName; */
NS_IMETHODIMP nsPKCS11Slot::GetTokenName(PRUnichar **aTokenName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIPKCS11Slot_h__ */


text:
'use strict';

const StripeResource = require('../StripeResource');
const stripeMethod = StripeResource.method;

module.exports = StripeResource.extend({
  path: 'setup_intents',

  includeBasic: ['create', 'list', 'retrieve', 'update'],

  cancel: stripeMethod({
    method: 'POST',
    path: '/{intent}/cancel',
  }),

  confirm: stripeMethod({
    method: 'POST',
    path: '/{intent}/confirm',
  }),
});


text:
package org.elasticsearch.action.admin.cluster.storedscripts;

import org.elasticsearch.action.Action;
import org.elasticsearch.client.ElasticsearchClient;

public class DeleteStoredScriptAction extends Action<DeleteStoredScriptRequest, DeleteStoredScriptResponse,
        DeleteStoredScriptRequestBuilder> {

    public static final DeleteStoredScriptAction INSTANCE = new DeleteStoredScriptAction();
    public static final String NAME = "cluster:admin/script/delete";

    private DeleteStoredScriptAction() {
        super(NAME);
    }

    @Override
    public DeleteStoredScriptResponse newResponse() {
        return new DeleteStoredScriptResponse();
    }

    @Override
    public DeleteStoredScriptRequestBuilder newRequestBuilder(ElasticsearchClient client) {
        return new DeleteStoredScriptRequestBuilder(client, this);
    }
}


text:
Connect to a testem server and run the unit tests in node.js

## Example

    var testemNode = require("testem-node")

    testemNode(
        port: 7357
        , host: "localhost"
        , command: "tap"
        , args: ["--tap", "test"]
    })


text:
Scrollgrid.prototype.headerRowHeight = function (value, silent) {
    "use strict";

    var props = this.properties,
        result;

    if (value === undefined) {
        result = props.headerRowHeight;
    } else {
        // Set the value and redraw but return self for chaining
        props.headerRowHeight = value;
        result = this;
        if (!silent) {
            this.refresh();
        }
    }

    return result;

};


text:
var Article = Marionette.ItemView.extend({
  template: require('./templates/article.hbs'),
  className: 'mdl-cell mdl-cell--4-col mdl-cell--6-col-tablet mdl-cell--12-col-phone',
  events: {
  	'click .add-article': 'addArticle',
  	'click .remove-article': 'removeArticle'
  },
  modelEvents: {
  	'change:quantity': 'renderCurrentPrice'
  },
  initialize: function() {
    console.log(this.model.collection);
    var currenyQuantity = this.model.get('quantity');
    if (currenyQuantity===null || currenyQuantity === undefined){
  	  var quantity = 0;
  	  this.model.set('quantity', quantity);
    }
  	this.setPrice()
  },
  setPrice: function() {
  	var quantity = this.model.get('quantity');
  	var price = this.model.get('price');
    var discount = this.model.collection.discount;
    if (discount!==null && discount!==undefined) {
      price -= (price*discount)/100;
      this.model.set('discount', discount);
    } else {
      this.model.unset('discount');
    }
  	var currentPrice = (price * quantity).toFixed(2);
  	this.model.set('currentPrice', currentPrice);
  },
  renderCurrentPrice: function() {
  	this.setPrice();
  	this.$el.find('.current-price').html('$ '+this.model.get('currentPrice'));
  	this.$el.find('.article-quantity').val(this.model.get('quantity'));
  },
  addArticle: function() {
  	var currentQuantity = this.model.get('quantity');
  	currentQuantity++;
  	this.model.set('quantity', currentQuantity);
  },
  removeArticle: function() {
  	var currentQuantity = this.model.get('quantity');
  	if (currentQuantity > 0) {
  		currentQuantity--;
  		this.model.set('quantity', currentQuantity);
  	}
  }
});

module.exports = Article


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>EyeDropper</title>

    <link rel="stylesheet" href="https://unpkg.com/ress/dist/ress.min.css">

    <link rel="stylesheet" href="./dist/color.min.css">


text:
using System;
using System.Collections.Generic;
using System.Linq;

using ExamQuestions.Tests;

using NUnit.Framework;

namespace ExamQuestions.Exam
{
    public class Lotto
    {
        [Test]
        public void MethodUnderTest_TestedBehavior_ExpectedResult()
        {
            var day = WeekDays.Friday;

            switch (day)
            {
                case WeekDays.Monday:
                    break;
                case WeekDays.Tuesday:
                    break;
                case WeekDays.Wednesday:
                    break;
                case WeekDays.Thursday:
                    break;
                case WeekDays.Friday:
                    RunLotto();
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }

        private static void RunLotto()
        {
            var lottoNumbers = new int[50];
            var myNumbers = new int[49];
            var random = new Random();

            for (int i = 0; i < lottoNumbers.Length; i++)
            {
                lottoNumbers[i] = i + 1;
            }

            for (int i = 0; i < myNumbers.Length; i++)
            {
                PickUniqueNumbers(myNumbers, lottoNumbers, random, i);
            }

            IOrderedEnumerable<int> orderByDescending = myNumbers.OrderByDescending(x => x);

            foreach (int t in orderByDescending)
            {
                Console.Write(t+" ");
            }
        }

        private static void PickUniqueNumbers(IList<int> myNumbers, IList<int> lottoNumbers, Random random, int i)
        {
            var lottoNumber = lottoNumbers[random.Next(49)];
            if (!myNumbers.Contains(lottoNumber))
            {
                myNumbers[i] = lottoNumber;
            }
            else
            {
                PickUniqueNumbers(myNumbers, lottoNumbers, random, i);
            }
        }
    }
}


text:
package com.thoughtworks.sulabh.model;

import com.google.android.gms.maps.model.LatLng;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;
import java.io.Serializable;

public class Loo implements Serializable{
	private String _id;
	private String name;
	private double coordinates[];
	private Rating rating;
	private Boolean operational;
	private Boolean free;
	private String type;
	private String[] suitableFor;

	private Loo() {}

	public Loo(String[] suitableFor, String type, Boolean free, Boolean operational, float rating, double[] coordinates, String name) {

		this.suitableFor = suitableFor;
		this.type = type;
		this.free = free;
		this.operational = operational;
		this.rating = new Rating(rating, 1);
		this.coordinates = coordinates;
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public double[] getCoordinates() {
		return coordinates;
	}

	public float getActualRating() {
		ObjectMapper mapper = new ObjectMapper();
		try {
			rating = mapper.readValue(String.valueOf(rating), Rating.class);
		} catch (IOException e) {
			e.printStackTrace();
		}

		return rating.sumOfRatings / rating.numOfRatings;
	}

	public Boolean getOperational() {
		return operational;
	}

	public Boolean getFree() {
		return free;
	}

	public String getType() {
		return type;
	}

	public String getSuitableFor() {
		StringBuilder suitable = new StringBuilder();
		for (String s : suitableFor)
			suitable.append(s).append("\n");
        return String.valueOf(suitable);
	}

	public String get_id() {
		return _id;
	}

	public boolean isSamePositionAs(LatLng position) {
		return areDoublesEqual(this.getCoordinates()[0], position.latitude) && areDoublesEqual(this.getCoordinates()[1], position.longitude);
	}

	private boolean areDoublesEqual(double a, double b) {
		double delta = 0.0000005;
		return Math.abs(a - b) < delta;
	}

	public Rating getRating(){
		return this.rating;
	}

	public void setRating(Rating rating) {
		this.rating = rating;
	}
}


text:
import { AsyncIterableX } from '../../asynciterable/asynciterablex';
import { create as createStatic } from '../../asynciterable/create';

/** @nocollapse */
AsyncIterableX.create = createStatic;

declare module '../../asynciterable/asynciterablex' {
  // eslint-disable-next-line no-shadow
  namespace AsyncIterableX {
    export let create: typeof createStatic;
  }
}


text:
@implementation LOLocalCachePaths

- (id)initWithSettings:(LOLocalCachePaths *)settings suffix:(NSString *)suffix {
    self = [super init];
    self.stagingPath         = [settings.stagingPath         stringByAppendingPathComponent:suffix];
    self.appCachePath        = [settings.appCachePath        stringByAppendingPathComponent:suffix];
    self.contentCachePath    = [settings.contentCachePath    stringByAppendingPathComponent:suffix];
    self.packagedContentPath = [settings.packagedContentPath stringByAppendingPathComponent:suffix];
    return self;
}

@end


text:
<wicket:panel>

</wicket:panel>


text:
package org.jets3t.service.multi.s3;

import org.jets3t.service.model.StorageObject;
import org.jets3t.service.multi.ThreadWatcher;
import org.jets3t.service.multi.s3.ThreadedS3Service;
import org.jets3t.service.multi.event.ServiceEvent;

/**
 * Multi-threaded service event fired by
 * {@link ThreadedS3Service#multipartUploadParts(java.util.List)}.
 *

 * EVENT_IN_PROGRESS events include an array of the {@link StorageObject}s that have been created
 * since the last progress event was fired. These objects are available via
 * {@link #getUploadedObjects()}.
 *

 * EVENT_CANCELLED events include an array of the {@link StorageObject}s that had not been created
 * before the operation was cancelled. These objects are available via
 * {@link #getCancelledObjects()}.
 *
 * @author James Murty
 */
public final class MultipartUploadsEvent extends ServiceEvent {
    private StorageObject[] objects = null;

    private MultipartUploadsEvent(int eventCode, Object uniqueOperationId) {
        super(eventCode, uniqueOperationId);
    }

    public static MultipartUploadsEvent newErrorEvent(Throwable t, Object uniqueOperationId) {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_ERROR, uniqueOperationId);
        event.setErrorCause(t);
        return event;
    }

    public static MultipartUploadsEvent newStartedEvent(ThreadWatcher threadWatcher, Object uniqueOperationId) {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_STARTED, uniqueOperationId);
        event.setThreadWatcher(threadWatcher);
        return event;
    }

    public static MultipartUploadsEvent newInProgressEvent(ThreadWatcher threadWatcher,
        StorageObject[] completedObjects, Object uniqueOperationId)
    {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_IN_PROGRESS, uniqueOperationId);
        event.setThreadWatcher(threadWatcher);
        event.setObjects(completedObjects);
        return event;
    }

    public static MultipartUploadsEvent newCompletedEvent(Object uniqueOperationId) {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_COMPLETED, uniqueOperationId);
        return event;
    }

    public static MultipartUploadsEvent newCancelledEvent(StorageObject[] incompletedObjects, Object uniqueOperationId) {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_CANCELLED, uniqueOperationId);
        event.setObjects(incompletedObjects);
        return event;
    }

    public static MultipartUploadsEvent newIgnoredErrorsEvent(ThreadWatcher threadWatcher,
        Throwable[] ignoredErrors, Object uniqueOperationId)
    {
        MultipartUploadsEvent event = new MultipartUploadsEvent(EVENT_IGNORED_ERRORS, uniqueOperationId);
        event.setIgnoredErrors(ignoredErrors);
        return event;
    }

    private void setObjects(StorageObject[] objects) {
        this.objects = objects;
    }

    /**
     * @return
     * the {@link StorageObject}s that have been uploaded since the last progress event was fired.
     * @throws IllegalStateException
     * created objects are only available from EVENT_IN_PROGRESS events.
     */
    public StorageObject[] getUploadedObjects() throws IllegalStateException {
        if (getEventCode() != EVENT_IN_PROGRESS) {
            throw new IllegalStateException("Created Objects are only available from EVENT_IN_PROGRESS events");
        }
        return objects;
    }

    /**
     * @return
     * the {@link StorageObject}s that were not created before the operation was cancelled.
     * @throws IllegalStateException
     * cancelled objects are only available from EVENT_CANCELLED events.
     */
    public StorageObject[] getCancelledObjects() throws IllegalStateException {
        if (getEventCode() != EVENT_CANCELLED) {
            throw new IllegalStateException("Cancelled Objects are  only available from EVENT_CANCELLED events");
        }
        return objects;
    }

}


text:
define(function (require, exports, module) {
    "use strict";

    // Dependencies
    var $ = require('jquery'),
        _ = require('underscore'),
        Backbone = require('backbone'),
        NtbEditorView = require('views/ntb/editor'),
        MapWrapper = require('views/map/wrapper'),
        RouteModel = require('models/route'),
        RouteDrawView = require('views/routes/draw'),
        PictureCollection = require('collections/pictures'),
        PictureManager = require('views/pictures/manager'),
        PoiCollection = require('collections/pois'),
        PoiManager = require('views/pois/manager'),
        MarkingModel = require('models/marking'),
        MarkingEdit = require('views/marking/edit'),
        RouteDetailsView = require('views/routes/details'),
        User = require('models/user'),
        user = new User();

    require('backbone-stickit');
    require('backbone-validation');
    require('bootstrap');
    require('jquery-ssr');

    // Module
    return NtbEditorView.extend({

        el: '[data-view="app"]',

        initialize: function (options) {

            // Create model
            this.model = new RouteModel(options.routeData);

            // Create collections
            this.pictures = new PictureCollection(options.picturesData);
            this.pois = new PoiCollection(options.poisData);

            this.relatedCollections = [
                {
                    field: 'bilder',
                    collection: this.pictures,
                    destroyRemoved: true
                },
                {
                    field: 'steder',
                    collection: this.pois,
                    destroyRemoved: true
                }
            ];

            if (this.model.get('rute')) {
                // Create models
                this.marking = new MarkingModel(options.routeData.rute);

                this.relatedModels = [
                    {
                        field: 'rute',
                        model: this.marking
                    }
                ];

            } else {
                this.$('[data-action="set-as-marked-route"]').on('click', $.proxy(this.setAsMarkedRoute, this));
            }

            // Set up views

            this.mapWrapper = new MapWrapper({
                el: '[data-view="route-map"]',
                route: this.model,
                pictures: this.pictures,
                pois: this.pois
            }).render();

            this.routeDrawView = new RouteDrawView({
                model: this.model,
                pictures: this.pictures,
                map: this.mapWrapper
            }).render();

            this.pictureManager = new PictureManager({
                el: '[data-view="route-pictures"]',
                pictures: this.pictures,
                map: this.mapWrapper,
                messages: {empty: 'Husk å legge inn bilder fra turen din, slik at det blir synlig på forsiden av UT.no'},
                defaults: {status: this.model.get('status')}
            }).render();

            this.poiManager = new PoiManager({
                el: '[data-view="route-pois"]',
                pois: this.pois,
                pictures: this.pictures,
                map: this.mapWrapper,
                defaults: {status: this.model.get('status')}
            }).render();

            this.routeDetailsView = new RouteDetailsView({
                el: '[data-view="route-details"]',
                route: this.model
            }).render();

            if (this.model.get('rute')) {
                this.markingEdit = new MarkingEdit({
                    el: '[data-view="route-marking"]',
                    model: this.marking
                }).render();
            }

            this.listenTo(this.model, 'change:status', $.proxy(this.updatePublishButtons, this));

            NtbEditorView.prototype.initialize.call(this, options);
        },

        setAsMarkedRoute: function () {
            if (!this.markingEdit) {
                this.marking = new MarkingModel();

                this.relatedModels = [
                    {
                        field: 'rute',
                        model: this.marking
                    }
                ];

                this.markingEdit = new MarkingEdit({
                    el: '[data-view="route-marking"]',
                    model: this.marking
                }).render();

            }
        },

        render: function () {
            $('body').scrollspy({target: '.navbar-app'});

            this.updatePublishButtons();
        },

        publish: function () {

            var isValid = this.model.isValid(true);

            if (isValid === true) {

                this.pictures.setPublished();
                this.pois.setPublished();

                this.model.set('status', 'Offentlig', {silent: true});

                this.save();

            } else {

                var doHide = 0;
                var hideTooltip = function () {
                    // NOTE: The first click event on publish button is fired twice. Because of that,
                    // the document click listener that will hide the tooltip can not be applied directly
                    // after the tooltip is shown, as that will cause the tooltip to be hidden on the "second"
                    // which is supposedly happening instantnly. That is the reason for this quite dirrrty hack.
                    if (doHide === 3) {
                        $('[data-action="do-publish"]').tooltip('hide');
                        $('[data-action="do-publish"]').on('hidden.bs.tooltip', function () {
                            $(document).off('click.tooltip');
                        });
                    }
                    doHide++;
                };

                $('[data-action="do-publish"]').on('shown.bs.tooltip', function () {
                    $(document).on('click.tooltip', $.proxy(function (e) {
                        hideTooltip();
                    }, this));
                });

                $('[data-action="do-publish"]').tooltip({
                    title: 'Turen kan ikke publiseres uten at alle de påkrevde feltene er fylt ut.',
                    placement: 'bottom',
                    trigger: 'manual'
                }).tooltip('show');

                var $firstError = $('.has-error').first();

                if ($firstError.length) {
                    $('html, body').animate({
                        scrollTop: ($firstError.offset().top - 80)
                    }, 1000);
                } else {
                    Raven.captureMessage('Model is not valid, but no elements was marked as error.');
                }
            }

            this.updatePublishButtons();

        },

        unpublish: function () {
            this.model.set('status', 'Kladd', {silent: true});
            this.pictures.setUnpublished();
            this.pois.setUnpublished();
            this.updatePublishButtons();
            this.save();
        }

    });

});


text:
[assembly: Android.Runtime.ResourceDesignerAttribute("Google.Apis.Android.Sample.Resource", IsApplication=true)]

namespace Google.Apis.Android.Sample
{

	[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
	public partial class Resource
	{

		static Resource()
		{
			global::Android.Runtime.ResourceIdManager.UpdateIdValues();
		}

		public static void UpdateIdValues()
		{
		}

		public partial class Attribute
		{

			static Attribute()
			{
				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
			}

			private Attribute()
			{
			}
		}

		public partial class Drawable
		{

			// aapt resource value: 0x7f020000
			public const int Icon = 2130837504;

			static Drawable()
			{
				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
			}

			private Drawable()
			{
			}
		}

		public partial class Id
		{

			// aapt resource value: 0x7f050002
			public const int ListItem = 2131034114;

			// aapt resource value: 0x7f050000
			public const int MyButton = 2131034112;

			// aapt resource value: 0x7f050001
			public const int Name = 2131034113;

			static Id()
			{
				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
			}

			private Id()
			{
			}
		}

		public partial class Layout
		{

			// aapt resource value: 0x7f030000
			public const int Main = 2130903040;

			// aapt resource value: 0x7f030001
			public const int NameDialog = 2130903041;

			// aapt resource value: 0x7f030002
			public const int TaskItem = 2130903042;

			static Layout()
			{
				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
			}

			private Layout()
			{
			}
		}

		public partial class String
		{

			// aapt resource value: 0x7f040001
			public const int ApplicationName = 2130968577;

			// aapt resource value: 0x7f040000
			public const int Hello = 2130968576;

			static String()
			{
				global::Android.Runtime.ResourceIdManager.UpdateIdValues();
			}

			private String()
			{
			}
		}
	}
}
#pragma warning restore 1591


text:
/*

  Process a file
  ====

  To process source files we extract comments and parse as markdown.

  To process markdown files we treat them as one big comment, so that the data format is consistent.

*/

var _ = require('lodash');
var fs = require('fs');
var path = require('path');
var findComments = require('./find-comments');
var extractLinks = require('./extract-links');
var isHeading = require('./is-heading');

function getSubheadings (comments) {
  var tokens = _.flatten(comments.map(function (comment) {
    return comment.tokens.filter(isHeading.bind(null, 2));
  }));

  return _.pluck(tokens, 'text');
}

/*

  Find document links in comments
  ----

  Find doc links with [[Extract Document Links]].

*/
function getDocLinks (comments) {
  var links = [];

  comments.forEach(function (comment) {
    return comment.tokens.forEach(function (token) {
      var text = token.text;
      if (!text) { return null; }

      extractLinks(token.text).forEach(function (l) {
        links.push(l);
      });
    });
  });

  return links;
}

function processGenericFile (filename, src, callback) {
  var docItems = findComments(src);
  if (!docItems.length) { return callback(null, null); }

  callback(null, {
    filename: filename,
    heading: docItems[0].tokens[0].text,
    items: docItems,
    subheadings: getSubheadings(docItems),
    links: getDocLinks(docItems)
  });
}

var marked = require('marked');
var excludePreHeadingMarkdownTokens = require('./exclude-pre-heading-markdown-tokens');
function processMarkdownFile (filename, src, callback) {
  var docItems = excludePreHeadingMarkdownTokens([{
    line: 0,
    tokens: marked.lexer(src.trim())
  }]);

  if (!docItems.length) { return callback(null, null); }

  callback(null, {
    filename: filename,
    heading: docItems[0].tokens[0].text,
    items: docItems,
    subheadings: getSubheadings(docItems),
    links: getDocLinks(docItems)
  });
}

module.exports = function processFile (filename, callback) {
  var handlers = [
    {
      ext: ['.md', '.markdown'],
      func: processMarkdownFile
    }
  ];

  fs.readFile(filename, 'utf8', function (err, src) {
    if (err) { return callback(err); }

    var ext = path.extname(filename);
    var i;
    var h;
    for (i=0; i<handlers.length; i+=1) {
      h = handlers[i];
      if (h.ext.indexOf(ext) === -1) { continue; }

      //> run the custom handler
      return h.func(filename, src, callback);
    }

    //> unless a custom handler is found, we'll assume c-style comments
    return processGenericFile(filename, src, callback);
  });
};


text:
package org.sourcepit.mavenizor.state;

import static org.sourcepit.common.utils.io.IO.osgiIn;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.sourcepit.common.manifest.osgi.BundleManifest;
import org.sourcepit.common.manifest.osgi.resource.BundleManifestResourceImpl;
import org.sourcepit.common.utils.adapt.AbstractAdapterFactory;
import org.sourcepit.common.utils.io.IOOperation;

public class BundleAdapterFactory extends AbstractAdapterFactory {
   public final static BundleAdapterFactory DEFAULT = new BundleAdapterFactory();

   @Override
   @SuppressWarnings("unchecked")
   protected <A> A newAdapter(Object adaptable, Class<A> adapterType) {
      if (adaptable instanceof BundleDescription) {
         final BundleDescription bundle = (BundleDescription) adaptable;
         if (File.class.isAssignableFrom(adapterType)) {
            final String location = bundle.getLocation();
            if (location != null) {
               final File bundleLocation = new File(location);
               if (bundleLocation.exists()) {
                  return (A) bundleLocation;
               }
            }
         }
         else if (BundleManifest.class.isAssignableFrom(adapterType)) {
            final File bundleLocation = adapt(adaptable, File.class);
            if (bundleLocation != null) {
               return (A) readManifest(bundleLocation);
            }
         }
      }
      return null;
   }

   private static BundleManifest readManifest(File location) {
      final Resource resource = new BundleManifestResourceImpl();
      new IOOperation<InputStream>(osgiIn(location, "META-INF/MANIFEST.MF")) {
         @Override
         protected void run(InputStream inputStream) throws IOException {
            resource.load(inputStream, null);
         }
      }.run();
      final BundleManifest bundleManifest = (BundleManifest) resource.getContents().get(0);
      resource.getContents().clear();
      return bundleManifest;
   }
}


text:
APP_NAME=          # short-name, jar and xpi files name. Must be lowercase with no spaces
CHROME_PROVIDERS=  # which chrome providers we have (space-separated list)
CLEAN_UP=          # delete the jar / "files" when done?       (1/0)
ROOT_FILES=        # put these files in root of xpi (space separated list of leaf filenames)
ROOT_DIRS=         # ...and these directories       (space separated list)
BEFORE_BUILD=      # run this before building       (bash command)
AFTER_BUILD=       # ...and this after the build    (bash command)

if [ -z $1 ]; then
  . ./config_build.sh
else
  . $1
fi

if [ -z $APP_NAME ]; then
  echo "You need to create build config file first!"
  echo "Read comments at the beginning of this script for more info."
  exit;
fi

ROOT_DIR=`pwd`
TMP_DIR=build

#uncomment to debug
#set -x

# remove any left-over files from previous build
rm -f $APP_NAME.jar $APP_NAME.xpi files
rm -rf $TMP_DIR

$BEFORE_BUILD

mkdir --parents --verbose $TMP_DIR/chrome

# generate the JAR file, excluding CVS, SVN, and temporary files
JAR_FILE=$TMP_DIR/chrome/$APP_NAME.jar
echo "Generating $JAR_FILE..."
for CHROME_SUBDIR in $CHROME_PROVIDERS; do
  find $CHROME_SUBDIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~ >> files
done

#zip -0 -r $JAR_FILE -@ < files
# The following statement should be used instead if you don't wish to use the JAR file
cp --verbose --parents `cat files` $TMP_DIR

# prepare components and defaults
echo "Copying various files to $TMP_DIR folder..."
for DIR in $ROOT_DIRS; do
  mkdir $TMP_DIR/$DIR
  FILES="`find $DIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~`"
  for F in FILES; do
	 echo $F >> files
  	 cp --verbose --parents $FILES $TMP_DIR
  done
done

# Copy other files to the root of future XPI.
for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
  cp --verbose $ROOT_FILE $TMP_DIR
  if [ -f $ROOT_FILE ]; then
    echo $ROOT_FILE >> files
  fi
done

cd $TMP_DIR

if [ -f "chrome.manifest" ]; then
  echo "Preprocessing chrome.manifest..."
  # You think this is scary?
  #s/^(content\s+\S*\s+)(\S*\/)$/\1jar:chrome\/$APP_NAME\.jar!\/\2/
  #s/^(skin|locale)(\s+\S*\s+\S*\s+)(.*\/)$/\1\2jar:chrome\/$APP_NAME\.jar!\/\3/
  #
  # Then try this! (Same, but with characters escaped for bash :)
  #sed -i -r s/^\(content\\s+\\S*\\s+\)\(\\S*\\/\)$/\\1jar:chrome\\/$APP_NAME\\.jar!\\/\\2/ chrome.manifest
  #sed -i -r s/^\(locale\)\(\\s+\\S*\\s+\\S*\\s+\)\(.*\\/\)$/\\1\\2jar:chrome\\/$APP_NAME\\.jar!\\/\\3/ chrome.manifest
  #sed -i -r s/^\(skin\)\(\\s+\\S*\\s+\\S*\\s+\)\(.*\\/\)$/\\1\\2jar:chrome\\/$APP_NAME\\.jar!\\/\\3/ chrome.manifest

  # (it simply adds jar:chrome/whatever.jar!/ at appropriate positions of chrome.manifest)
fi

# generate the XPI file
echo "Generating $APP_NAME.xpi..."
zip -r ../$APP_NAME.xpi *

cd "$ROOT_DIR"

echo "Cleanup..."
if [ $CLEAN_UP = 0 ]; then
  # save the jar file
  #mv $TMP_DIR/chrome/$APP_NAME.jar .
  echo "."
else
  rm ./files
fi

# remove the working files
#rm -rf $TMP_DIR
echo "Done!"

$AFTER_BUILD


text:
package com.game.classes.network;

import com.game.classes.Player;

import java.util.ArrayList;

public interface ChatEvents {
    void onConnect(String serverName);

    void onDisconnect(String reason);

    void onMessaged(String message);
}


text:
var elixir = require('laravel-elixir');

var bowerpath = './vendor/bower_components/';
var publicpath = './public/';
var buildpath = publicpath + 'build/';

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

var PACKAGES = {
    modernizr:       bowerpath + 'modernizr/',
    jquery:          bowerpath + 'jquery/',
    whatinput:       bowerpath + 'what-input/',
    foundationsites: bowerpath + 'foundation-sites/',
    motionui:        bowerpath + 'motion-ui/',
    fontawesome:     bowerpath + 'font-awesome/',
    roboto:          bowerpath + 'roboto-fontface/'
}

// File paths to various assets are defined here.
var PATHS = {
    sass: [
        PACKAGES.foundationsites + 'scss/',
        PACKAGES.motionui + 'src/',
        PACKAGES.fontawesome + 'scss/',
        PACKAGES.roboto + 'css/'
    ],
    javascript: [
        // Read vendor/bower_components/modernizr/readme.md before building
        PACKAGES.modernizr + 'modernizr.js',
        PACKAGES.jquery + 'dist/jquery.js',
        PACKAGES.whatinput + 'what-input.js',
        PACKAGES.foundationsites + 'js/foundation.core.js',
        PACKAGES.foundationsites + 'js/foundation.util.*.js',
        // Paths to individual JS components defined below
        PACKAGES.foundationsites + 'js/foundation.abide.js',
        PACKAGES.foundationsites + 'js/foundation.accordion.js',
        PACKAGES.foundationsites + 'js/foundation.accordionMenu.js',
        PACKAGES.foundationsites + 'js/foundation.drilldown.js',
        PACKAGES.foundationsites + 'js/foundation.dropdown.js',
        PACKAGES.foundationsites + 'js/foundation.dropdownMenu.js',
        PACKAGES.foundationsites + 'js/foundation.equalizer.js',
        PACKAGES.foundationsites + 'js/foundation.interchange.js',
        PACKAGES.foundationsites + 'js/foundation.magellan.js',
        PACKAGES.foundationsites + 'js/foundation.offcanvas.js',
        PACKAGES.foundationsites + 'js/foundation.orbit.js',
        PACKAGES.foundationsites + 'js/foundation.responsiveMenu.js',
        PACKAGES.foundationsites + 'js/foundation.responsiveToggle.js',
        PACKAGES.foundationsites + 'js/foundation.reveal.js',
        PACKAGES.foundationsites + 'js/foundation.slider.js',
        PACKAGES.foundationsites + 'js/foundation.sticky.js',
        PACKAGES.foundationsites + 'js/foundation.tabs.js',
        PACKAGES.foundationsites + 'js/foundation.toggler.js',
        PACKAGES.foundationsites + 'js/foundation.tooltip.js',
        './resources/assets/js/app.js'
    ]
};

elixir(function(mix) {
    mix
        .copy(PACKAGES.roboto + 'fonts/**', buildpath + 'fonts/roboto')
        .copy(PACKAGES.fontawesome + 'fonts/**', buildpath + 'fonts')
        .sass('boilerplate.scss', null, { includePaths: PATHS.sass })
        .scripts(PATHS.javascript, publicpath + 'js/boilerplate.js')
        .version(['css/boilerplate.css', 'js/boilerplate.js']);
});


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/xhtml;charset=UTF-8"/>
<title>AEDA-2MIEIC1-T4: Referência ao ficheiro Aeroporto.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>

Página principal

Namespaces

Classes

Ficheiros

Lista de ficheiros

Ficheiros membro

Componentes |
Macros |
Definições de tipos |
Variáveis

Referência ao ficheiro Aeroporto.h

Classe que contém a informação associada ao Aeroporto.
Mais...

#include "Aviao.h"

#include "TipoAviao.h"

#include "Companhia.h"

#include "Tripulante.h"

#include "Voo.h"

#include "PortaEmbarque.h"

#include "Exceptions.h"

#include "utils.h"

#include "BST.h"

#include <vector>

#include <string>

#include <fstream>

#include <iostream>

#include <sstream>

#include <cstdlib>

#include <cstdio>

#include <iomanip>

#include <limits>

#include <time.h>

#include <algorithm>

#include <utility>

#include <functional>

#include <hash_set>

Ir para o código fonte deste ficheiro.

Componentes

class  	hash_voo_operators

class  	Aeroporto

 	Classe que armazena informação acerca de um aeroporto.  Mais...

Macros

#define 	_DEFINE_DEPRECATED_HASH_CLASSES   0

Definições de tipos

typedef hash_set< Voo

*, hash_voo_operators > 	HASH_SET_VOOS

Variáveis

PortaEmbarquePtr 	porta_embarque_null

Descrição detalhada

Classe que contém a informação associada ao Aeroporto.

PROJECTO: Projecto 2 - Gestão do embarque dos passageiros num aeroporto (check-in/embarque)

 FICHEIRO: Aeroporto.h

 DESCRIÇÃO: Classe que contém a informação associada ao Aeroporto.

TURMA / GRUPO: 2MIEIC1 / 4

 AUTORES:

Carlos Miguel Correia da Costa

Daniela Filipa Neves Cardeano

Vítor Amálio Maia Martins Moreira

Definido no ficheiro Aeroporto.h.

Documentação das macros

          #define _DEFINE_DEPRECATED_HASH_CLASSES   0

Definido na linha 50 do ficheiro Aeroporto.h.

Documentação dos tipos

          typedef hash_set<Voo*, hash_voo_operators> HASH_SET_VOOS

Definido na linha 101 do ficheiro Aeroporto.h.

Documentação das variáveis

          PortaEmbarquePtr porta_embarque_null

Referenciado por CRUD::addPortaEmbarque(), Aeroporto::Aeroporto() e CRUD::getBSTElem().

<address class="footer">Gerado em Wed Dec 22 2010 04:57:37 para AEDA-2MIEIC1-T4 por

 1.7.1 </address>


text:
package org.apache.hadoop.hive.ql.udf;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hive.ql.exec.UDF;

public class UDFOPNotNull implements UDF {

  private static Log LOG = LogFactory.getLog("org.apache.hadoop.hive.ql.udf.UDFOPNotNull");

  public UDFOPNotNull() {
  }

  public Boolean evaluate(Object a)  {
    return Boolean.valueOf(a != null);
  }

}


text:
from marshmallow import Schema, fields

from ..models.order_min import OrderMinSchema

class UserOrdersSchema(Schema):
    orders = fields.Nested(OrderMinSchema, required=True, many=True)
    total = fields.Integer(required=True)
    pages = fields.Integer(required=True)


text:
var app = require('http').createServer(handler)
  , io = require('socket.io').listen(app)
  , fs = require('fs')

app.listen(8081);

function handler (req, res) {
  fs.readFile(__dirname + '/index.html',
  function (err, data) {
    if (err) {
      res.writeHead(500);
      return res.end('Error loading index.html');
    }

    res.writeHead(200);
    res.end(data);
  });
}

var count = 0;
io.sockets.on('connection', function (socket) {
  // initial message kicks off the back-and-forth
  socket.emit('server-msg', { hello: 'world' });
  socket.on('client-msg', function (data) {
    console.log(data);
    setTimeout(function(){
        socket.emit('server-msg', { hello: 'world #' + (++count) });
    }, 500);
  });
});


text:
"""
$description Turkish live TV channels from Turkuvaz Media Group, including Ahaber, ATV, Minika COCUK and MinikaGO.
$url atv.com.tr
$url a2tv.com.tr
$url ahaber.com.tr
$url anews.com.tr
$url aspor.com.tr
$url atvavrupa.tv
$url minikacocuk.com.tr
$url minikago.com.tr
$url sabah.com.tr
$type live
$region various
"""

import logging
import re

from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import useragents, validate
from streamlink.stream.hls import HLSStream

log = logging.getLogger(__name__)

@pluginmatcher(re.compile(r"""https?://(?:www\.)?
    (?:
        (?:
            (atvavrupa)\.tv
            |
            (atv|a2tv|ahaber|aspor|minikago|minikacocuk|anews)\.com\.tr
        )/webtv/(?:live-broadcast|canli-yayin)
        |
        (ahaber)\.com\.tr/video/canli-yayin
        |
        atv\.com\.tr/(a2tv)/canli-yayin
        |
        sabah\.com\.tr/(apara)/canli-yayin
    )
""", re.VERBOSE))
class Turkuvaz(Plugin):
    _hls_url = "https://trkvz-live.ercdn.net/{channel}/{channel}.m3u8"
    _token_url = "https://securevideotoken.tmgrup.com.tr/webtv/secure"
    _token_schema = validate.Schema(validate.all(
        {
            "Success": True,
            "Url": validate.url(),
        },
        validate.get("Url"))
    )

    def _get_streams(self):
        url_m = self.match
        domain = url_m.group(1) or url_m.group(2) or url_m.group(3) or url_m.group(4) or url_m.group(5)
        # remap the domain to channel
        channel = {"atv": "atvhd",
                   "ahaber": "ahaberhd",
                   "apara": "aparahd",
                   "aspor": "asporhd",
                   "anews": "anewshd",
                   "minikacocuk": "minikagococuk"}.get(domain, domain)
        hls_url = self._hls_url.format(channel=channel)
        # get the secure HLS URL
        res = self.session.http.get(self._token_url,
                                    params="url={0}".format(hls_url),
                                    headers={"Referer": self.url,
                                             "User-Agent": useragents.CHROME})

        secure_hls_url = self.session.http.json(res, schema=self._token_schema)

        log.debug("Found HLS URL: {0}".format(secure_hls_url))
        return HLSStream.parse_variant_playlist(self.session, secure_hls_url)

__plugin__ = Turkuvaz


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
	<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
		</layout>
	</appender>
	<appender name="R" class="org.apache.log4j.RollingFileAppender">
		<param name="file" value="log/metamorphose.log" />
		<param name="MaxFileSize" value="100KB" />
		<!-- Keep one backup file -->
		<param name="MaxBackupIndex" value="1" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
		</layout>
	</appender>
	<root>
		<priority value="debug" />
		<appender-ref ref="stdout" />
		<appender-ref ref="R" />
	</root>
</log4j:configuration>


text:
namespace ve
{
	struct Sample
	{
		std::string name;
		float startTime;
	};

	std::stack<Sample> samples;
	std::ofstream profileLog;

	float getSeconds()
	{
		return SDL_GetTicks() / 1000.0f;
	}

	void Profiler::initialize()
	{
		profileLog.open("profile.txt");
		profileLog.precision(5);
		profileLog << std::fixed;
	}

	void Profiler::finalize()
	{
		profileLog.close();
	}

	bool Profiler::isInitialized()
	{
		return profileLog.is_open();
	}

	void Profiler::startSample(std::string const & name)
	{
		if (samples.size() > 256)
		{
			throw std::runtime_error("Profiler start sample without end sample. ");
		}
		std::string spaces = " ";
		for (unsigned int i = 0; i < samples.size(); i++)
		{
			spaces += " ";
		}
		samples.push({spaces + name, getSeconds()});
		profileLog << getSeconds() << samples.top().name << " start" << std::endl;
	}

	void Profiler::endSample()
	{
		if(samples.size() == 0)
		{
			throw std::runtime_error("Profiler end sample without start sample. ");
		}
		Sample sample = samples.top();
		samples.pop();
		profileLog << getSeconds() << sample.name << " " << (getSeconds() - sample.startTime) << std::endl;
	}
}


text:
package org.ferris.prayer.console.email;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import org.apache.log4j.Logger;
import org.ferris.prayer.console.application.Application;
import static org.ferris.prayer.console.email.EmailEvent.RENDER_EMAIL_MESSAGE;
import org.ferris.prayer.console.message.MessageProperty;
import org.jboss.weld.experimental.Priority;

/**
 *
 * @author Michael Remijan mjremijan@yahoo.com @mjremijan
 */
public class EmailRenderer {

    @Inject
    protected Logger log;

    @Inject @MessageProperty("subject")
    protected String subjectTemplate;

    @Inject @MessageProperty("body")
    protected String bodyTemplate;

    @Inject @MessageProperty("message")
    protected String messageTemplate;

    @Inject @MessageProperty("version")
    protected String versionTemplate;

    @Inject
    protected Application application;

    public void render(
        @Observes @Priority(RENDER_EMAIL_MESSAGE) EmailEvent evnt
    ) {
        log.info("ENTER");

        // Subject
        {
            if (subjectTemplate.isEmpty()) {
                log.debug("No email subject to render..\n");
            } else {
                log.debug(String.format("Rendering email subject..\n"));
                evnt.setSubject(
                    String.format(
                          subjectTemplate
                        , new SimpleDateFormat("M/dd")
                            .format(Calendar.getInstance()
                            .getTime())
                    )
                );
            }
        }

        // Prayers
        log.debug(String.format("Rendering email content..\n"));
        StringBuilder prayers = new StringBuilder("");
        {
            evnt.getCategoriesForTheEmail().stream().forEach(
            c -> {
                prayers.append(
                    String.format("%s\n",
                        String.format(
                            messageTemplate
                            , c.getName()
                            , c.getLeastRecentlyPrayed().getTitle()
                            , c.getLeastRecentlyPrayed().getPrayer()
                        )
                    )
                );
            });
        }

        // Version
        StringBuilder version = new StringBuilder("");
        {
            if (versionTemplate.isEmpty()) {
                log.debug("No version footer to render..\n");
            } else {
                log.debug("Rendering version footer..\n");
                version.append(
                    String.format("%s\n",
                        String.format(
                            versionTemplate
                            , String.format("%s-%s", application.getTitle(), application.getVersion())
                            , application.getUrl()
                            , application.getUrl()
                        )
                    )
                );
            }
        }

        // Put everything together.
        String message =
           String.format(
               bodyTemplate
               , prayers.toString()
               , version.toString()
           );

        evnt.setMessage(message);
    }
}