text:
@implementation CaveolaeTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(id)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super initWithCoder:aDecoder]) {

        [self initWithMainCell:self.RecommendedAnchorView1 hintView:self.hintView1 originX:kMainCellViewOnoX originY:kMainCellViewY width:kMainCellViewWidth height:kMainCellViewWidth imageTag:kMainCellImage1];

        [self initWithMainCell:self.RecommendedAnchorView2 hintView:self.hintView2 originX:kMainCellViewTwoX originY:kMainCellViewY width:kMainCellViewWidth height:kMainCellViewWidth imageTag:kMainCellImage2];

        [self initWithMainCell:self.RecommendedAnchorView3 hintView:self.hintView3 originX:kMainCellViewOnoX originY:kMainCellViewTwoy width:kMainCellViewWidth height:kMainCellViewWidth imageTag:kMainCellImage3];

        [self initWithMainCell:self.RecommendedAnchorView3 hintView:self.hintView4 originX:kMainCellViewTwoX originY:kMainCellViewTwoy width:kMainCellViewWidth height:kMainCellViewWidth imageTag:kMainCellImage4];
    }

    return self;
}

-(IBAction)XiaowoViewControllerPush:(id)sender
{
    if (self.delegate && [self.delegate respondsToSelector:@selector(pushXinren)]) {
        [self.delegate pushXinren];
    }
}

- (void)setContentWithxinrenList1:(TTShowRoom *)xinrenList1 xinrenList2:(TTShowRoom *)xinrenList2 xinrenList3:(TTShowRoom *)xinrenList3 xinrenList4:(TTShowRoom *)xinrenList4
{
    MainCell *cell1 = (MainCell*)[self viewWithTag:kMainCellImage1];
    MainCell *cell2 = (MainCell*)[self viewWithTag:kMainCellImage2];
    MainCell *cell3 = (MainCell*)[self viewWithTag:kMainCellImage3];
    MainCell *cell4 = (MainCell*)[self viewWithTag:kMainCellImage4];

    [self setRecommendation:cell1 recommendation:xinrenList1];
    [self setRecommendation:cell2 recommendation:xinrenList2];
    [self setRecommendation:cell3 recommendation:xinrenList3];
    [self setRecommendation:cell4 recommendation:xinrenList4];
}

-(void)setRecommendation:(MainCell*)view recommendation:(TTShowRoom *)room
{
    [[UIGlobalKit sharedInstance] setImageAnimationLoading:view.starImage WithSource:room.pic_url];

    view.title.text = [room.nick_name stringByUnescapingFromHTML];

    view.audienceImage.image = kImageNamed(room.live ? @"img_audience_live.png" : @"img_audience.png");
    if (room.live)
    {
        view.audiences.text = [NSString stringWithFormat:@"%lli", [DataGlobalKit shamVistorCount:room.visiter_count]];
    }
    else
    {
        view.audiences.text = @"休息中...";
    }

    view.weekStar.hidden = NO;//(room1.gift_week == nil);

    long long int timeStamp1 = [DataGlobalKit filterTimeStampWithInteger:room.found_time];
    NSDate *pastDate1 = [NSDate dateWithTimeIntervalSince1970:timeStamp1];
    NSTimeInterval diff1 = [[NSDate date] timeIntervalSinceDate:pastDate1];
    if(ABS(diff1) >= kOneWeekSeconds)
    {
        if(room.gift_week != nil)
            [view.weekStar setImage:kImageNamed(@"周星.png")];
        else
            view.weekStar.hidden = YES;
    }else
    {
        [view.weekStar setImage:kImageNamed(@"新秀.png")];
    }

}

- (void)initWithMainCell:(MainCell*)RecommendationView hintView:(UIView*)hintView originX:(CGFloat)x originY:(CGFloat)y width:(CGFloat)wd height:(CGFloat)hg imageTag:(NSInteger)tag
{
    RecommendationView = [[MainCell alloc] init];

    RecommendationView = [[[NSBundle SDKResourcesBundle] loadNibNamed:@"MainCell" owner:self options:nil] lastObject];

    RecommendationView.layer.cornerRadius = 5;

    RecommendationView.layer.masksToBounds = YES;

    RecommendationView.frame = CGRectMake(x, y, wd, hg);

    RecommendationView.tag = tag;

    [self addSubview:RecommendationView];

    [RecommendationView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapImage:)]];

    hintView = [[UIView alloc] init];
    hintView.frame = RecommendationView.frame;
    hintView.backgroundColor = kImageClickColor;
    hintView.alpha = 0;
    hintView.tag = RecommendationView.tag +kTempTag;

    RecommendationView.starImage.image = [UIImage imageNamed:@"Resources.bundle/pics/主播默认图.png"];

    [self addSubview:hintView];
}

- (void)tapImage:(UITapGestureRecognizer *)sender
{
    UIView *hintview = (UIView*)[self viewWithTag:sender.view.tag+kTempTag];
    hintview.alpha = 0.3;

    [self.delegate doSelectCaveoCell:self tag:sender.view.tag];
}

