text:
<!DOCTYPE html>

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

  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title></title>
  <meta name="description" content="">
  <meta name="keywords" content="">

<link rel="stylesheet" href="<?=base_url()?>/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="<?=base_url()?>/dist/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="<?=base_url()?>/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="<?=base_url()?>/dist/css/style.css">
  <link rel="stylesheet" href="<?=base_url()?>/dist/css/owl.carousel.css">
  <link rel="stylesheet" href="<?=base_url()?>/dist/css/jquery-ui.css">
  <link rel="stylesheet" href="<?=base_url()?>/dist/css/custom.css">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
   <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">

    <link rel="stylesheet" href="<?=base_url()?>/dist/css/AdminLTE.min.css">

    <link rel="stylesheet" href="<?=base_url()?>/plugins/iCheck/square/blue.css">

  <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,600,700" rel="stylesheet" type="text/css">

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        Toggle navigation

      </button>

       <img src="<?=base_url()?>dist/img/logov2.png" alt="" class="img-responsive">

Brands

How it Works

Social Influencers

FAQ

<a href="<?=base_url()?>login" class="btn btn-red">Login

Social Media Monetization Marketplace

          A revolutionary and premium social media monetization marketplace where celebrities, public figures, and influencers connects with brands and earns the highest RPMs.

              <a href="<?=base_url()?>register">
              <button type="button" class="btn   btn-success btn-sm">Sign up!</button>

 -OR Sign up as -

              <a href="<?=base_url()?>register/publisher">
              <button type="button" class="btn   btn-success btn-sm">Publisher!</button>

Connect Your Audience With Premium Marketplace

Connecting your social audience with brands is not always an easy task, especially when you don't know how your audience will react to certain brands.

At Radiumatic, we're trying to evolve digital advertising industry by connecting social media celebrities, artists, public figures, and other large influencers with the highest paying brands. Use your trust and engage your social followers to maximazine your earnings.

          <img src="<?=base_url()?>dist/img/connect-social-media.png" alt="" class="img-responsive">

          <img src="<?=base_url()?>dist/img/viral.png" alt="" class="img-responsive">

Most Viral & Engaging Content

The key to success in digital advertising is to discover the right content that your audience will engage with and appreciates in terms of revenue. Radiumatic creative team is constantly working with brands to craft original, custom content.

            "Establishing an online presence has multiple benefits, from the initial creation of viral content, it's ongoing dissemination, as well as its ultimate monetization."

Ken Poirot

HOW IT WORKS?

Signup at Radiumatic and join the premium marketplace of content distribution

 Generate and share engaging links from our easy to navigate campaigns page

Earn the highest RPMs by distributing the most engaging content created by some of the industry's biggest brands

Our Publishers Have Earned Over $100,000,00 Using

Dedicated Tools For Publishers

While developing Radiumatic our main goal was to focus on publishers and brands needs. Therefore, the Radiumatic team has built powerful dedicated tools for publishers and advertisers, while keeping them easy and simple to use.

Personal Assistance

Radiumatic creative and support team are determined to help publishers and advertiser 24x7 by responding to the questions, suggesting the ways to maximize earnings, and helping publishers on how to use our services.

Payments

At Radiumatic, we've created a very diversifying payment system. You can use our self withdrawal method or be a part of our scheldued payments using PayPal and Wire Transfer. We are determined to bring many more payment methods in future.

Higher Engaged Content

Discover and share the most viral and high engaging content using our lucrative campaigns. Our creative, video, and viral content teams work with brands to craft original, custom content.

FAQ

Learn more about the most frequently asked questions by our publishers.

What is Radiumatic?

Radiumatic is a premium marketplace to monetize your social media followers/audience. It simplifies the process of monezating your social audience by distributing the best content that suits your audience.

How do I signup for an account?

Becoming a publisher is easy and simple. Just go to our  registration page, and verify your account information including who you are and how would you like to get paid.

How and when do I get paid?

All payments at Radiumatic are instant and scheduled. A publisher can withdraw up to $500.00 in a given calendar month using self withdrawal. Scheduled Payments are processed when your earnings exceeds $500.00 USD (five hundred united states dollars) in NET 7 days i.e. after the last day of the given calendar month which excludes bank holidays.

What are the minimum thresholds

The minimum payment threshold for PayPal is $50.00 USD, and for wire transfers it's $500.00 USD.

What are the payment methods?

There are currently two payment options as of now: PayPal, and Wire Transfer.

What is Radiumatic's pricing model?

Radiumatic is a CPC (cost-per-click) platform.

About Us

Terms of Services

Privacy Policy

Payment Agreement

Help Center

Publishers

Terms of Services

Privacy Policy

Payment Agreement

Help Center

featured on

Terms of Services

Privacy Policy

Payment Agreement

Help Center

Terms of Services

Privacy Policy

Payment Agreement

Help Center

Copyright © 2016 Aquire.Social. All rights reserved.


text:
package com.azazar.bitcoin.jsonrpcclient;

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

/**
 *
 * @author Mikhail Yevchenko <m.ṥῥẚɱ.ѓѐḿởύḙ@azazar.com>
 */
public interface Bitcoin {

    //addmultisigaddress

    //addnode

    //backupwallet

    public static interface TxInput {
        public String txid();
        public int vout();
    }

    public static class BasicTxInput implements TxInput{
        public String txid;
        public int vout;

        public BasicTxInput(String txid, int vout) {
            this.txid = txid;
            this.vout = vout;
        }

        public String txid() {
            return txid;
        }

        public int vout() {
            return vout;
        }

    }

    public static interface TxOutput {
        public String address();
        public double amount();
    }

    public static class BasicTxOutput implements TxOutput{
        public String address;
        public double amount;

        public BasicTxOutput(String address, double amount) {
            this.address = address;
            this.amount = amount;
        }

        public String address() {
            return address;
        }

        public double amount() {
            return amount;
        }
    }

    /**
     * Use BitcoinRawTxBuilder , which is more convenient
     * @param inputs
     * @param outputs
     * @return
     * @throws BitcoinException
     */
    public String createRawTransaction(List<TxInput> inputs, List<TxOutput> outputs) throws BitcoinException;

    //decoderawtransaction

    public String dumpPrivKey(String address) throws BitcoinException;

    //encryptwallet

    public String getAccount(String address) throws BitcoinException;

    //getaccountaddress

    //getaddednodeinfo

    public List<String> getAddressesByAccount(String account) throws BitcoinException;

    /**
     *
     * @return returns the server's total available balance
     * @throws BitcoinException
     */
    public double getBalance() throws BitcoinException;

    /**
     *
     * @param account
     * @return returns the balance in the account
     * @throws BitcoinException
     */
    public double getBalance(String account) throws BitcoinException;

    /**
     *
     * @param account
     * @param minConf
     * @return returns the balance in the account
     * @throws BitcoinException
     */
    public double getBalance(String account, int minConf) throws BitcoinException;

    public static interface Block {
        public String hash();
        public int confirmations();
        public int size();
        public int height();
        public int version();
        public String merkleRoot();
        public List<String> tx();
        public Date time();
        public long nonce();
        public String bits();
        public double difficulty();
        public String previousHash();
        public String nextHash();
        public Block previous() throws BitcoinException;
        public Block next() throws BitcoinException;
    }
    public Block getBlock(String blockHash) throws BitcoinException;

    public int getBlockCount() throws BitcoinException;

    //getblockhash

    //getblocknumber - deprecated

    //getconnectioncount

    //getdifficulty

    //getgenerate

    //gethashespersec

    //getinfo

    //getmemorypool

    //getmininginfo

    //getnewaddress
    public String getNewAddress() throws BitcoinException;
    public String getNewAddress(String account) throws BitcoinException;

    //getpeerinfo

    //getrawmempool

    public String getRawTransactionHex(String txId) throws BitcoinException;

    public interface RawTransaction {
        public String hex();
        public String txId();
        public int version();
        public long lockTime();
        /*
         *
         */
        public interface In extends TxInput {
            public Map<String, Object> scriptSig();
            public long sequence();

            public RawTransaction getTransaction();
            public Out getTransactionOutput();
        }

        /**
         * This method should be replaced someday
         */
        public List<In> vIn(); // TODO : Create special interface instead of this

        public interface Out {
            public double value();
            public int n();

            public interface ScriptPubKey {
                public String asm();
                public String hex();
                public int reqSigs();
                public String type();
                public List<String> addresses();
            }

            public ScriptPubKey scriptPubKey();

            public TxInput toInput();

            public RawTransaction transaction();

        }

        /**
         * This method should be replaced someday
         */
        public List<Out> vOut(); // TODO : Create special interface instead of this
        public String blockHash();
        public int confirmations();
        public Date time();
        public Date blocktime();
    }

    public RawTransaction getRawTransaction(String txId) throws BitcoinException;

    //getreceivedbyaccount

    public double getReceivedByAddress(String address) throws BitcoinException;
    /**
     * Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations. While some might
     * consider this obvious, value reported by this only considers *receiving* transactions. It does not check payments that have been made
     * *from* this address. In other words, this is not "getaddressbalance". Works only for addresses in the local wallet, external
     * addresses will always show 0.
     *
     * @param address
     * @param minConf
     * @return the total amount received by <bitcoinaddress>
     */
    public double getReceivedByAddress(String address, int minConf) throws BitcoinException;

    //gettransaction

    //getwork

    //help

    public void importPrivKey(String bitcoinPrivKey) throws BitcoinException;
    public void importPrivKey(String bitcoinPrivKey, String label) throws BitcoinException;
    public void importPrivKey(String bitcoinPrivKey, String label, boolean rescan) throws BitcoinException;

    //keypoolrefill

    /**
     * listaccounts [minconf=1]
     *
     * @return Map that has account names as keys, account balances as values
     * @throws BitcoinException
     */
    public Map<String, Number> listAccounts() throws BitcoinException;
    public Map<String, Number> listAccounts(int minConf) throws BitcoinException;

    //listaddressgroupings

    //listreceivedbyaccount

    public static interface ReceivedAddress {
        public String address();
        public String account();
        public double amount();
        public int confirmations();
    }

    public List<ReceivedAddress> listReceivedByAddress() throws BitcoinException;
    public List<ReceivedAddress> listReceivedByAddress(int minConf) throws BitcoinException;
    public List<ReceivedAddress> listReceivedByAddress(int minConf, boolean includeEmpty) throws BitcoinException;

    /**
     * returned by listsinceblock and  listtransactions
     */
    public static interface Transaction {
        public String account();
        public String address();
        public String category();
        public double amount();
        public double fee();
        public int confirmations();
        public String blockHash();
        public int blockIndex();
        public Date blockTime();
        public String txId();
        public Date time();
        public Date timeReceived();
        public String comment();
        public String commentTo();

        public RawTransaction raw();
    }

    //listsinceblock
    public static interface TransactionsSinceBlock {
        public List<Transaction> transactions();
        public String lastBlock();
    }

    public TransactionsSinceBlock listSinceBlock() throws BitcoinException;
    public TransactionsSinceBlock listSinceBlock(String blockHash) throws BitcoinException;
    public TransactionsSinceBlock listSinceBlock(String blockHash, int targetConfirmations) throws BitcoinException;

    //listtransactions
    public List<Transaction> listTransactions() throws BitcoinException;
    public List<Transaction> listTransactions(String account) throws BitcoinException;
    public List<Transaction> listTransactions(String account, int count) throws BitcoinException;
    public List<Transaction> listTransactions(String account, int count, int from) throws BitcoinException;

    public interface Unspent extends TxInput, TxOutput {
        public String txid();
        public int vout();
        public String address();
        public String account();
        public String scriptPubKey();
        public double amount();
        public int confirmations();
    }