- (void)deselectCellWithAnimated:(BOOL)animated
{
    UIView *hintView1 = (UIView*)[self viewWithTag:kMainCellImage1+kTempTag];
    UIView *hintView2 = (UIView*)[self viewWithTag:kMainCellImage2+kTempTag];
    UIView *hintView3 = (UIView*)[self viewWithTag:kMainCellImage3+kTempTag];
    UIView *hintView4 = (UIView*)[self viewWithTag:kMainCellImage4+kTempTag];

    if (animated)
    {
        [UIView animateWithDuration:0.25f animations:^{
            hintView1.alpha = 0;
            hintView2.alpha = 0;
            hintView3.alpha = 0;
            hintView4.alpha = 0;
        }];
    }
    else
    {
        hintView1.alpha = 0;
        hintView2.alpha = 0;
        hintView3.alpha = 0;
        hintView4.alpha = 0;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end


text:
INCDIRS:=$(PLATDIR)/iOS/vm/Common/Classes

include ../common/Makefile.plugin

redpajama_set_name: RedPajamaGithub


text:
package net.jawr.web.wicket;

import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.MarkupStream;
import org.apache.wicket.markup.WicketTag;
import org.apache.wicket.markup.html.TransparentWebMarkupContainer;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.resolver.IComponentResolver;

/**
 * This class defines a tag resolver which handles <wicket:jawr> tags. The
 * tasks of this resolver will be to : - add a "transparent" WebMarkupContainer
 * to transparently handling child components. - create the right component
 * depending on the tag defined inside <wicket:jawr>
 *
 * @author Ibrahim Chaehoi
 *
 */
public class JawrWicketLinkResolver implements IComponentResolver {

	private static final String IMAGE_TAG_NAME = "image";
	private static final String IMG_TAG_NAME = "img";
	/** The serial version UID */
	private static final long serialVersionUID = -2106412613442819122L;

	@Override
	public Component resolve(MarkupContainer container,
			MarkupStream markupStream, ComponentTag tag) {

		Component component = null;

		// Only component tags have the id == "_jawrAutolink_"
		String tagName = tag.getName();
		if (tag.getId().equals(JawrWicketLinkTagHandler.AUTOLINK_ID)) {

			// create the right component depending on the tag name
			WebMarkupContainer jawrTag = null;
			final String id = tag.getId() + container.getPage().getAutoIndex();
			if (tagName.equalsIgnoreCase(IMG_TAG_NAME)) {
				jawrTag = new JawrImageReference(id);
			} else if (tagName.equalsIgnoreCase("input")
					&& tag.getAttribute("type").equals(IMAGE_TAG_NAME)) {
				jawrTag = new JawrHtmlImageReference(id);
			} else if (tagName.equalsIgnoreCase("script")) {
				jawrTag = new JawrJavascriptReference(id);
			} else if (tagName.equalsIgnoreCase("link")) {
				jawrTag = new JawrStylesheetReference(id);
			}

			if (jawrTag != null) {
				container.autoAdd(jawrTag, markupStream);
			}

			// Yes, we handled the tag
			return jawrTag;
		} else if (tag instanceof WicketTag) {

			// For tag wicket:jawr
			if (tagName.equals("jawr")) {

				final String id = tag.getId()
						+ container.getPage().getAutoIndex();
				component = new TransparentWebMarkupContainer(id);
				component.setRenderBodyOnly(true);
				container.autoAdd(component, markupStream);

				// Yes, we handled the tag
				return component;
			}
		}

		// We were not able to handle the tag
		return null;
	}

}


text:
package com.cesi.noodle.web.websocket;

import com.cesi.noodle.config.Constants;
import com.cesi.noodle.domain.Authority;
import com.cesi.noodle.domain.Conversation;
import com.cesi.noodle.domain.Message;
import com.cesi.noodle.domain.User;
import com.cesi.noodle.domain.enumeration.ConversationState;
import com.cesi.noodle.repository.AuthorityRepository;
import com.cesi.noodle.repository.ConversationRepository;
import com.cesi.noodle.repository.MessageRepository;
import com.cesi.noodle.repository.UserRepository;
import com.cesi.noodle.security.AuthoritiesConstants;
import com.cesi.noodle.security.SecurityUtils;
import com.cesi.noodle.service.ConversationService;
import com.cesi.noodle.service.UserService;
import com.cesi.noodle.web.rest.dto.MessageDTO;
import com.cesi.noodle.web.rest.mapper.MessageMapper;
import org.hibernate.Hibernate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.messaging.simp.SimpMessageSendingOperations;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.annotation.SendToUser;
import org.springframework.messaging.simp.annotation.SubscribeMapping;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.SerializationUtils;

import java.security.Principal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * Created by memilian on 23/06/16.
 */
@Controller
public class ChatService {

    @Autowired
    SimpMessageSendingOperations messagingTemplate;
    @Autowired
    UserRepository userRepository;
    @Autowired
    ConversationService conversationService;
    @Autowired
    ConversationRepository conversationRepository;
    @Autowired
    MessageRepository messageRepository;
    @Autowired
    MessageMapper messageMapper;

    private static final Logger log = LoggerFactory.getLogger(ChatService.class);

    private DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    @Autowired
    private SimpMessagingTemplate simpMessagingTemplate;

    @Autowired
    private WebSocketSessionManager sessionManager;

    /**
     * Called on page initialization
     * gets the conversation token for the current user, or creates a new one
     * @param principal
     * @return
     */
    @MessageMapping("/chat/conv/init")
    @SendToUser("/topic/chat/conv/token")
    public String getConversationToken(Principal principal){
        Conversation conversation = conversationService.getOrCreateConversationForStudent(principal.getName());
        log.info("retrieved conversation : " + conversation.getToken());
        return conversation.getToken();
    }

    @MessageMapping("/chat/conv/list")
    @SendToUser("/topic/chat/conv/list")
    public List<Conversation> listConversations(Principal principal){
        List<Conversation> conversations = conversationService.getPendingConversations();
        conversations.addAll(conversationService.getOpenedConversations(principal.getName()));
        return conversations;
    }

    @MessageMapping("/chat/conv/{token}/accept")
    public void acceptConversation(@DestinationVariable("token") String token, Principal principal){
        User user = userRepository.findOneByLogin(principal.getName()).get();
        Conversation conversation = conversationRepository.getOneByToken(token);
        conversation.setSupport(user);
        conversation.setState(ConversationState.IN_PROGRESS);
        conversationRepository.save(conversation);
        messagingTemplate.convertAndSend("/topic/chat/conv/changed", conversation);
    }

    @MessageMapping("/chat/conv/{token}/close")
    public void closeConversation(@DestinationVariable("token") String token, Principal principal){
        User user = userRepository.findOneByLogin(principal.getName()).get();
        Conversation conversation = conversationRepository.getOneByToken(token);
        if(! user.getLogin().equals(conversation.getSupport().getLogin()) && !SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)){
            log.warn("Unauthorized access "+user.getLogin());
            return;
        }

        conversation.setState(ConversationState.CLOSED);
        conversationRepository.save(conversation);
        messagingTemplate.convertAndSend("/topic/chat/conv/close", conversation);
        messagingTemplate.convertAndSend("/topic/chat/conv/"+token+"/closed", conversation);
    }

    @Transactional
    @MessageMapping("/chat/conv/{token}/hist")
    @SendTo("/topic/chat/conv/{token}/hist")
    public List<MessageDTO> getConversationHistory(@DestinationVariable("token") String token){
        Conversation conversation = conversationRepository.getOneByToken(token);
        Hibernate.initialize(conversation.getMessages());
        List<MessageDTO> result = new ArrayList<>();
        conversation.getMessages().forEach(message1 -> result.add(messageMapper.messageToMessageDTO(message1)));
        return result;
    }

    @Transactional //Fix LazyInitializationException
    @MessageMapping("/chat/conv/{token}")
    @SendTo("/topic/chat/conv/{token}")
    public MessageDTO sendMessage(@DestinationVariable("token") String token, @Payload Message message){
        log.debug("conv message : " + message.getContent());
        Conversation conversation = conversationRepository.getOneByToken(token);
        if(conversation == null){
            log.error("no conversation with token "+token);
            return null;
        }

        message.setUser(userRepository.findOneByLogin(message.getUser().getLogin()).get());
        message.setConversation(conversation);
        message.setTime(ZonedDateTime.now());
        Hibernate.initialize(conversation.getMessages()); //Fix LazyInitializationException
        Set<Message> messages = conversation.getMessages();
        messages.add(message);
        if(conversation.getState() == ConversationState.INACTIVE) {
            conversation.setState(ConversationState.PENDING);
            messagingTemplate.convertAndSend("/topic/chat/conv/new", conversation);
        }
        conversation.setMessages(messages);
        messageRepository.save(message);
        conversationRepository.save(conversation);
        return messageMapper.messageToMessageDTO(message);
    }
}


text:
	#include "atomic_windows_msvc.inc"
#elif SMILE_OS == SMILE_OS_LINUX && SMILE_COMPILER == SMILE_COMPILER_GCC
	#include "atomic_linux_gcc.inc"
#else
	#error Atomic operations suitable for the current CPU/OS combination are not defined in 'atomic.c'.
#endif


text:
<?php
namespace Test\TestBundle\Document;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Tpg\ExtjsBundle\Annotation as Extjs;
use JMS\Serializer\Annotation as JMS;

/**
 * @Extjs\Model(name="Test.document.Client")
 * @ODM\Document(collection="client")
 */
class Client {
    /**
     * @ODM\Id
     * @JMS\Type("string")
     */
    protected $id;

    /**
     * @ODM\Field(type="string")
     * @JMS\Type("string")
     */
    protected $firstName;

    /**
     * @ODM\String
     * @JMS\Type("string")
     */
    protected $lastName;

    /**
     * @ODM\ReferenceMany(targetDocument="Test\TestBundle\Document\Order", mappedBy="client")
     */
    protected $orders;

    public function __construct()
    {
        $this->orders = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get id
     *
     * @return id $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set firstName
     *
     * @param string $firstName
     * @return self
     */
    public function setFirstName($firstName)
    {
        $this->firstName = $firstName;
        return $this;
    }

    /**
     * Get firstName
     *
     * @return string $firstName
     */
    public function getFirstName()
    {
        return $this->firstName;
    }

    /**
     * Set lastName
     *
     * @param string $lastName
     * @return self
     */
    public function setLastName($lastName)
    {
        $this->lastName = $lastName;
        return $this;
    }

    /**
     * Get lastName
     *
     * @return string $lastName
     */
    public function getLastName()
    {
        return $this->lastName;
    }

    /**
     * Add orders
     *
     * @param Test\TestBundle\Document\Order $orders
     *
     * @return $this
     */
    public function addOrder(\Test\TestBundle\Document\Order $orders)
    {
        $this->orders[] = $orders;
        $orders->setClient($this);
        return $this;
    }

    /**
     * Remove orders
     *
     * @param Test\TestBundle\Document\Order $orders
     */
    public function removeOrder(\Test\TestBundle\Document\Order $orders)
    {
        $this->orders->removeElement($orders);
        $orders->setClient(null);
    }

    /**
     * Get orders
     *
     * @return Doctrine\Common\Collections\Collection $orders
     */
    public function getOrders()
    {
        return $this->orders;
    }
}


text:
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProfileSocialsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('profile_socials', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('qq')->nullable();
            $table->integer('user_id');
            $table->string('email')->nullable();
            $table->integer('phone')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('profile_socials');
    }
}


text:
//
//  PYAxisLine.h
//  iOS-Echarts
//
//  Created by Pluto Y on 15/9/7.
//  Copyright (c) 2015年 pluto-y. All rights reserved.
//

#import <Foundation/Foundation.h>

@class PYLineStyle;

/**
 *
 *  You can goto this website for references:
 *  http://echarts.baidu.com/echarts2/doc/doc.html#AxisAxisline
 *
 */
@interface PYAxisLine : NSObject

@property (nonatomic, assign) BOOL show;
@property (nonatomic, assign) BOOL onZero;
@property (nonatomic, strong) PYLineStyle *lineStyle;

PYInitializerTemplate(PYAxisLine, axisLine);

PYPropertyEqualTemplate(PYAxisLine, BOOL, show);
PYPropertyEqualTemplate(PYAxisLine, BOOL, onZero);
PYPropertyEqualTemplate(PYAxisLine, PYLineStyle *, lineStyle);

@end


text:
package org.apache.hadoop.hdfs.nfs.nfs3;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.nfs.mount.Mountd;
import org.apache.hadoop.nfs.nfs3.Nfs3Base;
import org.apache.hadoop.util.StringUtils;

/**
 * Nfs server. Supports NFS v3 using {@link RpcProgramNfs3}.
 * Currently Mountd program is also started inside this class.
 * Only TCP server is supported and UDP is not supported.
 */
public class Nfs3 extends Nfs3Base {
  public Nfs3(List<String> exports) throws IOException {
    super(new Mountd(exports), new RpcProgramNfs3(exports));
  }

  public Nfs3(List<String> exports, Configuration config) throws IOException {
    super(new Mountd(exports, config), new RpcProgramNfs3(exports, config));
  }

  public static void main(String[] args) throws IOException {
    StringUtils.startupShutdownMessage(Nfs3.class, args, LOG);
    List<String> exports = new ArrayList<String>();
    exports.add("/");
    final Nfs3 nfsServer = new Nfs3(exports);
    nfsServer.start(true);
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
  <!-- Copyright 2009 Joe LaPenna -->

<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="?android:attr/listPreferredItemHeight"
  android:paddingTop="5dip"
  android:paddingLeft="7dip"
  android:paddingRight="5dip"
  android:paddingBottom="5dip"
  style="@style/listItemStyle" >

  <ImageView
    android:id="@+id/tipPhoto"
	android:layout_height="46dip"
	android:layout_width="46dip"
    android:background="@drawable/photo_background"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:padding="3dip"
    android:src="@drawable/blank_boy"
    android:scaleType="fitXY" />

    <LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"
      android:paddingLeft="8dip" >

      <TextView
        android:id="@+id/tipTextView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:textAppearance="@style/TextViewStyleTipListItemTip" />

      <TextView
        android:id="@+id/userTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:maxLines="1"
        android:scrollHorizontally="true"
        android:ellipsize="end"
        android:textAppearance="@style/TextViewStyleTipListItemSignature" />

  </LinearLayout>

</LinearLayout>


text:
package net.jueb.util4j.net.nettyImpl.server;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.socket.ServerSocketChannel;
import lombok.extern.slf4j.Slf4j;
import net.jueb.util4j.net.JNetServer;

import java.net.InetSocketAddress;

/**
 * 抽象服务端基类
 * 实现服务端生命周期和绑定监听
 * @author Administrator
 */
@Slf4j
public abstract class AbstractNettyServer implements JNetServer{

	protected final InetSocketAddress local;
	private String name="NettyServer";
	protected ServerSocketChannel serverCahnel;

	public AbstractNettyServer(InetSocketAddress local) {
		this.local=local;
	}

	/**
	 * 获取服务端使用的起动器
	 * @return
	 */
	public abstract ServerBootstrap getBooter();
	/**
	 * 获取服务端使用的IO线程池
	 * @return
	 */
	public abstract EventLoopGroup getIoWorkers();
	/**
	 * 获取服务端使用的选择线程池
	 * @return
	 */
	public abstract EventLoopGroup getBossWorkers();

	/**
	 * 启动端口绑定
	 * @param local
	 * @return
	 */
	protected final boolean bind(InetSocketAddress local)
	{
		boolean isBind=false;
		try {
			log.debug(getName()+"端口绑定中……"+local.toString());
			ChannelFuture cf=doBind(local);
			isBind=cf.channel()!=null && cf.channel().isActive();
			if(isBind)
			{
				log.debug(getName()+"端口绑定成功!"+cf.channel());
				serverCahnel=(ServerSocketChannel) cf.channel();
			}else
			{
				log.debug(getName()+"端口绑定失败!"+cf.channel());
			}
		} catch (Exception e) {
			log.error(e.getMessage(),e);
			throw e;
		}
		return isBind;
	}

	/**
	 * 使用起动器进行端口绑定
	 * @param local
	 * @return
	 */
	protected abstract ChannelFuture doBind(InetSocketAddress local);

	@Override
	public final boolean start() {
		return bind(local);
	}

	@Override
	public final void stop() {
		if(serverCahnel!=null)
		{
			serverCahnel.close();
		}
	}

	@Override
	public boolean isActive() {
		return serverCahnel!=null && serverCahnel.isActive();
	}

	@Override
	public final String getName() {
		return name;
	}
	@Override
	public final void setName(String name) {
		if(name!=null)
		{
			this.name=name;
		}
	}
}


text:
require 'rubygems'
require 'test/unit'
require 'shoulda'

ACTIVE_RECORD_TEST_ROOT = File.expand_path(File.dirname(__FILE__))
MODELS_ROOT = File.join(ACTIVE_RECORD_TEST_ROOT,"models")

$LOAD_PATH.unshift(MODELS_ROOT)
$LOAD_PATH.unshift(ACTIVE_RECORD_TEST_ROOT)

require 'logger'
require 'active_record'

require File.join(ACTIVE_RECORD_TEST_ROOT, '..', 'test_helper')
require File.join(MODELS_ROOT,'author')
require File.join(MODELS_ROOT,'category')
require File.join(MODELS_ROOT,'blog')
require File.join(MODELS_ROOT,'post')

config = {
  :sqlite3 => {
    :adapter  => 'sqlite3',
    :username => 'rails',
    :encoding => 'utf8',
    :database => ':memory:',
  }
}

ActiveRecord::Base.configurations = config[:sqlite3]
ActiveRecord::Base.establish_connection config[:sqlite3]
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger.level = Logger::DEBUG

ActiveRecord::Schema.define(:version => 0) do

  create_table :categories do |t|
    t.string :name
  end

  create_table :blogs do |t|
    t.integer :id, :null => false
    t.string :title
    t.references :category
  end

  create_table :authors do |t|
    t.integer :id, :null => false
    t.string :name
  end

  create_table :posts do |t|
    t.integer :id, :null => false
    t.references :author, :null => false
    t.references :blog, :null => false
    t.boolean :active, :null => false, :default => true
    t.string :title
    t.string :text
  end

 end


text:
|     Problem statement     |           Solution            |
|:--------------------------|:-----------------------------:|
| [Solve me first][]        | [solve_me_first.cpp][]        |
| [Solve me second][]       | [solve_me_second.cpp][]       |
| [Simple Array Sum][]      | [simple_array_sum.cpp][]      |
| [A Very Big Sum][]        | [a_very_big_sum.cpp][]        |
| [Diagonal Difference][]   | [diagonal_difference.cpp][]   |
| [Plus Minus][]            | [plus_minus.cpp][]            |
| [Staircase][]             | [staircase.cpp][]             |
| [Time Conversion][]       | [time_conversion.cpp][]       |
| [Library Fine][]          | [library_fine.cpp][]          |
| [Caesar Cipher][]         | [caesar_cipher.cpp][]         |
| [Extra long factorials][] | [extra_long_factorials.cpp][] |

[Solve me first]:        https://www.hackerrank.com/challenges/solve-me-first
[Solve me second]:       https://www.hackerrank.com/challenges/solve-me-second
[Simple Array Sum]:      https://www.hackerrank.com/challenges/simple-array-sum
[A Very Big Sum]:        https://www.hackerrank.com/challenges/a-very-big-sum
[Diagonal Difference]:   https://www.hackerrank.com/challenges/diagonal-difference
[Plus Minus]:            https://www.hackerrank.com/challenges/plus-minus
[Staircase]:             https://www.hackerrank.com/challenges/staircase
[Time Conversion]:       https://www.hackerrank.com/challenges/time-conversion
[Library Fine]:          https://www.hackerrank.com/challenges/library-fine
[Caesar Cipher]:         https://www.hackerrank.com/challenges/caesar-cipher-1
[Extra long factorials]: https://www.hackerrank.com/challenges/extra-long-factorials

[solve_me_first.cpp]:        solve_me_first.cpp
[solve_me_second.cpp]:       lonely_integer.cpp
[simple_array_sum.cpp]:      simple_array_sum.cpp
[a_very_big_sum.cpp]:        a_very_big_sum.cpp
[diagonal_difference.cpp]:   diagonal_difference.cpp
[plus_minus.cpp]:            plus_minus.cpp
[staircase.cpp]:             staircase.cpp
[time_conversion.cpp]:       time_conversion.cpp
[library_fine.cpp]:          library_fine.cpp
[caesar_cipher.cpp]:         caesar_cipher.cpp
[extra_long_factorials.cpp]: extra_long_factorials.cpp


text:
@extends('layouts.app')

@section('pageTitle', 'Product')

@section('content')

{{ $product->getShortDescription() }}

          Short Description:
          {{ $product->getShortDescription() }}

          Description:
          {{ $product->getLongDescription() }}

          Barcode:
          {{ $product->getBarcode() }}

          Price:
          @money($product->getPrice(), 'GBP')

  @can('snackspace.product.edit')
  getId()) }}" class="btn btn-info btn-block">  Edit

  @endcan

@endsection


text:
function Add-VSWAFRegionalByteMatchSetFieldToMatch {
    <#
    .SYNOPSIS
        Adds an AWS::WAFRegional::ByteMatchSet.FieldToMatch resource property to the template. **Note**

    .DESCRIPTION
        Adds an AWS::WAFRegional::ByteMatchSet.FieldToMatch resource property to the template.
**Note**

This is **AWS WAF Classic** documentation. For more information, see AWS WAF Classic: https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html in the developer guide.

**For the latest version of AWS WAF**, use the AWS WAFV2 API and see the AWS WAF Developer Guide: https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

Specifies where in a web request to look for TargetString.

    .LINK
        http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-fieldtomatch.html

    .PARAMETER Type
        The part of the web request that you want AWS WAF to search for a specified string. Parts of a request that you can search include the following:
+  HEADER: A specified request header, for example, the value of the User-Agent or Referer header. If you choose HEADER for the type, specify the name of the header in Data.
+  METHOD: The HTTP method, which indicated the type of operation that the request is asking the origin to perform.
+  QUERY_STRING: A query string, which is the part of a URL that appears after a ? character, if any.
+  URI: The part of a web request that identifies a resource, for example, /images/daily-ad.jpg.
+  BODY: The part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form. The request body immediately follows the request headers. Note that only the first 8192 bytes of the request body are forwarded to AWS WAF for inspection. To allow or block requests based on the length of the body, you can create a size constraint set.
+  SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, such as *UserName* or *SalesRegion*. The maximum length for SINGLE_QUERY_ARG is 30 characters.
+  ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but rather than inspecting a single parameter, AWS WAF will inspect all parameters within the query for the value or regex pattern that you specify in TargetString.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-fieldtomatch.html#cfn-wafregional-bytematchset-fieldtomatch-type
        PrimitiveType: String
        UpdateType: Mutable

    .PARAMETER Data
        When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for example, User-Agent or Referer. The name of the header is not case sensitive.
When the value of Type is SINGLE_QUERY_ARG, enter the name of the parameter that you want AWS WAF to search, for example, UserName or SalesRegion. The parameter name is not case sensitive.
If the value of Type is any other value, omit Data.

        Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafregional-bytematchset-fieldtomatch.html#cfn-wafregional-bytematchset-fieldtomatch-data
        PrimitiveType: String
        UpdateType: Mutable

    .FUNCTIONALITY
        Vaporshell
    #>
    [OutputType('Vaporshell.Resource.WAFRegional.ByteMatchSet.FieldToMatch')]
    [cmdletbinding()]
    Param
    (
        [parameter(Mandatory = $true)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $Type,
        [parameter(Mandatory = $false)]
        [ValidateScript( {
                $allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
                if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
                    $true
                }
                else {
                    $PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
                }
            })]
        $Data
    )
    Begin {
        $obj = [PSCustomObject]@{}
        $commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
    }
    Process {
        foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
            switch ($key) {
                Default {
                    $obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
                }
            }
        }
    }
    End {
        $obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.WAFRegional.ByteMatchSet.FieldToMatch'
        Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
    }
}