    public List<Unspent> listUnspent() throws BitcoinException;
    public List<Unspent> listUnspent(int minConf) throws BitcoinException;
    public List<Unspent> listUnspent(int minConf, int maxConf) throws BitcoinException;
    public List<Unspent> listUnspent(int minConf, int maxConf, String... addresses) throws BitcoinException;

    //listlockunspent

    //lockunspent

    //move

    public String sendFrom(String fromAccount, String toBitcoinAddress, double amount) throws BitcoinException;
    public String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf) throws BitcoinException;
    public String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf, String comment) throws BitcoinException;
    /**
     * Will send the given amount to the given address, ensuring the account has a valid balance using minConf confirmations.
     * @param fromAccount
     * @param toBitcoinAddress
     * @param amount is a real and is rounded to 8 decimal places
     * @param minConf
     * @return the transaction ID if successful
     * @throws BitcoinException
     */
    public String sendFrom(String fromAccount, String toBitcoinAddress, double amount, int minConf, String comment, String commentTo) throws BitcoinException;

    //sendmany

    public String sendRawTransaction(String hex) throws BitcoinException;

    public String sendToAddress(String toAddress, double amount) throws BitcoinException;
    public String sendToAddress(String toAddress, double amount, String comment) throws BitcoinException;
    /**
     *
     * @param toAddress
     * @param amount is a real and is rounded to 8 decimal places
     * @param comment
     * @param commentTo
     * @return the transaction ID <txid> if successful
     * @throws BitcoinException
     */
    public String sendToAddress(String toAddress, double amount, String comment, String commentTo) throws BitcoinException;

    //setaccount

    //setgenerate

    //signmessage

    public String signRawTransaction(String hex) throws BitcoinException;

    //settxfee

    //stop

    public static interface AddressValidationResult {
        public boolean isValid();
        public String address();
        public boolean isMine();
        public boolean isScript();
        public String pubKey();
        public boolean isCompressed();
        public String account();
    }

    public AddressValidationResult validateAddress(String address) throws BitcoinException;

    //verifymessage

    //walletlock

    //walletpassphrase

    //walletpassphrasechange

}

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * Studioforty9_Pubble_Helper_Data
 *
 * @category   Studioforty9
 * @package    Studioforty9_Pubble
 * @subpackage Helper
 */
class Studioforty9_Pubble_Helper_Data extends Mage_Core_Helper_Abstract
{
    /**#@+
     * Configuration Method Types
     * @var int
     */
    const METHOD_CREDENTIALS = 1;
    const METHOD_COPYPASTE   = 2;
    /**#@-*/

    /**
     * Determine whether the module is enabled via admin configuration.
     *
     * @return bool
     */
    public function isEnabled()
    {
        return Mage::getStoreConfigFlag('studioforty9_pubble/messenger/enabled');
    }

    /**
     * Get the method configuration type.
     *
     * @return int
     */
    public function getMethod()
    {
        return (int) Mage::getStoreConfig('studioforty9_pubble/messenger/method');
    }

    /**
     * Determine if the method type is 'credentials'.
     *
     * @return bool
     */
    public function isMethodCredentials()
    {
        return ($this->getMethod() === static::METHOD_CREDENTIALS);
    }

    /**
     * Determine if the method type is 'copy and paste'.
     *
     * @return bool
     */
    public function isMethodCopyPaste()
    {
        return ($this->getMethod() === static::METHOD_COPYPASTE);
    }

    /**
     * Get the configuration setting for App Id.
     *
     * @return int
     */
    public function getAppId()
    {
        return Mage::getStoreConfig('studioforty9_pubble/messenger/app_id');
    }

    /**
     * Get the configuration setting for Identifier.
     *
     * @return int
     */
    public function getIdentifier()
    {
        return Mage::getStoreConfig('studioforty9_pubble/messenger/identifier');
    }

    /**
     * Get the copy and pasted code from Pubble saved in the configuration.
     *
     * @return int
     */
    public function getCode()
    {
        return Mage::getStoreConfig('studioforty9_pubble/messenger/code');
    }
}


text:
package com.brig.parser.visitor.global.block.statement.node.expression;

import com.brig.parser.domain.Scope;
import com.brig.parser.domain.wrapper.TypeWrapper;
import com.brig.parser.util.ConstantValue;
import com.brig.parser.visitor.global.block.statement.node.expression.atom.AtomVisitor;

import generated.brigParser;
import generated.brigBaseVisitor;

public class ExpressionVisitor extends brigBaseVisitor<TypeWrapper> {

	private ExpressionVisitor expressionVisitor;
	private AtomVisitor atomVisitor;
	private Scope scope;

	public ExpressionVisitor(Scope scope){
		this.scope = scope;
		this.expressionVisitor = this;
		this.atomVisitor = new AtomVisitor(this.scope);
	}

    @Override
    public TypeWrapper visitRelationalExpr(brigParser.RelationalExprContext ctx) {
    	TypeWrapper left = ctx.expression(0).accept(expressionVisitor);
    	TypeWrapper right = ctx.expression(1).accept(expressionVisitor);
        switch (ctx.op.getType()) {
            case brigParser.LT:
                return new TypeWrapper(left.asInteger() < right.asInteger());
            case brigParser.LTEQ:
                return new TypeWrapper(left.asInteger() <= right.asInteger());
            case brigParser.GT:
                return new TypeWrapper(left.asInteger() > right.asInteger());
            case brigParser.GTEQ:
                return new TypeWrapper(left.asInteger() >= right.asInteger());
            default:
                throw new RuntimeException("unknown operator: " + brigParser.tokenNames[ctx.op.getType()]);
        }
    }

    @Override
    public TypeWrapper visitEqualityExpr( brigParser.EqualityExprContext ctx) {
    	TypeWrapper left = ctx.expression(0).accept(expressionVisitor);
    	TypeWrapper right = ctx.expression(1).accept(expressionVisitor);

    	switch (ctx.op.getType()) {
            case brigParser.EQ:
                return left.isInteger() && right.isInteger() ?
                        new TypeWrapper(Math.abs(left.asInteger() - right.asInteger()) < ConstantValue.SMALL_VALUE) :
                        new TypeWrapper(left.equals(right));
            case brigParser.NEQ:
                return left.isInteger() && right.isInteger() ?
                        new TypeWrapper(Math.abs(left.asInteger() - right.asInteger()) >= ConstantValue.SMALL_VALUE) :
                        new TypeWrapper(!left.equals(right));
            default:
                throw new RuntimeException("unknown operator: " + brigParser.tokenNames[ctx.op.getType()]);
        }
    }

    @Override
    public TypeWrapper visitMultiplicationExpr(brigParser.MultiplicationExprContext ctx) {
    	TypeWrapper left = ctx.expression(0).accept(expressionVisitor);
    	TypeWrapper right = ctx.expression(1).accept(expressionVisitor);

        switch (ctx.op.getType()) {
            case brigParser.MULT:
                return new TypeWrapper(left.asInteger() * right.asInteger());
            case brigParser.DIV:
                return new TypeWrapper(left.asInteger() / right.asInteger());
            case brigParser.MOD:
                return new TypeWrapper(left.asInteger() % right.asInteger());
            default:
                throw new RuntimeException("unknown operator: " + brigParser.tokenNames[ctx.op.getType()]);
        }
    }

    @Override
    public TypeWrapper visitAdditiveExpr(brigParser.AdditiveExprContext ctx) {
    	TypeWrapper left = ctx.expression(0).accept(expressionVisitor);
    	TypeWrapper right = ctx.expression(1).accept(expressionVisitor);

        switch (ctx.op.getType()) {
            case brigParser.PLUS:
                return left.isInteger() && right.isInteger() ?
                        new TypeWrapper(left.asInteger() + right.asInteger()) :
                        new TypeWrapper(left.asString() + right.asString());
            case brigParser.MINUS:
                return new TypeWrapper(left.asInteger() - right.asInteger());
            default:
                throw new RuntimeException("unknown operator: " + brigParser.tokenNames[ctx.op.getType()]);
        }
    }

    @Override
    public TypeWrapper visitParExpr(brigParser.ParExprContext ctx) {
        return ctx.expression().accept(expressionVisitor);
    }

	@Override public TypeWrapper visitAtomExpr(brigParser.AtomExprContext ctx) {
		return ctx.accept(atomVisitor);
	}

}


text:
using AspectCore.Abstractions.Internal;
using AspectCore.Abstractions.Internal.Test.Fakes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Xunit;

namespace AspectCore.Abstractions.Internal.Test
{
    public class InterceptorMatcherTest
    {
        [Fact]
        public void WithOutInterceptor_Test()
        {
            var Configure = new AspectConfigure();

            var matcher = new InterceptorMatcher(Configure);

            var method = ReflectionExtensions.GetMethod<Action<InterceptorMatcherModel>>(m => m.WithOutInterceptor());

            var interceptors = matcher.Select(method, method.DeclaringType.GetTypeInfo());

            Assert.Empty(interceptors);
        }

        [Fact]
        public void With_Configure_Interceptor_Test()
        {
            var Configure = new AspectConfigure();

            var ConfigureInterceptor = new InjectedInterceptor();
            Configure.GetConfigureOption<IInterceptor>().Add(m => ConfigureInterceptor);

            var matcher = new InterceptorMatcher(Configure);
            var method = ReflectionExtensions.GetMethod<Action<InterceptorMatcherModel>>(m => m.ConfigureInterceptor());

            var interceptors = matcher.Select(method, method.DeclaringType.GetTypeInfo());

            Assert.NotEmpty(interceptors);

            Assert.Single(interceptors, ConfigureInterceptor);
        }

        [Fact]
        public void With_Method_Interceptor_Test()
        {
            var Configure = new AspectConfigure();

            var matcher = new InterceptorMatcher(Configure);
            var method = ReflectionExtensions.GetMethod<Action<InterceptorMatcherModel>>(m => m.WithInterceptor());

            var interceptors = matcher.Select(method, method.DeclaringType.GetTypeInfo());

            Assert.NotEmpty(interceptors);
            Assert.Single(interceptors);
        }

        [Fact]
        public void With_Type_Interceptor_Test()
        {
            var Configure = new AspectConfigure();

            var matcher = new InterceptorMatcher(Configure);
            var method = ReflectionExtensions.GetMethod<Action<WithInterceptorMatcherModel>>(m => m.WithOutInterceptor());

            var interceptors = matcher.Select(method, typeof(WithInterceptorMatcherModel).GetTypeInfo());

            Assert.NotEmpty(interceptors);
            Assert.Single(interceptors);
        }
    }
}


text:
namespace NPOI.HWPF.Converter
{
    using System;
    using System.Collections.Generic;
    using System.Xml;
    using NPOI.HPSF;
    using NPOI.HWPF;
    using NPOI.HWPF.UserModel;
    using NPOI.POIFS.FileSystem;
    using NPOI.Util;
    using System.Reflection;

    public class WordToTextConverter : AbstractWordConverter
    {
        private static POILogger logger = POILogFactory
                .GetLogger(typeof(WordToTextConverter));

        public static String GetText( DirectoryNode root )
        {
             HWPFDocumentCore wordDocument = AbstractWordUtils.LoadDoc( root );
            return GetText( wordDocument );
        }

        public static String GetText(string docFile)
        {
            HWPFDocumentCore wordDocument = AbstractWordUtils
                   .LoadDoc(docFile);
            return GetText(wordDocument);
        }

        public static String GetText(HWPFDocumentCore wordDocument)
        {
            WordToTextConverter wordToTextConverter = new WordToTextConverter(new XmlDocument());
            wordToTextConverter.ProcessDocument(wordDocument);
            return wordToTextConverter.GetText();
        }