text:
<?php
namespace App\Modules\Kagi\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

trait KagiResetPassword {

	/**
	 * The Guard implementation.
	 *
	 * @var Guard
	 */
	protected $auth;

	/**
	 * The password broker implementation.
	 *
	 * @var PasswordBroker
	 */
	protected $passwords;

	/**
	 * Display the form to request a password reset link.
	 *
	 * @return Response
	 */
	public function getEmail()
	{
		return View('kagi::auth.password');
	}

	/**
	 * Send a reset link to the given user.
	 *
	 * @param  Request  $request
	 * @return Response
	 */
	public function postEmail(Request $request)
	{
		$this->validate($request, ['email' => 'required']);

		$response = $this->passwords->sendResetLink($request->only('email'), function($m)
		{
			$m->subject($this->getEmailSubject());
		});

		switch ($response)
		{
			case PasswordBroker::RESET_LINK_SENT:
				return redirect()->back()->with('status', trans($response));

			case PasswordBroker::INVALID_USER:
				return redirect()->back()->withErrors(['email' => trans($response)]);
		}
	}

	/**
	 * Get the e-mail subject line to be used for the reset link email.
	 *
	 * @return string
	 */
	protected function getEmailSubject()
	{
		return isset($this->subject) ? $this->subject : trans('kotoba::email.password_link');
	}

	/**
	 * Display the password reset view for the given token.
	 *
	 * @param  string  $token
	 * @return Response
	 */
	public function getReset($token = null)
	{
		if (is_null($token))
		{
			throw new NotFoundHttpException;
		}

		return View('kagi::auth.reset')->with('token', $token);
	}

	/**
	 * Reset the given user's password.
	 *
	 * @param  Request  $request
	 * @return Response
	 */
	public function postReset(Request $request)
	{
		$this->validate($request, [
			'token' => 'required',
			'email' => 'required',
			'password' => 'required|confirmed',
		]);

		$credentials = $request->only(
			'email', 'password', 'password_confirmation', 'token'
		);

		$response = $this->passwords->reset($credentials, function($user, $password)
		{
			$user->password = bcrypt($password);

			$user->save();

			$this->auth->login($user);
		});

		switch ($response)
		{
			case PasswordBroker::PASSWORD_RESET:
				return redirect($this->redirectPath());

			default:
				return redirect()->back()
							->withInput($request->only('email'))
							->withErrors(['email' => trans($response)]);
		}
	}

	/**
	 * Get the post register / login redirect path.
	 *
	 * @return string
	 */
	public function redirectPath()
	{
		return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';
	}

}


text:
package com.github.tminglei.bind;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.stream.Collectors;

import static com.github.tminglei.bind.FrameworkUtils.*;

/**
 * framework's core interfaces/implementations
 */
public class Framework {
    @FunctionalInterface
    public interface Messages {
        String get(String key);
    }
    @FunctionalInterface
    public interface PreProcessor extends Metable<ExtensionMeta> {
        Map<String, String> apply(String prefix, Map<String, String> data, Options options);
    }
    @FunctionalInterface
    public interface Constraint extends Metable<ExtensionMeta> {
        List<Map.Entry<String, String>> apply(String name, Map<String, String> data, Messages messages, Options options);
    }
    @FunctionalInterface
    public interface ExtraConstraint<T> extends Metable<ExtensionMeta> {
        List<String> apply(String label, T vObj, Messages messages);
    }
    @FunctionalInterface
    public interface TouchedChecker {
        boolean apply(String prefix, Map<String, String> data);
    }
    @FunctionalInterface
    public interface Function3<T1,T2,T3,R> {
        R apply(T1 p1, T2 p2, T3 p3);
    }
    @FunctionalInterface
    public interface Function4<T1,T2,T3,T4,R> {
        R apply(T1 p1, T2 p2, T3 p3, T4 p4);
    }

    public interface Extensible extends java.lang.Cloneable {
        Extensible clone();
    }
    public interface Metable<M> {
        default M meta() { return null; }
    }
    ///
    public enum InputMode {
        SINGLE, MULTIPLE, POLYMORPHIC
    }
    public static class MappingMeta {
        public final Class<?> targetType;
        public final Mapping<?>[] baseMappings;

        public MappingMeta(Class<?> targetType, Mapping<?>... baseMappings) {
            this.targetType = targetType;
            this.baseMappings = baseMappings;
        }
    }
    public static class ExtensionMeta {
        public final String name;
        public final String desc;
        public final List<?> params;

        public ExtensionMeta(String name, String desc, List<?> params) {
            this.name = name;
            this.desc = desc;
            this.params = unmodifiableList(params);
        }
    }

    /////////////////////////////////////////////////////////////////////////////////////////////////
    /**
     * A mapping, w/ constraints/processors/options, was used to validate/convert input data
     */
    public interface Mapping<T> extends Metable<MappingMeta> {

        /**
         * @return options associated with the mapping
         */
        Options options();

        /**
         * change options associated with the mapping
         * @param setting function used to change the options
         * @return the mapping
         */
        Mapping<T> options(Function<Options, Options> setting);

        /**
         * set label which was used to flag the data node
         * @param label label
         * @return the mapping
         */
        default Mapping<T> label(String label) {
            return options(o -> o._label(label));
        }

        /**
         * change extensions associated with the mapping
         * @param setting function used to change the extensions
         * @return the mapping
         */
        default <E extends Extensible> Mapping<T> $ext(Function<E, E> setting) {
            return options(o -> {
                E ext = (E) (o._ext() != null ? o._ext().clone() : null);
                return o._ext(setting.apply(ext));
            });
        }

        /**
         * attach some pre-processors to the mapping
         * @param newProcessors pre-processors
         * @return the mapping
         */
        default Mapping<T> processor(PreProcessor... newProcessors) {
            return options(o -> o.append_processors(Arrays.asList(newProcessors)));
        }

        /**
         * attach some constraints to the mapping
         * @param newConstraints constraints
         * @return the mapping
         */
        default Mapping<T> constraint(Constraint... newConstraints) {
            return options(o -> o.append_constraints(Arrays.asList(newConstraints)));
        }

        /**
         * attach some extra constraints, which was used to do some extra checking
         * after string was converted to target value, to the mapping
         * @param newConstraints extra constraints
         * @return the mapping
         */
        default Mapping<T> verifying(ExtraConstraint<T>... newConstraints) {
            return options(o -> o.append_extraConstraints(Arrays.asList(newConstraints)));
        }

        ///

        /**
         * used to convert raw string value to target type's value
         * @param name full path name
         * @param data data
         * @return converted value
         */
        T convert(String name, Map<String, String> data);

        /**
         * used to validate raw string data values w/ or w/o data keys
         * @param name full path name
         * @param data data
         * @param messages the message holder
         * @param parentOptions parent options
         * @return error list
         */
        List<Map.Entry<String, String>> validate(
                String name, Map<String, String> data, Messages messages, Options parentOptions);

        /**
         * transform this result value to another type
         * @param transform
         * @param <R>
         * @return
         */
        default <R> Mapping<R> mapTo(Function<T, R> transform) {
            return new TransformMapping<>(this, transform);
        }
    }

    /**
     * A wrapper mapping, used to transform converted value to another type
     */
    private static class TransformMapping<T, R> implements Mapping<R> {
        private final Mapping<T> base;
        private final Function<T, R> transform;
        private final List<ExtraConstraint<R>> extraConstraints;

        private final Logger logger = LoggerFactory.getLogger(TransformMapping.class);

        TransformMapping(Mapping<T> base, Function<T, R> transform) {
            this(base, transform, Collections.EMPTY_LIST);
        }
        TransformMapping(Mapping<T> base, Function<T, R> transform, List<ExtraConstraint<R>> extraConstraints) {
            this.base = base;
            this.transform = transform;
            this.extraConstraints = unmodifiableList(extraConstraints);
        }

        @Override
        public MappingMeta meta() {
            return base.meta();
        }

        @Override
        public Options options() {
            return base.options();
        }

        @Override
        public Mapping<R> options(Function<Options, Options> setting) {
            return new TransformMapping(base.options(setting), transform, extraConstraints);
        }

        @Override
        public Mapping<R> verifying(ExtraConstraint<R>... newConstraints) {
            return new TransformMapping(base, transform, (List<ExtraConstraint<R>>) appendList(this.extraConstraints, newConstraints));
        }

        @Override
        public R convert(String name, Map<String, String> data) {
            logger.debug("transforming {}", name);
            return transform.apply(base.convert(name, data));
        }

        @Override
        public List<Map.Entry<String, String>> validate(String name, Map<String, String> data,
                                                        Messages messages, Options parentOptions) {
            List<Map.Entry<String, String>> errors = base.validate(name, data, messages, parentOptions);
            if (errors.isEmpty()) {
                return Optional.ofNullable(convert(name, data))
                        .map(v -> extraValidateRec(name, v, messages, parentOptions, extraConstraints))
                        .orElse(Collections.EMPTY_LIST);
            } else return errors;
        }
    }

    /**
     * In general, a field mapping is an atomic mapping, which doesn't contain other mappings
     */
    public static class FieldMapping<T> implements Mapping<T> {
        private final Options options;
        private final Constraint moreValidate;
        private final BiFunction<String, Map<String, String>, T> doConvert;
        private final MappingMeta meta;

        private final Logger logger = LoggerFactory.getLogger(FieldMapping.class);

        FieldMapping(InputMode inputMode, BiFunction<String, Map<String, String>, T> doConvert, MappingMeta meta) {
            this(inputMode, doConvert, FrameworkUtils.PassValidating, Options.EMPTY, meta);
        }
        FieldMapping(InputMode inputMode, BiFunction<String, Map<String, String>, T> doConvert, Constraint moreValidate, MappingMeta meta) {
            this(inputMode, doConvert, moreValidate, Options.EMPTY, meta);
        }
        FieldMapping(InputMode inputMode, BiFunction<String, Map<String, String>, T> doConvert,
                     Constraint moreValidate, Options options, MappingMeta meta) {
            this.doConvert = doConvert;
            this.moreValidate = moreValidate;
            this.options = options._inputMode(inputMode);
            this.meta = meta;
        }

        @Override
        public MappingMeta meta() {
            return meta;
        }

        @Override
        public Options options() {
            return options;
        }

        @Override
        public Mapping<T> options(Function<Options, Options> setting) {
            return new FieldMapping<T>(
                    this.options()._inputMode(),
                    this.doConvert,
                    this.moreValidate,
                    setting.apply(this.options()),
                    this.meta
                );
        }

        @Override
        public T convert(String name, Map<String, String> data) {
            logger.debug("converting {}", name);
            Map<String, String> newData = processDataRec(name, data, options(), options()._processors());
            return doConvert.apply(name, newData);
        }

        @Override
        public List<Map.Entry<String, String>> validate(String name, Map<String, String> data,
                                                Messages messages, Options parentOptions) {
            logger.debug("validating {}", name);

            Options theOptions = options().merge(parentOptions);
            Map<String, String> newData = processDataRec(name, data, theOptions, theOptions._processors());

            if (isUntouchedEmpty(name, newData, theOptions)) return Collections.EMPTY_LIST;
            else {
                List<Constraint> validators = appendList(theOptions._ignoreConstraints() ? null : theOptions._constraints(), moreValidate);
                List<Map.Entry<String, String>> errors = validateRec(name, newData, messages, theOptions, validators);
                if (errors.isEmpty()) {
                    return Optional.ofNullable(doConvert.apply(name, newData))
                            .map(v -> extraValidateRec(name, v, messages, theOptions, theOptions._extraConstraints()))
                            .orElse(Collections.EMPTY_LIST);
                } else return errors;
            }
        }
    }