        public static XmlDocument Process(string docFile)
        {
            HWPFDocumentCore wordDocument = AbstractWordUtils
                   .LoadDoc(docFile);
            WordToTextConverter wordToTextConverter = new WordToTextConverter(new XmlDocument());
            wordToTextConverter.ProcessDocument(wordDocument);
            return wordToTextConverter.Document;
        }

        //private AtomicInteger noteCounters = new AtomicInteger(1);
        private int noteCounters = 1;
        private object objCounters = new object();

        private XmlElement notes = null;

        private bool outputSummaryInformation = false;

        private TextDocumentFacade textDocumentFacade;

        /**
         * Creates new instance of {@link WordToTextConverter}. Can be used for
         * output several {@link HWPFDocument}s into single text document.
         *
         * @throws ParserConfigurationException
         *             if an internal {@link DocumentBuilder} cannot be created
         */
        public WordToTextConverter()
        {
            this.textDocumentFacade = new TextDocumentFacade(new XmlDocument());
        }

        /**
         * Creates new instance of {@link WordToTextConverter}. Can be used for
         * output several {@link HWPFDocument}s into single text document.
         *
         * @param document
         *            XML DOM XmlDocument used as storage for text pieces
         */
        public WordToTextConverter(XmlDocument document)
        {
            this.textDocumentFacade = new TextDocumentFacade(document);
        }

        protected override void AfterProcess()
        {
            if (notes != null)
                textDocumentFacade.Body.AppendChild(notes);
        }

        public override XmlDocument Document
        {
            get
            {
                return textDocumentFacade.Document;
            }
        }

        public String GetText()
        {
            //StringWriter stringWriter = new StringWriter();
            //DOMSource domSource = new DOMSource( GetDocument() );
            //StreamResult streamResult = new StreamResult( stringWriter );

            //TransformerFactory tf = TransformerFactory.NewInstance();
            //Transformer serializer = tf.NewTransformer();
            //// TODO set encoding from a command argument
            //serializer.SetOutputProperty( OutputKeys.ENCODING, "UTF-8" );
            //serializer.SetOutputProperty( OutputKeys.INDENT, "no" );
            //serializer.SetOutputProperty( OutputKeys.METHOD, "text" );
            //serializer.Transform( domSource, streamResult );

            //return stringWriter.ToString();
            return textDocumentFacade.Document.InnerText;
        }

        public bool IsOutputSummaryInformation()
        {
            return outputSummaryInformation;
        }

        protected override void OutputCharacters(XmlElement block, CharacterRun characterRun,
                String text)
        {
            block.AppendChild(textDocumentFacade.CreateText(text));
        }

        protected override void ProcessBookmarks(HWPFDocumentCore wordDocument,
                XmlElement currentBlock, Range range, int currentTableLevel,
                IList<Bookmark> rangeBookmarks)
        {
            ProcessCharacters(wordDocument, currentTableLevel, range, currentBlock);
        }

        protected override void ProcessDocumentInformation(
                SummaryInformation summaryInformation)
        {
            if (IsOutputSummaryInformation())
            {
                if (!string.IsNullOrEmpty(summaryInformation.Title))
                    textDocumentFacade.Title = (summaryInformation.Title);

                if (!string.IsNullOrEmpty(summaryInformation.Author))
                    textDocumentFacade.AddAuthor(summaryInformation.Author);

                if (!string.IsNullOrEmpty(summaryInformation.Comments))
                    textDocumentFacade.AddDescription(summaryInformation.Comments);

                if (!string.IsNullOrEmpty(summaryInformation.Keywords))
                    textDocumentFacade.AddKeywords(summaryInformation.Keywords);
            }
        }

        protected override void ProcessDocumentPart(HWPFDocumentCore wordDocument,
                Range range)
        {
            base.ProcessDocumentPart(wordDocument, range);
            AfterProcess();
        }

        protected override void ProcessDrawnObject(HWPFDocument doc,
                CharacterRun characterRun, OfficeDrawing officeDrawing,
                String path, XmlElement block)
        {
            // ignore
        }

        protected override void ProcessEndnoteAutonumbered(HWPFDocument wordDocument,
                int noteIndex, XmlElement block, Range endnoteTextRange)
        {
            ProcessNote(wordDocument, block, endnoteTextRange);
        }
        protected override void ProcessFootnoteAutonumbered(HWPFDocument wordDocument,
                int noteIndex, XmlElement block, Range footnoteTextRange)
        {
            ProcessNote(wordDocument, block, footnoteTextRange);
        }

        protected override void ProcessHyperlink(HWPFDocumentCore wordDocument,
                XmlElement currentBlock, Range textRange, int currentTableLevel,
                String hyperlink)
        {
            ProcessCharacters(wordDocument, currentTableLevel, textRange,
                    currentBlock);

            currentBlock.AppendChild(textDocumentFacade.CreateText(" ("
                    + UNICODECHAR_ZERO_WIDTH_SPACE
                    + hyperlink.Replace("\\/", UNICODECHAR_ZERO_WIDTH_SPACE
                            + "\\/" + UNICODECHAR_ZERO_WIDTH_SPACE)
                    + UNICODECHAR_ZERO_WIDTH_SPACE + ")"));
        }

        protected override void ProcessImage(XmlElement currentBlock, bool inlined,
                Picture picture)
        {
            // ignore
        }

        protected override void ProcessLineBreak(XmlElement block, CharacterRun characterRun)
        {
            block.AppendChild(textDocumentFacade.CreateText("\n"));
        }

        protected void ProcessNote(HWPFDocument wordDocument, XmlElement block,
                Range noteTextRange)
        {
            int noteIndex;
            lock (objCounters)
            {
                noteIndex = noteCounters++;
            }
            block.AppendChild(textDocumentFacade
                    .CreateText(UNICODECHAR_ZERO_WIDTH_SPACE + "[" + noteIndex
                            + "]" + UNICODECHAR_ZERO_WIDTH_SPACE));

            if (notes == null)
                notes = textDocumentFacade.CreateBlock();

            XmlElement note = textDocumentFacade.CreateBlock();
            notes.AppendChild(note);

            note.AppendChild(textDocumentFacade.CreateText("^" + noteIndex
                    + "\t "));
            ProcessCharacters(wordDocument, int.MinValue, noteTextRange, note);
            note.AppendChild(textDocumentFacade.CreateText("\n"));
        }

        protected override bool ProcessOle2(HWPFDocument wordDocument, XmlElement block, Entry entry)
        {
            if (!(entry is DirectoryNode))
                return false;
            DirectoryNode directoryNode = (DirectoryNode)entry;

            /*
             * even if there is no ExtractorFactory in classpath, still support
             * included Word's objects
             */

            //TODO: Not completed
            if ( directoryNode.HasEntry( "WordDocument" ) )
            {
                String text = WordToTextConverter.GetText( (DirectoryNode) entry );
                block.AppendChild( textDocumentFacade
                        .CreateText( UNICODECHAR_ZERO_WIDTH_SPACE + text
                                + UNICODECHAR_ZERO_WIDTH_SPACE ) );
                return true;
            }

            Object extractor;

            /*try
            {
                Class<?> cls = Class
                        .ForName( "org.apache.poi.extractor.ExtractorFactory" );
                Method createExtractor = cls.GetMethod( "createExtractor",
                        DirectoryNode.class );
                extractor = createExtractor.Invoke( null, directoryNode );
            }
            catch ( Error exc )
            {
                // no extractor in classpath
                logger.Log( POILogger.WARN, "There is an OLE object entry '",
                        entry.GetName(),
                        "', but there is no text extractor for this object type ",
                        "or text extractor factory is not available: ", "" + exc );
                return false;
            }

            try
            {
                Method getText = extractor.GetClass().GetMethod( "getText" );
                String text = (String) getText.Invoke( extractor );

                block.AppendChild( textDocumentFacade
                        .CreateText( UNICODECHAR_ZERO_WIDTH_SPACE + text
                                + UNICODECHAR_ZERO_WIDTH_SPACE ) );
                return true;
            }
            catch ( Exception exc )
            {
                logger.Log( POILogger.ERROR,
                        "Unable to extract text from OLE entry '", entry.GetName(),
                        "': ", exc, exc );
                return false;
            }
             * */
            return false;
        }

        protected override void ProcessPageBreak(HWPFDocumentCore wordDocument, XmlElement flow)
        {
            XmlElement block = textDocumentFacade.CreateBlock();
            block.AppendChild(textDocumentFacade.CreateText("\n"));
            flow.AppendChild(block);
        }

        protected override void ProcessPageref(HWPFDocumentCore wordDocument,
                XmlElement currentBlock, Range textRange, int currentTableLevel,
                String pageref)
        {
            ProcessCharacters(wordDocument, currentTableLevel, textRange,
                    currentBlock);
        }

        protected override void ProcessParagraph(HWPFDocumentCore wordDocument,
                XmlElement parentElement, int currentTableLevel, Paragraph paragraph,
                String bulletText)
        {
            XmlElement pElement = textDocumentFacade.CreateParagraph();
            pElement.AppendChild(textDocumentFacade.CreateText(bulletText));
            ProcessCharacters(wordDocument, currentTableLevel, paragraph, pElement);
            pElement.AppendChild(textDocumentFacade.CreateText("\n"));
            parentElement.AppendChild(pElement);
        }

        protected override void ProcessSection(HWPFDocumentCore wordDocument,
                NPOI.HWPF.UserModel.Section section, int s)
        {
            XmlElement sectionElement = textDocumentFacade.CreateBlock();
            ProcessParagraphes(wordDocument, sectionElement, section, int.MinValue);
            sectionElement.AppendChild(textDocumentFacade.CreateText("\n"));
            textDocumentFacade.Body.AppendChild(sectionElement);
        }

        protected override void ProcessTable(HWPFDocumentCore wordDocument, XmlElement flow,
                Table table)
        {
            int tableRows = table.NumRows;
            for (int r = 0; r < tableRows; r++)
            {
                TableRow tableRow = table.GetRow(r);

                XmlElement tableRowElement = textDocumentFacade.CreateTableRow();

                int rowCells = tableRow.NumCells();
                for (int c = 0; c < rowCells; c++)
                {
                    TableCell tableCell = tableRow.GetCell(c);

                    XmlElement tableCellElement = textDocumentFacade.CreateTableCell();

                    if (c != 0)
                        tableCellElement.AppendChild(textDocumentFacade
                                .CreateText("\t"));
                    ProcessCharacters(wordDocument, table.TableLevel, tableCell, tableCellElement);
                    tableRowElement.AppendChild(tableCellElement);
                }

                tableRowElement.AppendChild(textDocumentFacade.CreateText("\n"));
                flow.AppendChild(tableRowElement);
            }
        }

        public void SetOutputSummaryInformation(bool outputDocumentInformation)
        {
            this.outputSummaryInformation = outputDocumentInformation;
        }

    }
}


text:
=head1 LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute

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.

=cut

=head1 NAME

BEDSerializer - Feature to BED converter

=head1 SYNOPSIS

use Bio::EnsEMBL::Utils::IO::BEDSerializer;

=head1 DESCRIPTION

Subclass of Serializer that can turn a feature into a line for the BED format.

=cut

package Bio::EnsEMBL::Utils::IO::BEDSerializer;

use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception;
use URI::Escape;
use Bio::EnsEMBL::Utils::IO::FeatureSerializer;
use Bio::EnsEMBL::Utils::Scalar qw/check_ref/;

use base qw(Bio::EnsEMBL::Utils::IO::FeatureSerializer);

=head2 new

    Constructor
    Arg [1]    : Ontology Adaptor
    Arg [2]    : Optional File handle
    Arg [3]    : Default source of the features. Defaults to .

    Returntype : Bio::EnsEMBL::Utils::IO::GFFSerializer

=cut

sub new {
    my $class = shift;
    my $self = {
        filehandle => shift
    };
    bless $self, $class;

    if (!defined ($self->{'filehandle'})) {
        # no file handle, let the handle point to a copy of STDOUT instead
        open $self->{'filehandle'}, ">&STDOUT";
        $self->{'stdout'} = 1;
    }
    return $self;
}

=head2 print_feature

    Arg [1]    : Bio::EnsEMBL::Feature, subclass or related pseudo-feature
    Example    : $reporter->print_feature($feature,$slice_start_coordinate,"X")
    Description: Asks a feature for its summary, and generates a BED
                 compliant entry to hand back again
    Returntype : none
=cut

sub print_feature {
  my ($self, $feature, $cache) = @_;
  return unless $feature;
  my $bed_array;
  if($feature->isa('Bio::EnsEMBL::Transcript')) {
    $bed_array = $self->_write_Transcript($feature, $cache);
  }
  else {
    $bed_array = $self->_feature_to_bed_array($feature, $cache);
  }
  my $bed_line = join("\t", @{$bed_array});
  my $fh = $self->{'filehandle'};
  print $fh $bed_line, "\n";
  return 1;
}

sub _write_Transcript {
  my ($self, $transcript) = @_;

  # Not liking this. If we are in this situation we need to re-fetch the transcript
  # just so the thing ends up on the right Slice!
  my $new_transcript = $transcript->transfer($transcript->slice()->seq_region_Slice());
  $new_transcript->get_all_Exons(); # force exon loading
  my $bed_array = $self->_feature_to_bed_array($transcript);
  my $bed_genomic_start = $bed_array->[1]; #remember this is in 0 coords
  my ($coding_start, $coding_end, $exon_starts_string, $exon_lengths_string, $exon_count, $rgb) = (0,0,q{},q{},0,0);

  # If we have a translation then we do some maths to calc the start of
  # the thick sections. Otherwise we must have a ncRNA or pseudogene
  # and that thick section is just set to the transcript's end
  if($new_transcript->translation()) {
    my ($cdna_start, $cdna_end) = ($new_transcript->cdna_coding_start(), $new_transcript->cdna_coding_end);
    if($new_transcript->strand() == -1) {
      ($cdna_start, $cdna_end) = ($cdna_end, $cdna_start);
    }
    # Rules are if it's got a coding start we will use it; if not we use the cDNA
    $coding_start = $self->_cdna_to_genome($new_transcript, $cdna_start);
    $coding_start--; # convert to 0 based coords

    #Same again but for the end
    $coding_end = $self->_cdna_to_genome($new_transcript, $cdna_end);
  }
  else {
    # apparently looking at UCSC's own BED output formats we do not need to bother
    # coverting $coding_start into 0 based coords for this one ... odd
    $coding_start = $new_transcript->seq_region_end();
    $coding_end = $coding_start;
  }

  # Now for the interesting bit. Exons are given relative to the bed start
  # so we need to calculate the offset. Lovely.
  # Also sort exons by start otherwise offset calcs are wrong
  foreach my $exon (sort { $a->seq_region_start() <=> $b->seq_region_start() } @{$new_transcript->get_all_Exons()}) {
    my $exon_start = $exon->seq_region_start();
    $exon_start--; #move into 0 coords
    my $offset = $exon_start - $bed_genomic_start; # just have to minus current start from the genomic start
    $exon_starts_string .= $offset.',';
    $exon_lengths_string .= $exon->length().',';
    $exon_count++;
  }

  push(@{$bed_array}, $coding_start, $coding_end, $rgb, $exon_count, $exon_lengths_string, $exon_starts_string);
  return $bed_array;
}

sub _cdna_to_genome {
  my ($self, $transcript, $coord) = @_;
  my @mapped = $transcript->cdna2genomic($coord, $coord);
  my $genomic_coord = $mapped[0]->start();
  return $genomic_coord;
}

=head2 _feature_to_bed_array

  Arg [1]     : Bio::EnsEMBL::Feature
                The Feature to encode
  Arg [2]     : HashRef
                Cache of retrieved Slice names.
  Description : Takes a feature and returns an extended BED record consumed up to field
                6 of the format (strand). Score is left as 0
  Returntype  : ArrayRef of fields encoded as
                [chr, start, end, display, 0, strand]

=cut

sub _feature_to_bed_array {
  my ($self, $feature, $cache) = @_;
  my $chr_name = $self->_feature_to_UCSC_name($feature, $cache);
  my $start = $feature->seq_region_start() - 1;
  my $end = $feature->seq_region_end();
  my $strand = ($feature->seq_region_strand() == -1) ? '-' : '+';
  my $display_id = $feature->display_id();
  return [ $chr_name, $start, $end, $display_id, 0, $strand ];
}

=head2 _feature_to_UCSC_name

  Arg [1]     : Bio::EnsEMBL::Feature
                Feature object whose seq_region_name must be converted
  Arg [2]     : HashRef
                Cache of retrieved names. Here because we are unaware of the
                lifetime of a View in Catalyst (is it persistent between requests)
  Description : Attempts to figure out what UCSC calls this Slice. First we
                consult the synonyms attached to the Slice, then ask if it is a chromsome
                (accounting for MT -> chrM) and adding a chr to the name if it was a reference
                Slice. If it was none of these the name is just passed through
  Returntype  : String of the UCSC name

=cut

sub _feature_to_UCSC_name {
  my ($self, $feature, $cache) = @_;
  my $seq_region_name = $feature->seq_region_name();

  #Return if the name was already defined (we assume we work within a single species)
  return $cache->{$seq_region_name} if exists $cache->{$seq_region_name};

  if(! $feature->can('slice')) {
    return $cache->{$seq_region_name} = $seq_region_name;
  }
  my $slice = $feature->slice();
  my $ucsc_name;
  my $has_adaptor = ($slice->adaptor()) ? 1 : 0;
  if($has_adaptor) { # if it's got an adaptor we can lookup synonyms
    my $synonyms = $slice->get_all_synonyms('UCSC');
    if(@{$synonyms}) {
      $ucsc_name = $synonyms->[0]->name();
    }
  }
  if(! defined $ucsc_name) {
    # if it's a chromosome then we can test a few more things
    if($slice->is_chromosome()) {
      #MT is a special case; it's chrM
      if($seq_region_name eq 'MT' ) {
        $ucsc_name = 'chrM';
      }
      # If it was a ref region add chr onto it (only check if we have an adaptor)
      elsif($has_adaptor && $slice->is_reference()) {
        $ucsc_name = 'chr'.$seq_region_name;
      }
    }
  }
  #Leave it as the seq region name otherwise
  $ucsc_name = $seq_region_name if ! defined $ucsc_name;
  $cache->{$seq_region_name} = $ucsc_name;
  return $ucsc_name;
}

1;


text:
class TimelineView : public QAbstractScrollArea {
  Q_OBJECT

public:
  TimelineView(matrix::Room &room, QWidget *parent = nullptr);

  void end_batch(const QString &token);
  // Call upon receiving a new batch, with that batch's prev_batch token.

  void push_back(const matrix::RoomState &state, const matrix::proto::Event &e);

  void reset();
  // Call if a gap arises in events

  QSize sizeHint() const override;
  QSize minimumSizeHint() const override;

  BlockRenderInfo block_info() const;

  void push_error(const QString &message);

  void read_events();
  // Send read receipt for the most recent visible event

protected:
  void paintEvent(QPaintEvent *event) override;
  void resizeEvent(QResizeEvent *event) override;
  void showEvent(QShowEvent *event) override;
  void mousePressEvent(QMouseEvent *event) override;
  void mouseReleaseEvent(QMouseEvent *event) override;
  void mouseMoveEvent(QMouseEvent *event) override;
  void focusOutEvent(QFocusEvent *event) override;
  void contextMenuEvent(QContextMenuEvent *event) override;
  bool viewportEvent(QEvent *event) override;

private:
  struct Batch {
    std::deque<Event> events;  // deque purely so we don't try to copy/move QTextLayout
    QString token;

    size_t size() const;
  };

  struct Avatar {
    size_t references = 0;
    QPixmap pixmap;
  };

  struct Selection {
    Block *start;               // Point where selection began
    QPointF start_pos;           // relative to start origin
    Block *end;                  // Point where selection completed
    QPointF end_pos;             // relative to end origin
  };

  struct VisibleBlock {
    Block *block;
    QRectF bounds;               // relative to view
  };

  class SelectionScanner {
  public:
    SelectionScanner(const std::experimental::optional<Selection> &s) : s_(s) {}

    void advance(const Block *b) {
      inside_selection_ &= !ending_selection();
      starting_ = false;
      ending_ = false;
      check_starting(b);
    }

    bool on_selection_edge(const Block *b) const { return s_ && (b == s_->start || b == s_->end); }
    bool starting_selection() const { return starting_; }
    bool ending_selection() const { return ending_; }
    bool fully_selected(const Block *b) const { return inside_selection_ && !on_selection_edge(b); }
    std::experimental::optional<QPointF> start_point() const {
      return starting_selection()
        ? std::experimental::optional<QPointF>(selection_starts_at_start_ ? s_->start_pos : s_->end_pos)
        : std::experimental::optional<QPointF>();
    }
    std::experimental::optional<QPointF> end_point() const {
      return ending_selection()
        ? std::experimental::optional<QPointF>(selection_starts_at_start_ ? s_->end_pos : s_->start_pos)
        : std::experimental::optional<QPointF>();
    }

  private:
    const std::experimental::optional<Selection> &s_;

    bool inside_selection_ = false;
    bool selection_starts_at_start_;

    bool starting_ = false;
    bool ending_ = false;

    void check_starting(const Block *b) {
      starting_ = !inside_selection_ && on_selection_edge(b);
      ending_ = on_selection_edge(b) && (inside_selection_ || s_->start == s_->end);
      inside_selection_ |= starting_;
      if(starting_) selection_starts_at_start_ = b == s_->start;
    }
  };

  matrix::Room &room_;
  matrix::RoomState initial_state_;
  std::deque<Batch> batches_;  // deque so we can add/remote batches from either end
  std::deque<Block> blocks_;   // what actually gets drawn
  size_t total_events_;
  bool head_color_alternate_;
  bool backlog_growing_;
  bool backlog_growable_;  // false iff we've found the room create message
  bool backlog_grow_cancelled_;  // true iff we reset since backlog started growing
  size_t min_backlog_size_;
  qreal content_height_;
  QString prev_batch_;  // Token for the batch immediately prior to the first message
  std::unordered_map<matrix::Content, Avatar> avatars_;
  QIcon avatar_unset_, avatar_loading_;
  std::experimental::optional<Selection> selection_;
  QShortcut *copy_;
  std::vector<VisibleBlock> visible_blocks_;
  QPixmap spinner_;
  Block *grabbed_focus_;
  size_t unread_events_;

  void update_scrollbar(bool grew_upward);

  void grow_backlog();
  void prepend_batch(QString start, QString end, gsl::span<const matrix::proto::Event> events);
  void backlog_grow_error();
  int scrollback_trigger_size() const;
  int scrollback_status_size() const;
  void set_avatar(const matrix::Content &content, const QString &type, const QString &disposition, const QByteArray &data);
  void unref_avatar(const matrix::Content &);
  void copy();
  void pop_front_block();
  QString selection_text() const;
  VisibleBlock *dispatch_event(const std::experimental::optional<QPointF> &p, QEvent *e);

  VisibleBlock *block_near(const QPointF &p);   // Point relative to view

  void prune_backlog();
  // Removes enough blocks from the backlog that calling for each new event will cause backlog size to approach one
  // batch size greater than min_backlog_size_. Requires but does not perform scrollbar update!