    /**
     * A group mapping is a compound mapping, and is used to construct a complex/nested mapping
     */
    public static class GroupMapping implements Mapping<BindObject> {
        private final Options options;
        private final List<Map.Entry<String, Mapping<?>>> fields;
        private final MappingMeta meta = new MappingMeta(BindObject.class);

        private final Logger logger = LoggerFactory.getLogger(GroupMapping.class);

        GroupMapping(List<Map.Entry<String, Mapping<?>>> fields) {
            this(fields, Options.EMPTY);
        }
        GroupMapping(List<Map.Entry<String, Mapping<?>>> fields, Options options) {
            this.fields = unmodifiableList(fields);
            this.options = options._inputMode(InputMode.MULTIPLE);
        }

        public List<Map.Entry<String, Mapping<?>>> fields() {
            return fields;
        }

        @Override
        public MappingMeta meta() {
            return meta;
        }

        @Override
        public Options options() {
            return options;
        }

        @Override
        public Mapping<BindObject> options(Function<Options, Options> setting) {
            return new GroupMapping(
                    this.fields,
                    setting.apply(this.options())
                );
        }

        @Override
        public BindObject convert(String name, Map<String, String> data) {
            logger.debug("converting {}", name);

            Map<String, String> newData = processDataRec(name, data, options, options._processors());
            return isEmptyInput(name, newData, options._inputMode()) ? null
                    : doConvert(name, newData);
        }

        private BindObject doConvert(String name, Map<String, String> data) {
            Map<String, Object> values = new HashMap<>();
            if (!isEmptyInput(name, data, options._inputMode())) {
                for(Map.Entry<String, Mapping<?>> field : fields) {
                    String fullName = isEmptyStr(name) ? field.getKey() : name + "." + field.getKey();
                    Object value = field.getValue().convert(fullName, data);
                    values.put(field.getKey(), value);
                }
            }
            return new BindObject(values);
        }

        @Override
        public List<Map.Entry<String, String>> validate(String name, Map<String, String> data,
                                                Messages messages, Options parentOptions) {
            logger.debug("validating {}", name);

            Options theOptions = options().merge(parentOptions);
            Map<String, String> newData = processDataRec(name, data, theOptions, theOptions._processors());

            if (isUntouchedEmpty(name, newData, theOptions)) return Collections.EMPTY_LIST;
            else {
                List<Constraint> validators = appendList(theOptions._constraints(),
                        (name1, data1, messages1, options1) -> {
                            if (isEmptyInput(name1, data1, options1._inputMode())) return Collections.EMPTY_LIST;
                            else {
                                return fields.stream().flatMap(field -> {
                                    String fullName = isEmptyStr(name1) ? field.getKey() : name1 + "." + field.getKey();
                                    return field.getValue().validate(fullName, data1, messages1, options1)
                                            .stream();
                                }).collect(Collectors.toList());
                            }
                        });

                List<Map.Entry<String, String>> errors = validateRec(name, newData, messages, theOptions, validators);
                if (errors.isEmpty()) {
                    if (isEmptyInput(name, newData, theOptions._inputMode())) return Collections.EMPTY_LIST;
                    else {
                        BindObject vObj = doConvert(name, newData);
                        return extraValidateRec(name, vObj, messages, theOptions, theOptions._extraConstraints());
                    }
                }
                return errors;
            }
        }
    }

}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CreditBar : MonoBehaviour {
	//reference
	public static CreditBar creditBar;
	// Reference GameControl
	private GameControl ctrl;
	// the output on screen
	public Text credits;
	public Text warfunds;
	public Text gold;

//	void Awake () {
//		if (creditBar == null) {
//			DontDestroyOnLoad (gameObject);
//			creditBar = this;
//		} else if (creditBar != this) {
//			Destroy (gameObject);
//		}
//	}
	// Use this for initialization
	void Start () {
		ctrl = GameControl.control;
		credits.text = ctrl.Credits.ToString();
		warfunds.text = ctrl.Warfunds.ToString();
		gold.text = ctrl.Gold.ToString();
	}

	// Update is called once per frame
	void FixedUpdate () {
		ctrl = GameControl.control;
		credits.text = ctrl.Credits.ToString();
		warfunds.text = ctrl.Warfunds.ToString();
		gold.text = ctrl.Gold.ToString();
	}
}


text:
/*
 * Nivo Lightbox Default Theme v1.0
 * http://dev7studios.com/nivo-lightbox
 *
 * Copyright 2013, Dev7studios
 * Free to use and abuse under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 */

.nivo-lightbox-theme-default.nivo-lightbox-overlay {
	background: #666;
	background: rgba(0,0,0,0.6);
}
.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading { background: url("../img/icons/loading.gif") no-repeat 50% 50%; }

.nivo-lightbox-theme-default .nivo-lightbox-nav {
	top: 10%;
	width: 8%;
	height: 80%;
	text-indent: -9999px;
	background-repeat: no-repeat;
	background-position: 50% 50%;
	opacity: 0.5;
}
.nivo-lightbox-theme-default .nivo-lightbox-nav:hover {
	opacity: 1;
	background-color: rgba(0,0,0,0.5);
}
.nivo-lightbox-theme-default .nivo-lightbox-prev {
	background-image: url("../img/icons/prev.png");
	border-radius: 0 3px 3px 0;
}
.nivo-lightbox-theme-default .nivo-lightbox-next {
	background-image: url("../img/icons/next.png");
	border-radius: 3px 0 0 3px;
}

.nivo-lightbox-theme-default .nivo-lightbox-close {
	display: block;
	width: 40px;
	height: 40px;
	opacity: 0.8;
	position: absolute;
	right: 4%;
	top: 2%;
	color: #fff;
}
.nivo-lightbox-theme-default .nivo-lightbox-close:hover { opacity: 1; }

.nivo-lightbox-theme-default .nivo-lightbox-title-wrap { bottom: -7%; }
.nivo-lightbox-theme-default .nivo-lightbox-title {
	font: 14px/20px 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-style: normal;
	font-weight: normal;
	background: #000;
	color: #fff;
	padding: 7px 15px;
	border-radius: 30px;
}

.nivo-lightbox-theme-default .nivo-lightbox-image img {
	background: #fff;
	-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
	   -moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
	        box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
}
.nivo-lightbox-theme-default .nivo-lightbox-ajax,
.nivo-lightbox-theme-default .nivo-lightbox-inline {
	background: #fff;
	padding: 20px 5px;
	-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
	   -moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
	        box-shadow: 0px 1px 1px rgba(0,0,0,0.4);
}

@media (-webkit-min-device-pixel-ratio: 1.3),
       (-o-min-device-pixel-ratio: 2.6/2),
       (min--moz-device-pixel-ratio: 1.3),
       (min-device-pixel-ratio: 1.3),
       (min-resolution: 1.3dppx) {

	.nivo-lightbox-theme-default .nivo-lightbox-content.nivo-lightbox-loading {
		background-image: url(loading@2x.gif);
		background-size: 32px 32px;
	}
	.nivo-lightbox-theme-default .nivo-lightbox-prev {
		background-image: url(prev@2x.png);
		background-size: 48px 48px;
	}
	.nivo-lightbox-theme-default .nivo-lightbox-next {
		background-image: url(next@2x.png);
		background-size: 48px 48px;
	}
	.nivo-lightbox-theme-default .nivo-lightbox-close {
		background-image: url(close@2x.png);
		background-size: 16px 16px;
	}

}

.nivo-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99998;
	width: 100%;
	height: 100%;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
.nivo-lightbox-overlay.nivo-lightbox-open {
	visibility: visible;
	opacity: 1;
}
.nivo-lightbox-wrap  {
	position: absolute;
	top: 15%;
	bottom: 5%;
	left: 5%;
	right: 5%;
}
.nivo-lightbox-content {
	width: 100%;
	height: 100%;
}
.nivo-lightbox-title-wrap {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 99999;
	text-align: center;
}
.nivo-lightbox-nav { display: none; }
.nivo-lightbox-prev {
	position: absolute;
	top: 50%;
	left: 0;
}
.nivo-lightbox-next {
	position: absolute;
	top: 50%;
	right: 0;
}
.nivo-lightbox-close {
	position: absolute;
	top: 2%;
	right: 2%;
}