  void ref_avatar(const matrix::Content &);
};

#endif


text:
class CreateTransmissions < ActiveRecord::Migration
  def change
    create_table :transmissions do |t|
      t.string :place
      t.text :description
      t.timestamp :date
      t.string :lat
      t.string :lon

      t.timestamps null: false
    end
  end
end


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

describe Fitbit::Food do
  describe '#search' do
    before(:each) do
      @user = double('User')
      @user.stub_chain(:fitbit_data, :find_food).and_return({
              'foods' =>
                [
                    {
                      "accessLevel" => "PUBLIC",
                      "brand" => "",
                      "calories" => 80,
                      "defaultServingSize" => 1,
                      "defaultUnit" => { "id" => 204, "name" => "medium", "plural" => "mediums" },
                      "foodId" => 81409,
                      "locale" => "en_US",
                      "name" => "Apple",
                      "units" => [204, 179, 226, 180, 147, 389]
                    },
                    { "accessLevel" => "PUBLIC",
                      "brand" => "",
                      "calories" => 232,
                      "defaultServingSize" => 1,
                      "defaultUnit" => { "id" => 91, "name" => "cup", "plural" => "cups" },
                      "foodId" => 20030,
                      "locale" => "en_US",
                      "name" => "Apple, Added Sugar, Dried",
                      "units" => [91, 256, 279, 226, 180, 147, 389]
                    }
                ]
            })
    end

    context 'created with a user with a linked account' do
      before(:each) do
        @user.stub(:present?).and_return(true)
        @user.stub(:linked?).and_return(true)
      end

      it 'calls the find_food method on the fitbit data client' do
        @user.fitbit_data.should_receive(:find_food)
        Fitbit::Food.search(@user, 'apple')
      end

      it 'passes the search term to the search method on the fitbit data client' do
        @user.fitbit_data.should_receive(:find_food).with('apple')
        Fitbit::Food.search(@user, 'apple')
      end

      it 'returns an array of Fitbit::Food instances' do
        foods = Fitbit::Food.search(@user, 'apple')
        foods.count.should eq(2)
      end

      it 'packages the returned data into Fitbit::Food instances' do
        apple = Fitbit::Food.search(@user, 'apple')[0]
        apple.class.should be(Fitbit::Food)
        apple.accessLevel.should eq('PUBLIC')
        apple.name.should eq('Apple')
        apple.id.should eq(81409)
      end
    end

    context 'created with a user without a linked account' do
      before(:each) do
        @user.stub(:present?).and_return(true)
        @user.stub(:linked?).and_return(false)
      end

      it 'does not call the find_food method on the fitbit data client' do
        @user.should_not_receive(:fitbit_data)
        Fitbit::Food.search(@user, 'apple')
      end

      it 'returns and empty array of results' do
        results = Fitbit::Food.search(@user, 'apple')
        results.class.should eq(Array)
        results.count.should eq(0)
      end
    end
  end
end


text:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

        </android.support.v7.widget.Toolbar>

    </android.support.design.widget.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:divider="@android:drawable/divider_horizontal_textfield"
        android:showDividers="middle"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <Button
            android:id="@+id/processImage"
            style="?android:textAppearanceSmall"
            android:background="@drawable/button_shape"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:text="水厂工艺流程图"
            android:textStyle="bold"/>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/process_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </LinearLayout>

</android.support.design.widget.CoordinatorLayout>


text:
package xmldoc

import (
	"testing"
)

func TestNewXDCDocument(t *testing.T) {
	n := NewXDCDocument()

	if n.GetType() != DocumentType {
		t.Error("Incorrect type for document")
	}

	if n.Children != nil {
		t.Error("Children should be uninitialised.")
	}

}


text:
<?php
namespace NatureQuizzer\Utils;

class LookupTable
{
	private $storage;

	public function get($key)
	{
		if (isset($this->storage[$key])) {
			return $this->storage[$key];
		}
		return NULL;
	}

	public function store($key, $value)
	{
		$this->storage[$key] = $value;
	}

	public function getAll()
	{
		return $this->storage;
	}

}


text:
Enabling SSL on original client daemon
======================================
By default, Exclusivecoin allows JSON-RPC commands to be sent to http://localhost:17171
and accepts connections only from the localhost.

JSON-RPC Over SSL Setup
-----------------------
It can be configured to allow HTTPS connections.  You must follow the steps below
for this to work properly.

1. Setup a certificate and private key.  A self signed certificate will work.
    * cd ~/.exclusivecoin
    * openssl genrsa -out server.pem 4096
    * openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert
    (NOTE: you should NOT enter a passphrase)

2. Configure NeosCoin to use SSL
    * Stop your current exclusivecoind or exclusivecoin-qt
    * Edit the exclusivecoin.conf and add
      rpcssl=1

3. Restart Exclusivecoin to make these changes take effect.

4. Optionally you can test SSL functionality using the openssl s_client command
    * openssl s_client -connect localhost:15004


text:
{# ------------------------------------------------------- #}
{# ONE OFF VIEW testimonials #}
{# This page can use any data from http:localhost:2000/cms/#/form/testimonials/ #}
{# Webhook uses the SWIG.js (like Djagno/Twig) templating system. Their documentation is here: #}
{# http://paularmstrong.github.io/swig/docs/tags/ #}
{# Learn about calling data into Webhook pages here: #}
{# http://www.webhook.com/docs/template-rules-and-filters/ #}
{# ------------------------------------------------------- #}
{# Confused what extends and blocks do? Watch a primer: #}
{# http://www.webhook.com/docs/template-inheritance-blocks/ #}
{% extends "templates/partials/base.html" %}
{# This sets our page <title>. It will append this testimonials's name to the site title defined in base.html #}
{% block title %}{% parent %} - {{ cms.testimonials.name }}{% endblock %}
{% block content %}

        {{ cms.testimonials.article1|safe }}

        {{ cms.testimonials.article3|safe }}

        {{ cms.testimonials.article4|safe }}

        {{ cms.testimonials.article2|safe }}

        {{ cms.testimonials.article5|safe }}

        {{ cms.testimonials.article6|safe }}

{% endblock %}


text:
<!doctype html>

    <meta charset="utf-8">
    <title>ArrowKeyControl</title>
    <link rel="StyleSheet" type="text/css" href="ArrowKeyControl.css">

            Play

Wait...

            Game Over!

            Score:

            Rank:

            Combo Streak:

          Play

              <input type="checkbox" name="Checkbox" id="netScoring">
              Internet Scoring

            Username:
            <input type="text" name="" value="" id="username">

            Password:
            <input type="text" name="" value="" id="crypt">

          <button id="done">Done</button>

ArrowKeyControl is a reaction testing game that tests your speed and concentration.

You have to type what you see: up, down, left, or right arrow. Get it wrong and it's game over.

You have 1 second to hit the first key, and every time you hit a key, the time allowed to hit the next key
          decreases. The game continues like this as long as you press each key fast enough;
          too slow and the game ends.


text:
using System.Linq;
using Content.Server.Mind.Components;
using Content.Server.Objectives.Interfaces;
using Content.Shared.MobState.Components;
using JetBrains.Annotations;
using Robust.Shared.Random;

namespace Content.Server.Objectives.Conditions
{
    [UsedImplicitly]
    [DataDefinition]
    public sealed class KillRandomPersonCondition : KillPersonCondition
    {
        public override IObjectiveCondition GetAssigned(Mind.Mind mind)
        {
            var entityMgr = IoCManager.Resolve<IEntityManager>();
            var allHumans = entityMgr.EntityQuery<MindComponent>(true).Where(mc =>
            {
                var entity = mc.Mind?.OwnedEntity;

                if (entity == default)
                    return false;

                return entityMgr.TryGetComponent(entity, out MobStateComponent? mobState) &&
                       mobState.IsAlive() &&
                       mc.Mind != mind;
            }).Select(mc => mc.Mind).ToList();

            if (allHumans.Count == 0)
                return new DieCondition(); // I guess I'll die

            return new KillRandomPersonCondition {Target = IoCManager.Resolve<IRobustRandom>().Pick(allHumans)};
        }
    }
}


text:
String
******

AlphaNumeric
============

Remove all **non**-alphanumeric characters from a string (and replace with
a space):

::

  final String result = text.replaceAll("[^a-zA-Z0-9]", " ");

Spaces
======

Remove multiple white-space characters from a string (replacing each group of
white space characters with a single space):

::

  final String result = text.replaceAll("\\b\\s{2,}\\b", " ");

Note: You might want to ``trim`` the string after...


text: declare class A { get foo(): number; }


text:
class Node;
class Packet;
class Event;

class QueueProcessingEvent;
class PacketPropagationEvent;

class Queue {
    public:
        Queue(uint32_t id, double rate, uint32_t limit_bytes, int location);
        void set_src_dst(Node *src, Node *dst);
        virtual void enque(Packet *packet);
        virtual Packet *deque();
        virtual void drop(Packet *packet);
        double get_transmission_delay(uint32_t size);
        void preempt_current_transmission();

        // Members
        uint32_t id;
        uint32_t unique_id;
        static uint32_t instance_count;
        double rate;
        uint32_t limit_bytes;
        std::deque<Packet *> packets;
        uint32_t bytes_in_queue;
        bool busy;
        QueueProcessingEvent *queue_proc_event;

        std::vector<Event*> busy_events;
        Packet* packet_transmitting;

        Node *src;
        Node *dst;

        uint64_t b_arrivals, b_departures;
        uint64_t p_arrivals, p_departures;

        double propagation_delay;
        bool interested;

        uint64_t pkt_drop;
        uint64_t spray_counter;

        int location;
};

class ProbDropQueue : public Queue {
    public:
        ProbDropQueue(
                uint32_t id,
                double rate,
                uint32_t limit_bytes,
                double drop_prob,
                int location
                );
        virtual void enque(Packet *packet);

        double drop_prob;
};

#endif


text:
<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = "Вход в систему";
?>
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<?= $form->field($model, 'username')->label('Имя пользователя') ?>
<?= $form->field($model, 'password')->passwordInput()->label('Пароль') ?>
<?= $form->field($model, 'rememberMe')->checkbox()->label('Оставаться в системе') ?>

        <?= Html::a('Регистрация', ['/signup'], ['class' => 'btn btn-success']) ?>

        Если вы забыли пароль, востановить его <?= Html::a('можно здесь', ['/password-reset-request']) ?>.

        <?= Html::submitButton('Войти', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>

<?php ActiveForm::end(); ?>


text:
A zero-indexed array `A `consisting of `N` integers is given. An `equilibrium index` of this array
is any integer `P` such that `0 ≤ P < N` and the sum of elements of lower indices is equal
to the sum of elements of higher indices, i.e.

```
A[0] + A[1] + ... + A[P−1] = A[P+1] + ... + A[N−2] + A[N−1].
```

Sum of zero elements is assumed to be equal to `0`. This can happen if `P = 0` or if `P = N−1`.

For example, consider the following array A consisting of N = 8 elements:
```
  A[0] = -1
  A[1] =  3
  A[2] = -4
  A[3] =  5
  A[4] =  1
  A[5] = -6
  A[6] =  2
  A[7] =  1
```

`P = 1` is an equilibrium index of this array, because:

```
A[0] = −1 = A[2] + A[3] + A[4] + A[5] + A[6] + A[7]
```

`P = 3` is an equilibrium index of this array, because:
```
A[0] + A[1] + A[2] = −2 = A[4] + A[5] + A[6] + A[7]
```

`P = 7` is also an equilibrium index, because:
```
A[0] + A[1] + A[2] + A[3] + A[4] + A[5] + A[6] = 0
```

and there are no elements with indices greater than `7`.

`P = 8` is not an equilibrium index, because it does not fulfill the condition `0 ≤ P < N`.

## Task description

Write a function:

```c
int solution(int[] A, int N);
```

that, given a zero-indexed array `A` consisting of `N` integers, returns any of its
equilibrium indices. The function should return `−1` if no equilibrium index exists.

For example, given array `A` shown above, the function may return `1`, `3` or `7`, as explained above.

Assume that:

* `N` is an integer within the range `[0..100,000]`;
* each element of array `A` is an integer within the range `[−2,147,483,648..2,147,483,647]`.

Complexity:

* expected worst-case time complexity is `O(N)`;
* expected worst-case space complexity is `O(N)`, beyond input storage (not counting the storage required for input arguments).

Elements of input arrays can be modified.


text:
<!DOCTYPE html>

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="Stylesheet" href="../css/analysis.css" />

Afledt aspekt

Dette værktøj opretter et aspektkort ud fra en højdedatakilde. Aspekt angiver den nedadgående hældning ud fra den maksimale ændring af værdien af hver celle i forhold til dens naboceller. Man kan tænke på aspekt som en hældningsretning. Værdierne i output-rasterdataene vil udgøre kompasretningen for aspektet.

Inputdata

Det højdelag, for hvilket aspektet for hver celleplacering kan beregnes.

Navn på resultatlag

Navnet på det lag, som oprettes under  Mit indhold og føjes til kortet. Standardnavnet er baseret på navnet på værktøjet og navnet på inputlaget. Hvis laget allerede findes, vil du blive bedt om at angive et andet navn.

Ved hjælp af rullelisten  Gem resultat i kan du angive navnet på en mappe i Mit indhold, hvor resultatet skal gemmes.


text:
<!DOCTYPE html>

		<link href="/static/v/all/css/ag.base.css?201306041002" rel="stylesheet" type="text/css" media="all"/>

<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<link rel="schema.prism" href="http://prismstandard.org/namespaces/basic/2.1/" />
<link rel="schema.iptc" href="http://iptc.org/std/nar/2006-10-01/" />

<title>Man With 'Micropenis' Discovers He's Actually A Woman At Age 66 | Fox News Latino</title>
			 	<meta name="dc.title" content="Man With 'Micropenis' Discovers He's Actually A Woman At Age 66" />
<meta name="dc.creator" content="" />
<meta name="description" content="A 66-year-old patient who lived most of his life thinking he was a man has discovered he has the internal organs of a woman." />
<meta name="dc.description" content="A 66-year-old patient who lived most of his life thinking he was a man has discovered he has the internal organs of a woman." />
<meta name="dcterms.abstract" content="A 66-year-old patient who lived most of his life thinking he was a man has discovered he has the internal organs of a woman." />
<meta name="dc.publisher" content="Fox News Latino" />
<meta name="dc.source" content="Fox News Latino" />
<meta name="dc.date" content="2013-06-06" />
<meta name="dcterms.created" scheme="dcterms.ISO8601" content="2013-06-06 09:02:11 EDT" />
<meta name="dcterms.modified" scheme="dcterms.ISO8601" content="2013-06-06 09:02:11 EDT" />
<meta name="dc.type" scheme="dcterms.DCMIType" content="Text.Article" />
<meta name="prism.genre" content="column" />
<meta name="dc.identifier" scheme="dcterms.URI" content="urn:uuid:dd00d0790891f310VgnVCM100000d7c1a8c0RCRD" />
<link rel="shorturl" href="http://fxn.ws/10ST1ur" />
<link rel="canonical" href="http://latino.foxnews.com/latino/health/2013/06/06/man-with-micropenis-discovers-hes-actually-woman-at-age-66/" />
<meta name="keywords" content="Queen,Queen Elizabeth,Hong Kong,chromosomal abnormality,testosterone,internal organs,startling revelation,genetic disorder,testosterone replacement,ovaries,University" />
<meta name="dc.subject" content="Queen,Queen Elizabeth,Hong Kong,chromosomal abnormality,testosterone,internal organs,startling revelation,genetic disorder,testosterone replacement,ovaries,University " />
<meta name="prism.aggregationType" content="front" />
<meta name="prism.channel" content="fnl" />
<meta name="prism.section" content="health" />
<meta name="prism.subsection1" content="" />
<meta name="prism.subsection2" content="" />
<meta name="prism.subsection3" content="" />
<meta name="prism.subsection4" content="" />
<meta property="og:title" content="Man With 'Micropenis' Discovers He's Actually A Woman At Age 66" />
<meta property="og:description" content="A 66-year-old patient  who lived most of his life thinking he was a man has discover he has the internal organs of a woman." />
<meta property="og:type" content="article" />
<link rel="image_src" href="http://a57.foxnews.com/global.fncstatic.com/static/managed/img/legacy/2009/09/0/0/m_0_61_hospital320.jpg?ve=1" />
<meta property="og:image" content="http://a57.foxnews.com/global.fncstatic.com/static/managed/img/legacy/2009/09/0/0/m_0_61_hospital320.jpg" />
<meta property="og:image" content="http://a57.foxnews.com/a57.foxnews.com/media2.foxnews.com/thumbnails/i/060513/640/360/0/0/ASL0044-060513FOXLATINOSPOTLIGHT2-2TEQFCJA_FNC_060513_11-51.jpg" />
<meta property="og:image" content="http://a57.foxnews.com/global.fncstatic.com/static/managed/img/fn-latino/lifestyle/0/0/AP710535403344.jpg" />
<meta property="og:url" content="http://latino.foxnews.com/latino/health/2013/06/06/man-with-micropenis-discovers-hes-actually-woman-at-age-66/" />
<meta property="og:site_name" content="Fox News Latino" />
<meta property="fb:app_id" content="155493694485141" />
<meta name="dc.contributor" content="" />
<meta name="column" content="La Nota Loca" />
<meta name="classification" content="COLUMNS/La Nota Loca, LANGUAGES/English" />
<meta name="classification-isa" content="notaloca" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@foxnewslatino" />
<meta name="language" content="" />
<meta name="livefyreconfig" collectionMeta="eyJhbGciOiJIUzI1NiJ9.eyJ0YWdzIjoiLExBVElOTyxDT0xVTU5TLExhIE5vdGEgTG9jYSwsTEFUSU5PLExBTkdVQUdFUyxFbmdsaXNoIiwidGl0bGUiOiJNYW4gV2l0aCAnTWljcm9wZW5pcycgRGlzY292ZXJzIEhlJ3MgQWN0dWFsbHkgQSBXb21hbiBBdCBBZ2UgNjYiLCJjaGVja3N1bSI6IjRjYmU4YTE2NDM4ZWEyNWViNWY4ZDFhMzA3ZGYzOTUxIiwiYXJ0aWNsZUlkIjoiZGQwMGQwNzkwODkxZjMxMFZnblZDTTEwMDAwMGQ3YzFhOGMwUkNSRCIsInVybCI6Imh0dHA6Ly9sYXRpbm8uZm94bmV3cy5jb20vbGF0aW5vL2hlYWx0aC8yMDEzLzA2LzA2L21hbi13aXRoLW1pY3JvcGVuaXMtZGlzY292ZXJzLWhlcy1hY3R1YWxseS13b21hbi1hdC1hZ2UtNjYvIn0.YG9-2PeBVLexlZnKQtouOwh8VnVjFWdCnw39v8M0k2E" checksum="4cbe8a16438ea25eb5f8d1a307df3951" articleId="dd00d0790891f310VgnVCM100000d7c1a8c0RCRD" siteId="310356"/>
<meta name="parsely-page" content='{"title": "Man With \u0027Micropenis\u0027 Discovers He\u0027s Actually A Woman At Age 66", "link": "http://latino.foxnews.com/latino/health/2013/06/06/man-with-micropenis-discovers-hes-actually-woman-at-age-66/", "image_url": "http://a57.foxnews.com/global.fncstatic.com/static/managed/img/legacy/2009/09/0/0/m_0_61_hospital320_tn.jpg?ve=1", "type": "article", "post_id": "dd00d0790891f310VgnVCM100000d7c1a8c0RCRD", "pub_date": "2013-06-06 09:02:11 EDT", "section": "health", "author": "", "tags": ["COLUMNS/La Nota Loca"," LANGUAGES/English"]}' />
<meta name="parsely-metadata" content='{"image_url":"http://a57.foxnews.com/global.fncstatic.com/static/managed/img/legacy/2009/09/0/0/m_0_61_hospital320_tn.jpg?ve=1"}' />
<meta name="dc.format" scheme="dcterms.IMT" content="text/html" />
<meta name="dc.language" scheme="dcterms.RFC4646" content="en-US" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-language" content="en" />

<link rel="icon" href="/static/v/fn-latino/img/favicon.png" type="image/png">
<link rel="shortcut icon" href="/static/v/fn-latino/img/favicon.ico">

<link href="/static/v/fn-latino/site/css/site.css?201306041002" rel="stylesheet" type="text/css" charset="utf-8" />
<link href="/static/v/all/css/article.3.0.css?201306041002" rel="stylesheet" type="text/css" charset="utf-8" />

Skip to main content: Latino/SBC/Fox Business (Home/Slideshow/Interactive: Fox News/SBC/Latino/Fox Business)

Skip to main content: Fox News/Fox Business (Article Page: Fox News/SBC/Latino/Fox Business)

Fox News Digital Network

  Fox News

  Fox Business

  uReport

  Fox News Radio

  Fox News Latino

  Fox Nation

  Fox News Insider

Login

				               Account

You're logged in as

Profile

Logout

				<form action="http://latino.foxnews.com/search-results/search" method="get">
					<fieldset>
						<legend>Search Site</legend>
						<input type="text" name="q" size="50" value="" />
						<input type="submit" name="submit" class="btn-lrg" value="Search" />
					</fieldset>
				</form>

Home

Video

News

Politics

Money

Opinion

Entertainment

Sports

Health

Lifestyle

Español

Man With 'Micropenis' Discovers He's Actually A Woman At Age 66

La Nota Loca

Published June 06, 2013

Fox News Latino

AP

For most of his life, a man thought his penis was just unusually small. Then, after decades coexisting with the unfortunate fact, at age 66 the man discovered he was actually a woman.

After visiting a hospital in Hong Kong with a swollen abdomen, the unnamed patient was examined by doctors.

The diagnosis? A cyst on the ovaries of the patient, who grew up thinking he was a male.

The startling revelation was published this week in the Hong Kong Medical Journal, where doctors wrote out the explanation as to how someone could go so long thinking they were the opposite gender.

Doctors from Kwong Wah, where the patient was treated, and from Queen Elizabeth Hospital said the patient suffered from two different conditions which ultimately gave him the internal organs of a woman but the physical appearance of a man.

The patient has both the chromosomal abnormality known as Turner Syndrome and the genetic disorder congenital adrenal hyperplasia (CAH).

"The patient, by definition, is a woman who cannot get pregnant. But she also has CAH, which gave her the appearance of a man," Ellis Hon Kam-lun, a pediatrics professor from a Chinese University, told the  South China Morning Post.

"It's an interesting and very rare case of having the two combinations. It probably won't be seen again in the near future."

Cases like this, where both disorders occur simultaneously, are so rare in fact there have only been six instances recorded in medical history.

The 4'5" tall, bearded man has a "micropenis" and no testicles. However, according to the journal, the patient has decided to continue "perceiving himself as having a male gender with the possible need of testosterone replacement."

Follow us on twitter.com/foxnewslatino

Like us at facebook.com/foxnewslatino

  Print

  Email

  Share

  Comments

Recommend

Tweet

Related Video

Stinky Feet Fights Malaria

Related Slideshow

Best Pix Of The Week

Related Stories

Man Uses Fake Penis, Urine for Drug Exam

Huge Discovery On Mars!

Company Launches Lingerie Line for Men

Man Claims to Have World's Largest Penis

Share This Article

<g:plusone size="tall"></g:plusone>

View Article

				Please enable JavaScript to view the comments powered by Disqus.

You must login to comment.

View Article

Follow Fox News Latino

Get Our Free Newsletter

		<form action="#" name="newsletterform" id="newsletter_form" method="get">
			<fieldset>
			<legend>Newsletter Signup</legend>
			<input type="text" value="Enter Email Address" name="signup">
			<input type="hidden" value="3DC725E303A24F8DA102192D9D5143D9" name="slid" id="slid_0">
			<input type="submit" value="Sign Up" name="signup">
			</fieldset>

		</form>

Advertisement

More Stories

Man With 'Micropenis' Discovers He's Actually A Woman At Age 66

Rafael Nadal Vs. Novak Djokovic Meet In French Open Semi Showdown

Wreck Of Two 17th Century Spanish War Ships Found Off Peruvian Coast

Best Pix of the Year

NM Man Throws Mother Off Bridge After Stabbing Her; Claims He Heard Voices

Massive Spanish Submarine Too Overweight To Rise Above Water

Marines Rally For Armando Torres, Kidnapped Iraq Veteran In Mexico

Latin America Is Home To The World's Fastest Growing Internet Market

Colombia's Hidden Treasure: Villa de Leyva Becomes Hideaway For Expats

Raul Labrador Drops Out Of House Immigration Talks Over Healthcare Rift

Alleged UFO Spotted Dive Bombing Into Mexico's Popocatepetl Volcano

DHS Should Continue To Search Computer And Cellphone Records For Data, Report States

Miss Universe 2012: The Top 16 & Miss Congeniality

Eva Longoria’s ‘Devious Maids’ To Release Preview In English and Spanish To Attract Latinos

Rep. Steve King Defends Comparison Between Immigrants and Dogs

Evelyn Lozada Heads To Prom 20 Years After Her Time

Juan Estevez, A Spanish Engineer, Plays Lead Role In Rebuilding The WTC

David Beckham Looks To Bring Pro Soccer To Miami And Its Latino Fans

Hollywood Hair Guru Anthony Pazos Dishes On His “Diva” Celebrity Clientele

Spanish Surnamed Patients In California Were Targeted For Sterilization, Study Says

A Daughter's Last Gift Turns Her Struggling Family Into New Millionaires

Congressman Gutierrez Used Taxpayer Money For Lobbyist, Report Says

Geraldo Rivera: "Send Them All Back!"

Alex Rodriguez Among Other Baseball Stars Facing 100-Game Suspension In Doping Scandal

Detained Immigrants Have a Right to Counsel

Neighbors Describe House Of Horrors, Women Leashed And Naked, While Many Point To Police As Responsible

Colombia has Highest Pay TV Penetration Rate in LatAm

PA Gov. Tom Corbett Says He'd Like To Hire Latinos -- He Just Can't Find Any

Jennifer Lopez Wants To Return To ‘American Idol,’ Sources Said

'The Walking Dead' Comic To Be Released In Spanish

Senate May Consider Congressional Gold Medal To Puerto Rican War Veterans

U.S. Federal Judge Under Fire For Alleged Racial Comments Against Latinos, Blacks

More Americans Murdered In Mexico Than In Any Other Country In The World

Jodi Arias Drama To Be Turned Into Lifetime’s 'Dirty Little Secret'

Baseball Stars David Ortiz, Mariano Rivera Speak Out Against International Draft

Ticket To Disney World Now More Than $100, With Tax

Best Pix Of The Week

Porn Star Jenna Jameson, Tito Ortiz Embroiled In Bitter Custody Battle

Live Sex Show Busted At Utah Movie Theater; Six People Arrested

Sofia Vergara Wax Figures Unveiled At Madame Tussauds Wax Museum

Arizona: Five Burned Bodies Found Car Near Mexico Border

How to Increase Your Basal Metabolic Rate

What’s the Problem with Tom Perez?

'Housewives of Miami’ Star Alexia Echevarria on Son's Altercation With Homeless Man

Former U.S. Marine Kidnapped In Mexico, Family Says

Man Gets Caught Hiding Behind A Cactus After Driving Drunk While Having Sex

Mexican Beauty Queen's Narco Life & Death

Miami Sizzles with Fashion Week

Jennifer Lopez Defends Super Sexy ‘Britain’s Got Talent’ Performance

Hispanics Demand AZ Sheriff Joe Arpaio's Resignation, Accuse Him Of Discrimination

Advertisement

Also on the web

		EE.UU. defiende registro secreto de llamadas

		Tormenta "Andrea" se acerca a Florida

		Pyongyang ofrece dialogar con Seúl

		Obama pide aumentar acceso a internet en escuelas

		Derrumbe en Philadelphia deja seis muertos

		Miguel -- Billboard Music Awards Producers NEVER Warned Me About Crowd Jump

		Miguel DEFIED ORDER -- Singer Was Told Not to Jump At Billboard Awards

		Miguel's Leg Drop Victim -- Possible Brain Damage

		Pia Zadora -- SWAT Team Swarmed After She Allegedly Choked Son

		Pia Zadora Arrested for Domestic Battery

		Cuba Wants to Exchange Alan Gross for Cuban Five, Bill Richardson Says
		<meta itemprop="datePublished" content="2012-06-16T01:20:48Z" />

		GOP Immigration Hawk Rebuffs Rubio and Rivera DREAM Act Proposals
		<meta itemprop="datePublished" content="2012-06-14T20:34:08Z" />

		How to fix this broken immigration system
		<meta itemprop="datePublished" content="2012-06-14T17:12:10Z" />

		Border beat: Deeper deportations, rescues up, and more
		<meta itemprop="datePublished" content="2012-06-12T16:07:11Z" />

		What Are Bath Salts and Why Do They Make People Go Crazy?
		<meta itemprop="datePublished" content="2012-06-08T22:32:09Z" />

		Iniesta no comprende ataques a Messi
		<meta itemprop="datePublished" content="2013-02-06T06:11:07Z" />

		Gasol dice que D'Antoni está 'estropeando' su temporada
		<meta itemprop="datePublished" content="2013-02-05T20:52:05Z" />

		Inglaterra derrota a Brasil
		<meta itemprop="datePublished" content="2013-02-06T02:21:53Z" />

		Con 23 triples los Rockets aplastaron a los Warriors
		<meta itemprop="datePublished" content="2013-02-06T04:37:31Z" />

		Sexygalería: Gisele Bundchen, consiente mucho a Tom Brady
		<meta itemprop="datePublished" content="2012-09-26T20:20:39Z" />

        Philadelphia building collapse: 61-year-old woman rescued from rubble  and it's a miracle (VIDEO)

        11 Reasons Shakira should be Queen of the Universe (PHOTOS)

        My miracle baby's brush with Potter's Syndrome

        Bilingual bebés on board: 5 must-have books for parents raising bilingual kids

        6 Easy ways to cut summer energy costs (PHOTOS)

		New Ruling On Morning-After Pill Orders All Restrictions to be Lifted
		<meta itemprop="datePublished" content="2013-06-06T14:14:49Z" />

		'Devious Maids' Will Be Available in Both English & Spanish After It Airs
		<meta itemprop="datePublished" content="2013-06-06T14:08:13Z" />

		Mexico Disappearances are Officially an International Crisis
		<meta itemprop="datePublished" content="2013-06-05T17:35:28Z" />

		Latino Gay Couple Says They Were Technically the First LGBT "Cutest Couple"
		<meta itemprop="datePublished" content="2013-06-05T15:42:25Z" />

		Number of U.S. Hispanic-Serving Colleges is On the Rise
		<meta itemprop="datePublished" content="2013-06-05T15:28:22Z" />

Sections

Home

Video

News

Politics

Opinion

Entertainment

Sports

Health

Lifestyle

Money

Español

About

Terms of Use

Privacy Statement

Ad Choices

Contact Us

Internships - FNCU

Networking

                                                Facebook

                                                Twitter

                                                RSS

This material may not be published, broadcast, rewritten, or redistributed. ©2013 FOX News Network, LLC. All rights reserved.


text:
import math
from math import *
import datetime
d= str(datetime.date.today())
print(d)
file = open('MagLev'+d+'.txt','w')
print('2014 LA Regionals\n' + 'MagLev Cabinet Evaluations')
name = input('Name: ')
#File Write Top Part
file.write('2014 LA Regionals - MAGLEV')
file.write('Test Date: ' + d + '\n')
file.write('Name: ' + name + '\n')

penalty = 0
time_list = []

#event parameter
e_d = input("Teams are wearing eye protection at all times. Y/N ")
file.write('Teams are wearing eye protection at all times ' + e_d + '\n')
if e_d == "N" or e_d == "n":
    final_score = 0

#construction parameters
c_a = input("Does the vehicle modify the track? Y/N ")
file.write('Does the vehicle modify the track? ' + c_a + '\n')
if c_a == "Y" or c_a == "y":
    penalty = 20

c_b = input("The length of the vehicle is between 15.0 and 22.0 cm. Y/N ")
file.write('The length of the vehicle is between 15.0 and 22.0 cm. ' + c_b + '\n')
if c_b == "n" or c_b == "N":
    penalty = 20

c_c = input("The mass of the vehicle is: ")
c_c1 = str(c_c)
file.write('Does the vehicle modify the track? ' + c_c1 + '\n')
if c_c > 2000.0 or c_c < 250.0:
    penalty = 20

c_e = input("The vehicle is within the the vertical planes of the track. Y/N ")
file.write('The vehicle is within the vertical planes of the track ' + c_e + '\n')
if c_e == "N" or c_e == "n":
    penalty = 20

c_f_1 = input("The vehicle has a 1/4 inch dowel attached within 5.0 cm of the front edge. Y/N ")
file.write('The vehicle has a 1/4 inch dowl attached within 5.0 cm of the front edge. ' + c_f_1 + '\n')
if c_f_1 == "N" or c_f_1 == "n":
    penalty = 20

c_f_2 = input("The dowel is between 30.0 and 35.0 cm above the lowest vehicle surface. Y/N ")
file.write('The dowel is between 30.0 and 35.0 cm above the lowest vehicle surface ' + c_f_2 + '\n')
if c_f_2 == "N" or c_f_2 == "n":
    penalty = 20

c_f_3 = input("The dowel has a rigid flag that is at least 5.0 by 5.0 cm. Y/N ")
file.write('The dowel has a rigid flag that is at least 5.0 by 5.0 cm. ' + c_f_3 + '\n')
if c_f_3 == "N" or c_f_3 == "n":
    penalty = 20

c_f_4 = input("One side of the flag is parallel to the track and the other side is parallel to the dowel. Y/N ")
file.write('Sides of the flag are parallel to the track and the dowel. ' + c_f_4 + '\n')
if c_f_4 == "N" or c_f_4 == "n":
    penalty = 20

c_g_1 = input("Batteries are the only energy source. Y/N ")
file.write('Batteries are the only energy source. ' + c_g_1 + '\n')
if c_g_1 == "N" or c_g_1 == "n":
    penalty = 20

c_g_2 = input("Total voltage is at most 9.0 V. Y/N ")
file.write('Voltage is less than or equal to 9.0 V ' + c_g_2 + '\n')
if c_g_2 == "N" or c_g_2 == "n":
    penalty = 20

c_h_1 = input("Vehicle has one motor corresponding to one propeller. Y/N ")
file.write('Vehicle has one motor corresponding to one propellor ' + c_h_1 + '\n')
if c_h_1 == "N" or c_h_1 == "n":
    penalty = 20

c_h_2 = input("Propellers have a diameter <= 14.0 cm. Y/N ")
file.write('Propellers have a diameter less than or equal to 14.0 cm. ' + c_h_2 + '\n')
if c_h_2 == "N" or c_h_2 == "n":
    penalty = 20

c_h_3 = input("Propellers are shielded from direct contact so that a 1/4 inch dowel cannot make contact with it. Y/N ")
file.write('Propellers are shielded from direct contact so that a 1/4 inch dowel cannot make contacat with it. ' + c_h_3 + '\n')
if c_h_3 == "N" or c_h_3 == "n":
    penalty = 20

c_i = input("Brushless motors and integrated circuits are used. Y/N ")
file.write('Brushless motors and integrated circuits are used. ' + c_i + '\n')
if c_i == "Y" or c_i == "y":
    penalty = 20

c_j = input("Rare earth metals are used. Y/N ")
file.write('Rare earth metals are used ' + c_j + '\n')
if c_j == "Y" or c_j == "y":
    penalty = 20

c_k = input("Vehicle levitates. Y/N ")
file.write('Vehicle levitates. ' + c_k + '\n')
if c_k == "N" or c_k == "n":
    penalty = 20

c_l = input("Vehicle has an electric switch to permit safe starting. Y/N ")
file.write('Vehicle has an electric switch to permit safe starting ' + c_l + '\n')
if c_l == "N" or c_l == "n":
    penalty = 20

#testing

#run 1
time_1 = input("How many seconds did the vehicle take to travel 95.0 cm? If failed, respond with 0. ")
time_1_1 = str(time_1)
if time_1 >= 5.0 and time_1 <= 15.0:
    time_list.append(time_1)
file.write('Trial 1 time was ' + time_1_1 + '\n')

#run 2
time_2 = input("How many seconds did the vehicle take to travel 95.0 cm? If failed, respond with 0. ")
time_2_1 = str(time_2)
if time_2 >= 5.0 and time_2 <= 15.0:
    time_list.append(time_2)
file.write('Trial 2 time was ' + time_2_1 + '\n')

#other runs
if time_2 == 0:
    time_3 = input("How many seconds did the vehicle take to travel 95.0 cm? If failed, respond with 0. ")
    time_3_1 = str(time_3)
    if time_3 >= 5.0 and time_3 <= 15.0:
        time_list.append(time_3)
    file.write('Trial 3 time was ' + time_3_1 + '\n')
if len(time_list) < 2:
    time_4 = input("How many seconds did the vehicle take to travel 95.0 cm? If failed, respond with 0. ")
    time_4_1 = str(time_4)
    if time_4 >= 5.0 and time_4 <= 15.0:
        if len(time_list) < 3:
            time_list.append(time_4)
    file.write('Trial 4 time was ' + time_4_1 + '\n')
if len(time_list) < 2:
    time_5 = input("How many seconds did the vehicle take to travel 95.0 cm? If failed, respond with 0. ")
    time_5_1 = str(time_5)
    if time_5 >= 5.0 and time_5 <= 15.0:
        if len(time_list) < 3:
            time_list.append(time_5)
    file.write('Trial 5 time was ' + time_5_1 + '\n')

#competition rules will be designated as cc

cc_b_iii_1 = input("Competitors placed their vehicle on the track directly before the start line. Y/N ")
file.write('Competitors placed their vehicle on the track directly before the start line. ' + cc_b_iii_1 + '\n')
if cc_b_iii_1 == "N" or cc_b_iii_1 == "n":
    penalty = penalty + 2

cc_b_iii_2 = input("Competitors placed an object in front of their vehicle to keep it from moving. Y/N ")
file.write('Competitors placed an object in front of their vehicle to keep it from moving. ' + cc_b_iii_2 + '\n')
if cc_b_iii_2 == "N" or cc_b_iii_2 == "n":
    penalty = penalty + 2

cc_b_iii_3 = input("Team demonstrated a safe starting and ending process before a run. Y/N ")
file.write('Team demonstrated a safe starting and ending process before a run. ' + cc_b_iii_3 + '\n')
if cc_b_iii_3 == "N" or cc_b_iii_3 == "n":
    penalty = penalty + 2

cc_b_v = input("Competitors touch the vehicle after they have turned on their motor. Y/N ")
file.write('Competitors touch the vehicle after they have turned on their motor. ' + cc_b_v + '\n')
if cc_b_v == "Y" or cc_b_v == "y":
    penalty = penalty + 2

#Scoring

print "Calculating Scores"
#mass score
heavy = input("What is the mass of the heaviest successful vehicle?")
file.write('The mass of the vehicle is ' + c_c1 + '\n')
mass_score = (c_c / heavy) * 25

if len(time_list) == 0:
    mass_score = 0

attempt = input("Did the team attempt any runs or move past the start line? Y/N ")
file.write('Did the team attempt any runs or move past the start line? ' + attempt + '\n')
if attempt == "N" or attempt == "n":
    mass_score = -5

impound = input("Did the team impound? Y/N ")
file.write('Impound? ' + impound + '\n')
if impound == "N" or impound == "n":
    mass_score = -10

mass_score_str = str(mass_score)
file.write('Mass score: ' + mass_score_str + '\n')

#time score
target = input("What was the target time in seconds? ")
target_str = str(target)
file.write('Target Time: ' + target_str + '\n')

TS = []
if len(time_list) == 0:
    time_score = 0
else:
    for x in time_list:
        list_score = (1 - (abs(x - target) / x)) * 25
        TS.append(list_score)

time_score = max(TS)
TS_str = str(time_score)
file.write('Time Score: ' + TS_str + '\n')

#final score
penalty_str = str(penalty)
file.write('Penalty: ' + penalty_str + '\n')
final_score = mass_score + time_score - penalty
print "The final sccore is ", final_score
final_score_str = str(final_score)
file.write('Final Score: ' + final_score_str + '\n')
file.close()


text:
require_relative '../isosceles.rb'

require 'yaml'


text:
<!DOCTYPE html>

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

    <form name="login" action="/auth/login" method="POST">
      <input name="username" type="email" placeholder="email address" value="antoine@7degrees.co.za" required></input>
      <input name="password" type="password" placeholder="password" value="r1t1f1m1" required></input>
      <input name="hash" type="hidden" value=""></input>
      <input type="submit" value="login"></input>
      <input name="register" type="button" value="register"></input>
    </form>

      logout

    <form name="register" action="/auth/register" method="POST" style="display:none;">
      <input name="username" type="email"    placeholder="email address" required></input>
      <input name="password" type="password" placeholder="password" required></input>
      <input name="confirm"  type="password" placeholder="confirm password" required></input>
      <input name="hash" type="hidden" value=""></input>
      <input type="submit" value="register"></input>

    </form>

    <form name="publish" action="/pubsub" method="POST" enctype="multipart/form-data">
      <textarea name="message" cols="40" rows="5" autofocus></textarea>

      <input type="file" name="image"></input>

      <input type="submit"></input>
    </form>

      following

      followers

messages

profiles

      <button>get</button>

      <button>post</button>

      <button>put</button>

      <button>delete</button>

      <button>head</button>


text:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item >
        <shape android:shape="rectangle">
            <stroke android:width="2.0px" android:color="@color/top_bar_normal_bg"/>
            <solid android:color="@android:color/white"/>
        </shape>
    </item>
	<item android:bottom="4.0dip">
	    <shape android:shape="rectangle">
	        <solid android:color="@android:color/white"/>

	    </shape>

	</item>

</layer-list>


text:
class Following < ActiveRecord::Base

  include ActsAsFollowable::Following

  belongs_to :followable, :polymorphic => true

  default_scope :order => 'created_at ASC'

  # NOTE: Favorite belongs to a user
  belongs_to :user
end


text:
<?php
/**
 * @namespace
 */
namespace Vein\Core\Crud\Helper\Form\DataTable;

use Vein\Core\Crud\Form\DataTable as Form,
    Vein\Core\Crud\Form\Field as Field;

/**
 * Class form fields helper
 *
 * @category   Vein\Core
 * @package    Crud
 * @subpackage Helper
 */
class Fields extends BaseHelper
{
	/**
	 * Generates form fields object
	 *
	 * @param \Vein\Core\Crud\Form\DataTable $form
     *
     * @return string
	 */
	static public function _(Form $form)
	{
        $code = '
            fields: [';

        $fields = [];

        $create = false;
        if ($form->getId() === null) {
            $create = true;
        }
        foreach ($form->getFields() as $field) {
            if ($create && $field instanceof Field\Primary) {
                continue;
            }
            if ($field instanceof Field) {
                $fields[] = self::renderField($field);
            }
        }

        $code .= implode(',', $fields);

        $code .= '
             ]';

        return $code;
	}
}


text:
package com.ctrip.xpipe.redis.console.console.impl;

import com.ctrip.xpipe.redis.console.console.ConsoleService;
import com.ctrip.xpipe.redis.console.health.action.HEALTH_STATE;
import com.ctrip.xpipe.spring.RestTemplateFactory;
import org.springframework.web.client.RestOperations;

/**
 * @author wenchao.meng
 *         <p>
 *         Jun 07, 2017
 */
public class DefaultConsoleService implements ConsoleService{

    private String address;
    private RestOperations restOperations;

    private final String healthStatusUrl;

    public DefaultConsoleService(String address){

        this.address = address;
        if(!this.address.startsWith("http://")){
            this.address = "http://" + this.address;
        }
        healthStatusUrl = String.format("%s/api/health/{ip}/{port}", this.address);
        this.restOperations = RestTemplateFactory.createCommonsHttpRestTemplateWithRetry(3, 10, 100, 200);
    }

    @Override
    public HEALTH_STATE getInstanceStatus(String ip, int port) {
        return restOperations.getForObject(healthStatusUrl, HEALTH_STATE.class, ip, port);
    }

    @Override
    public String toString() {
        return String.format("%s", address);
    }
}


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

namespace Carrotware.CMS.Core {

	public class WordPressSite {

		public WordPressSite() { }

		public Guid NewSiteID { get; set; }

		public string SiteTitle { get; set; }
		public string SiteDescription { get; set; }
		public string SiteURL { get; set; }

		public string ImportSource { get; set; }
		public string wxrVersion { get; set; }

		public DateTime ExtractDate { get; set; }

		public List<InfoKVP> Categories { get; set; }
		public List<InfoKVP> Tags { get; set; }

		public List<WordPressPost> Content { get; set; }
		public List<WordPressComment> Comments { get; set; }
		public List<WordPressUser> Authors { get; set; }

		public List<WordPressPost> ContentPages {
			get {
				return (from c in this.Content
						where c.PostType == WordPressPost.WPPostType.Page
						orderby c.PostOrder ascending
						select c).ToList();
			}
		}

		public List<WordPressPost> ContentPosts {
			get {
				return (from c in this.Content
						where c.PostType == WordPressPost.WPPostType.BlogPost
						orderby c.PostDateUTC descending
						select c).ToList();
			}
		}

		public override string ToString() {
			return SiteTitle + " : " + SiteDescription;
		}

		public override bool Equals(Object obj) {
			//Check for null and compare run-time types.
			if (obj == null || GetType() != obj.GetType()) return false;
			if (obj is WordPressSite) {
				WordPressSite p = (WordPressSite)obj;
				return (this.SiteTitle == p.SiteTitle)
						&& (this.SiteURL == p.SiteURL);
			} else {
				return false;
			}
		}

		public override int GetHashCode() {
			return SiteTitle.GetHashCode() ^ SiteURL.GetHashCode();
		}
	}
}


text:
module TZInfo
  module Data
    module Definitions
      module Etc
        module Universal
          include TimezoneDefinition

          linked_timezone 'Etc/Universal', 'Etc/UTC'
        end
      end
    end
  end
end