.nivo-lightbox-image { text-align: center; }
.nivo-lightbox-image img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	vertical-align: middle;
}
.nivo-lightbox-content iframe {
	width: 100%;
	height: 100%;
}
.nivo-lightbox-inline,
.nivo-lightbox-ajax {
	max-height: 100%;
	overflow: auto;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	/* https://bugzilla.mozilla.org/show_bug.cgi?id=308801 */
}
.nivo-lightbox-error {
	display: table;
	text-align: center;
	width: 100%;
	height: 100%;
	color: #fff;
	text-shadow: 0 1px 1px #000;
}
.nivo-lightbox-error p {
	display: table-cell;
	vertical-align: middle;
}

/* Effects
 **********************************************/
.nivo-lightbox-notouch .nivo-lightbox-effect-fade,
.nivo-lightbox-notouch .nivo-lightbox-effect-fadeScale,
.nivo-lightbox-notouch .nivo-lightbox-effect-slideLeft,
.nivo-lightbox-notouch .nivo-lightbox-effect-slideRight,
.nivo-lightbox-notouch .nivo-lightbox-effect-slideUp,
.nivo-lightbox-notouch .nivo-lightbox-effect-slideDown,
.nivo-lightbox-notouch .nivo-lightbox-effect-fall {
	-webkit-transition: all 0.2s ease-in-out;
	   -moz-transition: all 0.2s ease-in-out;
	    -ms-transition: all 0.2s ease-in-out;
	     -o-transition: all 0.2s ease-in-out;
	        transition: all 0.2s ease-in-out;
}

/* fadeScale */
.nivo-lightbox-effect-fadeScale .nivo-lightbox-wrap {
	-webkit-transition: all 0.3s;
	   -moz-transition: all 0.3s;
	    -ms-transition: all 0.3s;
	     -o-transition: all 0.3s;
	        transition: all 0.3s;
	-webkit-transform: scale(0.7);
	   -moz-transform: scale(0.7);
	    -ms-transform: scale(0.7);
	        transform: scale(0.7);
}
.nivo-lightbox-effect-fadeScale.nivo-lightbox-open .nivo-lightbox-wrap {
	-webkit-transform: scale(1);
	   -moz-transform: scale(1);
	    -ms-transform: scale(1);
	        transform: scale(1);
}

/* slideLeft / slideRight / slideUp / slideDown */
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap,
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap,
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap,
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
	-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
	   -moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
	    -ms-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
	     -o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
	        transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
}
.nivo-lightbox-effect-slideLeft .nivo-lightbox-wrap {
	-webkit-transform: translateX(-10%);
	   -moz-transform: translateX(-10%);
	    -ms-transform: translateX(-10%);
	        transform: translateX(-10%);
}
.nivo-lightbox-effect-slideRight .nivo-lightbox-wrap {
	-webkit-transform: translateX(10%);
	   -moz-transform: translateX(10%);
	    -ms-transform: translateX(10%);
	        transform: translateX(10%);
}
.nivo-lightbox-effect-slideLeft.nivo-lightbox-open .nivo-lightbox-wrap,
.nivo-lightbox-effect-slideRight.nivo-lightbox-open .nivo-lightbox-wrap {
	-webkit-transform: translateX(0);
	   -moz-transform: translateX(0);
	    -ms-transform: translateX(0);
	        transform: translateX(0);
}
.nivo-lightbox-effect-slideDown .nivo-lightbox-wrap {
	-webkit-transform: translateY(-10%);
	   -moz-transform: translateY(-10%);
	    -ms-transform: translateY(-10%);
	        transform: translateY(-10%);
}
.nivo-lightbox-effect-slideUp .nivo-lightbox-wrap {
	-webkit-transform: translateY(10%);
	   -moz-transform: translateY(10%);
	    -ms-transform: translateY(10%);
	        transform: translateY(10%);
}
.nivo-lightbox-effect-slideUp.nivo-lightbox-open .nivo-lightbox-wrap,
.nivo-lightbox-effect-slideDown.nivo-lightbox-open .nivo-lightbox-wrap {
	-webkit-transform: translateY(0);
	   -moz-transform: translateY(0);
	    -ms-transform: translateY(0);
	        transform: translateY(0);
}

/* fall */
.nivo-lightbox-body-effect-fall .nivo-lightbox-effect-fall {
	-webkit-perspective: 1000px;
	   -moz-perspective: 1000px;
	        perspective: 1000px;
}
.nivo-lightbox-effect-fall .nivo-lightbox-wrap {
	-webkit-transition: all 0.3s ease-out;
	   -moz-transition: all 0.3s ease-out;
	    -ms-transition: all 0.3s ease-out;
	     -o-transition: all 0.3s ease-out;
	        transition: all 0.3s ease-out;
	-webkit-transform: translateZ(300px);
	   -moz-transform: translateZ(300px);
	    -ms-transform: translateZ(300px);
	        transform: translateZ(300px);
}
.nivo-lightbox-effect-fall.nivo-lightbox-open .nivo-lightbox-wrap {
	-webkit-transform: translateZ(0);
	   -moz-transform: translateZ(0);
	    -ms-transform: translateZ(0);
	        transform: translateZ(0);
}


text:
// Copyright 2014 The Oppia Authors. All Rights Reserved.
//
// 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.

/**
 * @fileoverview Component for the Oppia 'Delete Account' page.
 */

import { Component } from '@angular/core';
import { downgradeComponent } from '@angular/upgrade/static';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { DeleteAccountBackendApiService } from './services/delete-account-backend-api.service';
import { DeleteAccountModalComponent } from './templates/delete-account-modal.component';

@Component({
  selector: 'oppia-delete-account-page',
  templateUrl: './delete-account-page.component.html'
})
export class DeleteAccountPageComponent {
  constructor(
    private ngbModal: NgbModal,
    private deleteAccountBackendApiService: DeleteAccountBackendApiService
  ) {}

  deleteAccount(): void {
    const modelRef = this.ngbModal.open(
      DeleteAccountModalComponent, { backdrop: true });
    modelRef.result.then(() => {
      this.deleteAccountBackendApiService.deleteAccount();
    }, () => {
      // Note to developers:
      // This callback is triggered when the Cancel button is clicked.
      // No further action is needed.
    });
  }
}

angular.module('oppia').directive(
  'oppiaDeleteAccountPage', downgradeComponent(
    {component: DeleteAccountPageComponent}));


text:
/**
 * Test working class Count.
 *
 * @author Anton Vasilyuk  (wrajina99@gmail.com)
 * @version $Id$
 * @since 0.1
 */
package ru.job4j;


text:
class Solution {
public:
    unordered_map<string, unordered_map<string, double>> edges;

    double dfs(string cur, const string & dest, unordered_set<string> path) {
        if (!edges.count(cur)) {
            return -1.0;
        }
        if (cur == dest) {
            return 1.0;
        }
        double temp = -1.0;
        for (auto p : edges[cur]) {
            if (path.count(p.first)) {
                continue;
            }
            path.emplace(p.first);
            double v = dfs(p.first, dest, path);
            if (v != -1.0) {
                temp = edges[cur][p.first] * v;
            }
        }
        return temp;
    }

    vector<double> calcEquation(vector<pair<string, string>> equations, vector<double>& values, vector<pair<string, string>> queries) {
        int n = equations.size();
        for (int i = 0; i < n; i++) {
            edges[equations[i].first][equations[i].second] = values[i];
            edges[equations[i].second][equations[i].first] = 1.0 / values[i];
            edges[equations[i].first][equations[i].first] = 1.0;
            edges[equations[i].second][equations[i].second] = 1.0;

        }
        vector<double> result;
        for (auto q : queries) {
            unordered_set<string> path = {q.first};
            result.emplace_back(dfs(q.first, q.second, path));
        }
        return result;
    }
};


text:
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models

class Migration(DataMigration):

    def forwards(self, orm):
        """
        Adjust amounts for MonthlyOrder and MonthlyDonation after
        changing it from integer (cents) to decimal (euro).
        """
        for monthly_order in orm['recurring_donations.MonthlyOrder'].objects.all():
            monthly_order.amount /= 100
            monthly_order.save()

        for monthly_donation in orm['recurring_donations.MonthlyDonation'].objects.all():
            monthly_donation.amount /= 100
            monthly_donation.save()

    def backwards(self, orm):
        for monthly_order in orm['recurring_donations.MonthlyOrder'].objects.all():
            monthly_order.amount *= 100
            monthly_order.save()

        for monthly_donation in orm['recurring_donations.MonthlyDonation'].objects.all():
            monthly_donation.amount *= 100
            monthly_donation.save()

    models = {
        u'auth.group': {
            'Meta': {'object_name': 'Group'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
        },
        u'auth.permission': {
            'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'bb_projects.projectphase': {
            'Meta': {'ordering': "['sequence']", 'object_name': 'ProjectPhase'},
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'description': ('django.db.models.fields.CharField', [], {'max_length': '400', 'blank': 'True'}),
            'editable': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
            'owner_editable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'sequence': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '200'}),
            'viewable': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
        },
        u'bb_projects.projecttheme': {
            'Meta': {'ordering': "['name']", 'object_name': 'ProjectTheme'},
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
            'name_nl': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
        },
        u'contenttypes.contenttype': {
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'geo.country': {
            'Meta': {'ordering': "['name']", 'object_name': 'Country'},
            'alpha2_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
            'alpha3_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'numeric_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
            'oda_recipient': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'subregion': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['geo.SubRegion']"})
        },
        u'geo.region': {
            'Meta': {'ordering': "['name']", 'object_name': 'Region'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'numeric_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'unique': 'True', 'null': 'True', 'blank': 'True'})
        },
        u'geo.subregion': {
            'Meta': {'ordering': "['name']", 'object_name': 'SubRegion'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'numeric_code': ('django.db.models.fields.CharField', [], {'max_length': '3', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
            'region': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['geo.Region']"})
        },
        u'members.member': {
            'Meta': {'object_name': 'Member'},
            'about': ('django.db.models.fields.TextField', [], {'max_length': '265', 'blank': 'True'}),
            'available_time': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
            'birthdate': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'deleted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'disable_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '254', 'db_index': 'True'}),
            'facebook': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'gender': ('django.db.models.fields.CharField', [], {'max_length': '6', 'blank': 'True'}),
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'newsletter': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
            'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
            'picture': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100', 'blank': 'True'}),
            'primary_language': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
            'share_money': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'share_time_knowledge': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'skypename': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
            'twitter': ('django.db.models.fields.CharField', [], {'max_length': '15', 'blank': 'True'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
            'user_type': ('django.db.models.fields.CharField', [], {'default': "'person'", 'max_length': '25'}),
            'username': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
            'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
            'why': ('django.db.models.fields.TextField', [], {'max_length': '265', 'blank': 'True'})
        },
        u'organizations.organization': {
            'Meta': {'ordering': "['name']", 'object_name': 'Organization'},
            'account_bank_address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_bank_city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_bank_country': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'account_bank_country'", 'null': 'True', 'to': u"orm['geo.Country']"}),
            'account_bank_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_bank_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
            'account_bic': ('django_iban.fields.SWIFTBICField', [], {'max_length': '11', 'blank': 'True'}),
            'account_holder_address': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_holder_city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_holder_country': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'account_holder_country'", 'null': 'True', 'to': u"orm['geo.Country']"}),
            'account_holder_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_holder_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
            'account_iban': ('django_iban.fields.IBANField', [], {'max_length': '34', 'blank': 'True'}),
            'account_number': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'account_other': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'address_line1': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'address_line2': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'country': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'country'", 'null': 'True', 'to': u"orm['geo.Country']"}),
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'deleted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
            'facebook': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'partner_organizations': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'phone_number': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}),
            'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'blank': 'True'}),
            'registration': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'skype': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}),
            'state': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
            'twitter': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'})
        },
        u'projects.partnerorganization': {
            'Meta': {'object_name': 'PartnerOrganization'},
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
        },
        u'projects.project': {
            'Meta': {'ordering': "['title']", 'object_name': 'Project'},
            'allow_overfunding': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'amount_asked': ('bluebottle.bb_projects.fields.MoneyField', [], {'default': '0', 'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
            'amount_donated': ('bluebottle.bb_projects.fields.MoneyField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
            'amount_needed': ('bluebottle.bb_projects.fields.MoneyField', [], {'default': '0', 'max_digits': '12', 'decimal_places': '2'}),
            'campaign_ended': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'campaign_funded': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'campaign_started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['geo.Country']", 'null': 'True', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'date_submitted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'deadline': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'effects': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'favorite': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'for_who': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'future': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'image': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '255', 'blank': 'True'}),
            'is_campaign': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'language': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['utils.Language']", 'null': 'True', 'blank': 'True'}),
            'latitude': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '21', 'decimal_places': '18', 'blank': 'True'}),
            'longitude': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '21', 'decimal_places': '18', 'blank': 'True'}),
            'mchanga_account': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
            'organization': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'organization'", 'null': 'True', 'to': u"orm['organizations.Organization']"}),
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'owner'", 'to': u"orm['members.Member']"}),
            'partner_organization': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['projects.PartnerOrganization']", 'null': 'True', 'blank': 'True'}),
            'pitch': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'popularity': ('django.db.models.fields.FloatField', [], {'default': '0'}),
            'reach': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'skip_monthly': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'}),
            'status': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bb_projects.ProjectPhase']"}),
            'story': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'theme': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bb_projects.ProjectTheme']", 'null': 'True', 'blank': 'True'}),
            'title': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'video_url': ('django.db.models.fields.URLField', [], {'default': "''", 'max_length': '100', 'null': 'True', 'blank': 'True'})
        },
        u'recurring_donations.monthlybatch': {
            'Meta': {'object_name': 'MonthlyBatch'},
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'date': ('django.db.models.fields.DateField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'})
        },
        u'recurring_donations.monthlydonation': {
            'Meta': {'object_name': 'MonthlyDonation'},
            'amount': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '16', 'decimal_places': '2'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'donations'", 'to': u"orm['recurring_donations.MonthlyOrder']"}),
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['projects.Project']"}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['members.Member']"})
        },
        u'recurring_donations.monthlydonor': {
            'Meta': {'object_name': 'MonthlyDonor'},
            'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'}),
            'bic': ('django_iban.fields.SWIFTBICField', [], {'default': "''", 'max_length': '11', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '35'}),
            'country': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['geo.Country']", 'null': 'True', 'blank': 'True'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'iban': ('django_iban.fields.IBANField', [], {'default': "''", 'max_length': '34', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '35'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['members.Member']", 'unique': 'True'})
        },
        u'recurring_donations.monthlydonorproject': {
            'Meta': {'object_name': 'MonthlyDonorProject'},
            'donor': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'projects'", 'to': u"orm['recurring_donations.MonthlyDonor']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['projects.Project']"})
        },
        u'recurring_donations.monthlyorder': {
            'Meta': {'object_name': 'MonthlyOrder'},
            'amount': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '16', 'decimal_places': '2'}),
            'batch': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'orders'", 'to': u"orm['recurring_donations.MonthlyBatch']"}),
            'bic': ('django_iban.fields.SWIFTBICField', [], {'default': "''", 'max_length': '11', 'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '35'}),
            'country': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2'}),
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'currency': ('django.db.models.fields.CharField', [], {'default': "'EUR'", 'max_length': '3'}),
            'error': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '1000', 'null': 'True', 'blank': 'True'}),
            'iban': ('django_iban.fields.IBANField', [], {'default': "''", 'max_length': '34', 'blank': 'True'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '35'}),
            'processed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'updated': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}),
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['members.Member']"})
        },
        u'recurring_donations.monthlyproject': {
            'Meta': {'object_name': 'MonthlyProject'},
            'amount': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '6', 'decimal_places': '2'}),
            'batch': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['recurring_donations.MonthlyBatch']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['projects.Project']"})
        },
        u'taggit.tag': {
            'Meta': {'object_name': 'Tag'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
            'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
        },
        u'taggit.taggeditem': {
            'Meta': {'object_name': 'TaggedItem'},
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_tagged_items'", 'to': u"orm['contenttypes.ContentType']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
            'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_items'", 'to': u"orm['taggit.Tag']"})
        },
        u'utils.language': {
            'Meta': {'ordering': "['language_name']", 'object_name': 'Language'},
            'code': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'language_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'native_name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        }
    }

    complete_apps = ['recurring_donations']
    symmetrical = True