text:
// Code generated by protoc-gen-go.
// source: center.proto
// DO NOT EDIT!

/*
Package PbCenter is a generated protocol buffer package.

It is generated from these files:
	center.proto

It has these top-level messages:
	RegReq
	RegRsp
	GetServerReq
	GetServerRsp
	PingReq
	PingRsp
	NotifyReq
	NotifyRsp
	GetAreaListReq
	GetAreaListRsp
	RegNotifyReq
	RegNotifyRsp
*/
package PbCenter

import proto "code.google.com/p/goprotobuf/proto"
import math "math"
import PbCommon "seasun.com/sirius/proto/common.pb"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf

type Command int32

const (
	// common.command.CENTER_CMD_BEGIN = 10
	Command_CMD_REG_REQ           Command = 11
	Command_CMD_REG_RSP           Command = 12
	Command_CMD_PING_REQ          Command = 13
	Command_CMD_PING_RSP          Command = 14
	Command_CMD_GET_SERVER_REQ    Command = 15
	Command_CMD_GET_SERVER_RSP    Command = 16
	Command_CMD_NOTIFY_REQ        Command = 17
	Command_CMD_NOTIFY_RSP        Command = 18
	Command_CMD_GET_AREA_LIST_REQ Command = 19
	Command_CMD_GET_AREA_LIST_RSP Command = 20
	Command_CMD_REG_NOTIFY_REQ    Command = 21
	Command_CMD_REG_NOTIFY_RSP    Command = 22
)

var Command_name = map[int32]string{
	11: "CMD_REG_REQ",
	12: "CMD_REG_RSP",
	13: "CMD_PING_REQ",
	14: "CMD_PING_RSP",
	15: "CMD_GET_SERVER_REQ",
	16: "CMD_GET_SERVER_RSP",
	17: "CMD_NOTIFY_REQ",
	18: "CMD_NOTIFY_RSP",
	19: "CMD_GET_AREA_LIST_REQ",
	20: "CMD_GET_AREA_LIST_RSP",
	21: "CMD_REG_NOTIFY_REQ",
	22: "CMD_REG_NOTIFY_RSP",
}
var Command_value = map[string]int32{
	"CMD_REG_REQ":           11,
	"CMD_REG_RSP":           12,
	"CMD_PING_REQ":          13,
	"CMD_PING_RSP":          14,
	"CMD_GET_SERVER_REQ":    15,
	"CMD_GET_SERVER_RSP":    16,
	"CMD_NOTIFY_REQ":        17,
	"CMD_NOTIFY_RSP":        18,
	"CMD_GET_AREA_LIST_REQ": 19,
	"CMD_GET_AREA_LIST_RSP": 20,
	"CMD_REG_NOTIFY_REQ":    21,
	"CMD_REG_NOTIFY_RSP":    22,
}

func (x Command) Enum() *Command {
	p := new(Command)
	*p = x
	return p
}
func (x Command) String() string {
	return proto.EnumName(Command_name, int32(x))
}
func (x *Command) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Command_value, data, "Command")
	if err != nil {
		return err
	}
	*x = Command(value)
	return nil
}

type Errcode int32

const (
	Errcode_ERR_INTER         Errcode = 10010
	Errcode_ERR_INVALID_PARAM Errcode = 10011
	Errcode_ERR_REG_TOO_MUCH  Errcode = 10012
	Errcode_ERR_EXIST         Errcode = 10013
	Errcode_ERR_NOEXIST       Errcode = 10014
)

var Errcode_name = map[int32]string{
	10010: "ERR_INTER",
	10011: "ERR_INVALID_PARAM",
	10012: "ERR_REG_TOO_MUCH",
	10013: "ERR_EXIST",
	10014: "ERR_NOEXIST",
}
var Errcode_value = map[string]int32{
	"ERR_INTER":         10010,
	"ERR_INVALID_PARAM": 10011,
	"ERR_REG_TOO_MUCH":  10012,
	"ERR_EXIST":         10013,
	"ERR_NOEXIST":       10014,
}

func (x Errcode) Enum() *Errcode {
	p := new(Errcode)
	*p = x
	return p
}
func (x Errcode) String() string {
	return proto.EnumName(Errcode_name, int32(x))
}
func (x *Errcode) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(Errcode_value, data, "Errcode")
	if err != nil {
		return err
	}
	*x = Errcode(value)
	return nil
}

// when aid == -1, sid == -1, means all(reg means all area,all server)
type RegReq struct {
	Type             *int32         `protobuf:"zigzag32,1,req,name=type" json:"type,omitempty"`
	Addr             *PbCommon.Addr `protobuf:"bytes,2,req,name=addr" json:"addr,omitempty"`
	Resv             *int32         `protobuf:"zigzag32,3,opt,name=resv,def=0" json:"resv,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

func (m *RegReq) Reset()         { *m = RegReq{} }
func (m *RegReq) String() string { return proto.CompactTextString(m) }
func (*RegReq) ProtoMessage()    {}

const Default_RegReq_Resv int32 = 0

func (m *RegReq) GetType() int32 {
	if m != nil && m.Type != nil {
		return *m.Type
	}
	return 0
}

func (m *RegReq) GetAddr() *PbCommon.Addr {
	if m != nil {
		return m.Addr
	}
	return nil
}

func (m *RegReq) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return Default_RegReq_Resv
}

type RegRsp struct {
	Gid              *int64 `protobuf:"zigzag64,1,req,name=gid" json:"gid,omitempty"`
	Resv             *int32 `protobuf:"zigzag32,2,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *RegRsp) Reset()         { *m = RegRsp{} }
func (m *RegRsp) String() string { return proto.CompactTextString(m) }
func (*RegRsp) ProtoMessage()    {}

func (m *RegRsp) GetGid() int64 {
	if m != nil && m.Gid != nil {
		return *m.Gid
	}
	return 0
}

func (m *RegRsp) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

type GetServerReq struct {
	Aid              *int32 `protobuf:"zigzag32,1,req,name=aid" json:"aid,omitempty"`
	Sid              *int32 `protobuf:"zigzag32,2,req,name=sid" json:"sid,omitempty"`
	Type             *int32 `protobuf:"zigzag32,3,req,name=type" json:"type,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *GetServerReq) Reset()         { *m = GetServerReq{} }
func (m *GetServerReq) String() string { return proto.CompactTextString(m) }
func (*GetServerReq) ProtoMessage()    {}

func (m *GetServerReq) GetAid() int32 {
	if m != nil && m.Aid != nil {
		return *m.Aid
	}
	return 0
}

func (m *GetServerReq) GetSid() int32 {
	if m != nil && m.Sid != nil {
		return *m.Sid
	}
	return 0
}

func (m *GetServerReq) GetType() int32 {
	if m != nil && m.Type != nil {
		return *m.Type
	}
	return 0
}

type GetServerRsp struct {
	Addrs            []*PbCommon.AddrLoad `protobuf:"bytes,1,rep,name=addrs" json:"addrs,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

func (m *GetServerRsp) Reset()         { *m = GetServerRsp{} }
func (m *GetServerRsp) String() string { return proto.CompactTextString(m) }
func (*GetServerRsp) ProtoMessage()    {}

func (m *GetServerRsp) GetAddrs() []*PbCommon.AddrLoad {
	if m != nil {
		return m.Addrs
	}
	return nil
}

type PingReq struct {
	Reqnum           *int32 `protobuf:"zigzag32,1,req,name=reqnum" json:"reqnum,omitempty"`
	Delay            *int32 `protobuf:"zigzag32,2,req,name=delay" json:"delay,omitempty"`
	Linknum          *int32 `protobuf:"zigzag32,3,req,name=linknum" json:"linknum,omitempty"`
	Thres            *int32 `protobuf:"zigzag32,4,req,name=thres" json:"thres,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *PingReq) Reset()         { *m = PingReq{} }
func (m *PingReq) String() string { return proto.CompactTextString(m) }
func (*PingReq) ProtoMessage()    {}

func (m *PingReq) GetReqnum() int32 {
	if m != nil && m.Reqnum != nil {
		return *m.Reqnum
	}
	return 0
}

func (m *PingReq) GetDelay() int32 {
	if m != nil && m.Delay != nil {
		return *m.Delay
	}
	return 0
}

func (m *PingReq) GetLinknum() int32 {
	if m != nil && m.Linknum != nil {
		return *m.Linknum
	}
	return 0
}

func (m *PingReq) GetThres() int32 {
	if m != nil && m.Thres != nil {
		return *m.Thres
	}
	return 0
}

type PingRsp struct {
	XXX_unrecognized []byte `json:"-"`
}

func (m *PingRsp) Reset()         { *m = PingRsp{} }
func (m *PingRsp) String() string { return proto.CompactTextString(m) }
func (*PingRsp) ProtoMessage()    {}

type NotifyReq struct {
	Type             *int32 `protobuf:"zigzag32,1,req,name=type" json:"type,omitempty"`
	Aid              *int32 `protobuf:"zigzag32,2,req,name=aid" json:"aid,omitempty"`
	Sid              *int32 `protobuf:"zigzag32,3,req,name=sid" json:"sid,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *NotifyReq) Reset()         { *m = NotifyReq{} }
func (m *NotifyReq) String() string { return proto.CompactTextString(m) }
func (*NotifyReq) ProtoMessage()    {}

func (m *NotifyReq) GetType() int32 {
	if m != nil && m.Type != nil {
		return *m.Type
	}
	return 0
}

func (m *NotifyReq) GetAid() int32 {
	if m != nil && m.Aid != nil {
		return *m.Aid
	}
	return 0
}

func (m *NotifyReq) GetSid() int32 {
	if m != nil && m.Sid != nil {
		return *m.Sid
	}
	return 0
}

type NotifyRsp struct {
	Resv             *int32 `protobuf:"zigzag32,1,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *NotifyRsp) Reset()         { *m = NotifyRsp{} }
func (m *NotifyRsp) String() string { return proto.CompactTextString(m) }
func (*NotifyRsp) ProtoMessage()    {}

func (m *NotifyRsp) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

// get all area and it's name
type GetAreaListReq struct {
	Resv             *int32 `protobuf:"zigzag32,1,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *GetAreaListReq) Reset()         { *m = GetAreaListReq{} }
func (m *GetAreaListReq) String() string { return proto.CompactTextString(m) }
func (*GetAreaListReq) ProtoMessage()    {}

func (m *GetAreaListReq) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

type GetAreaListRsp struct {
	List             []*PbCommon.AreaSrvInfo `protobuf:"bytes,1,rep,name=list" json:"list,omitempty"`
	Resv             *int32                  `protobuf:"zigzag32,2,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte                  `json:"-"`
}

func (m *GetAreaListRsp) Reset()         { *m = GetAreaListRsp{} }
func (m *GetAreaListRsp) String() string { return proto.CompactTextString(m) }
func (*GetAreaListRsp) ProtoMessage()    {}

func (m *GetAreaListRsp) GetList() []*PbCommon.AreaSrvInfo {
	if m != nil {
		return m.List
	}
	return nil
}

func (m *GetAreaListRsp) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

type RegNotifyReq struct {
	Type             *int32 `protobuf:"zigzag32,1,req,name=type" json:"type,omitempty"`
	Resv             *int32 `protobuf:"zigzag32,2,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *RegNotifyReq) Reset()         { *m = RegNotifyReq{} }
func (m *RegNotifyReq) String() string { return proto.CompactTextString(m) }
func (*RegNotifyReq) ProtoMessage()    {}

func (m *RegNotifyReq) GetType() int32 {
	if m != nil && m.Type != nil {
		return *m.Type
	}
	return 0
}

func (m *RegNotifyReq) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

type RegNotifyRsp struct {
	Resv             *int32 `protobuf:"zigzag32,1,opt,name=resv" json:"resv,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

func (m *RegNotifyRsp) Reset()         { *m = RegNotifyRsp{} }
func (m *RegNotifyRsp) String() string { return proto.CompactTextString(m) }
func (*RegNotifyRsp) ProtoMessage()    {}

func (m *RegNotifyRsp) GetResv() int32 {
	if m != nil && m.Resv != nil {
		return *m.Resv
	}
	return 0
}

func init() {
	proto.RegisterEnum("PbCenter.Command", Command_name, Command_value)
	proto.RegisterEnum("PbCenter.Errcode", Errcode_name, Errcode_value)
}


text:
import { Component, OnInit } from '@angular/core';
import {ActivatedRoute, ParamMap, Params} from "@angular/router";
import {EmployeeService} from "../../../service/EmployeeService";
import {AuthService} from "../../../service/AuthService";
import {Page} from "../../../entity/Page";
import {Authority} from "../../../entity/Authority";
import {EmployeeAuthority} from "../../../entity/employee-authority";
import {TzBaseService} from "../../../service/TzBaseService";

@Component({
  selector: '.m-grid__item.m-grid__item--fluid.m-wrapper',
  templateUrl: './add-role.component.html',
  styleUrls: ['./add-role.component.scss']
})
export class AddRoleComponent implements OnInit {

  private uid: string;
  name: string = null;
  page: Page = new Page();
  auths: Authority[] = [];
  selectAuths=[];
  addLoading = false;
  btnTxt = '提 交';
  em='';

  constructor(private activateRoute: ActivatedRoute,
              private emService: EmployeeService,
              private authService: AuthService,
              private baseService: TzBaseService) { }

  ngOnInit() {

    this.activateRoute.paramMap.subscribe((params:ParamMap)=>{
      this.uid=params.get('uid');

      this.emService.findPermissionsById(this.uid).subscribe(
        res=>{

         this.em = res.realname;

          res.authorities.forEach(data=>{
            this.selectAuths.push(data.auid);
          })
        }
      );

    })

    this.authService.getAllAuth(this.page).subscribe(res=>{
        this.auths = res.data;
        console.log(this.auths);
    });

  }

  addRole(){

    if(this.selectAuths.length>0){

      this.btnTxt = '操作中...';
      this.addLoading = true;
      let roles: EmployeeAuthority[] = [];
      this.selectAuths.forEach(d=>{

        let em = new EmployeeAuthority();
        em.auid= d;
        em.uid = this.uid;

        roles.push(em);
      })

      this.emService.addPermissions(roles,this.uid).subscribe(
        res=>{
          this.baseService.messageService.success("操作成功");
          this.btnTxt = '提交';
          this.addLoading = false;
      },error=>{
          this.baseService.messageService.error("操作失败,可能网络故障");
          this.addLoading = false;
          this.btnTxt = '提交';
        });

    }else {

      this.baseService.messageService.warning("不能清空权限");

    }

  }

}

redpajama_set_name: RedPajamaGithub


text:
/*
 * Created on 18 五月 2015 ( Time 11:07:19 )
 * Generated by Telosys Tools Generator ( version 2.1.0 )
 */
package com.dt.hippo.auto.business.service.impl;

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

import javax.annotation.Resource;

import com.dt.hippo.auto.model.Uservoucher;
import com.dt.hippo.auto.model.jpa.UservoucherEntity;
import java.util.Date;
import com.dt.hippo.auto.business.service.UservoucherService;
import com.dt.hippo.auto.business.service.mapping.UservoucherServiceMapper;
import com.dt.hippo.auto.data.repository.jpa.UservoucherJpaRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Implementation of UservoucherService
 */
@Service("uservoucherService")
@Transactional
public class UservoucherServiceImpl implements UservoucherService {

	@Resource
	protected UservoucherJpaRepository uservoucherJpaRepository;

	@Resource
	protected UservoucherServiceMapper uservoucherServiceMapper;

	@Override
	public Uservoucher findById(Long uid) {
		UservoucherEntity uservoucherEntity = uservoucherJpaRepository.findOne(uid);
		return uservoucherServiceMapper.mapUservoucherEntityToUservoucher(uservoucherEntity);
	}

	@Override
	public List<Uservoucher> findAll() {
		Iterable<UservoucherEntity> entities = uservoucherJpaRepository.findAll();
		List<Uservoucher> beans = new ArrayList<Uservoucher>();
		for(UservoucherEntity uservoucherEntity : entities) {
			beans.add(uservoucherServiceMapper.mapUservoucherEntityToUservoucher(uservoucherEntity));
		}
		return beans;
	}

	@Override
	public Uservoucher save(Uservoucher uservoucher) {
		return update(uservoucher) ;
	}

	@Override
	public Uservoucher create(Uservoucher uservoucher) {
//		UservoucherEntity uservoucherEntity = uservoucherJpaRepository.findOne(uservoucher.getUid());
//		if( uservoucherEntity != null ) {
//			throw new IllegalStateException("already.exists");
//		}
		UservoucherEntity uservoucherEntity = new UservoucherEntity();
		uservoucherServiceMapper.mapUservoucherToUservoucherEntity(uservoucher, uservoucherEntity);
		UservoucherEntity uservoucherEntitySaved = uservoucherJpaRepository.save(uservoucherEntity);
		return uservoucherServiceMapper.mapUservoucherEntityToUservoucher(uservoucherEntitySaved);
	}

	@Override
	public Uservoucher update(Uservoucher uservoucher) {
		UservoucherEntity uservoucherEntity = uservoucherJpaRepository.findOne(uservoucher.getUid());
		uservoucherServiceMapper.mapUservoucherToUservoucherEntity(uservoucher, uservoucherEntity);
		UservoucherEntity uservoucherEntitySaved = uservoucherJpaRepository.save(uservoucherEntity);
		return uservoucherServiceMapper.mapUservoucherEntityToUservoucher(uservoucherEntitySaved);
	}

	@Override
	public void delete(Long uid) {
		uservoucherJpaRepository.delete(uid);
	}

	public UservoucherJpaRepository getUservoucherJpaRepository() {
		return uservoucherJpaRepository;
	}

	public void setUservoucherJpaRepository(UservoucherJpaRepository uservoucherJpaRepository) {
		this.uservoucherJpaRepository = uservoucherJpaRepository;
	}

	public UservoucherServiceMapper getUservoucherServiceMapper() {
		return uservoucherServiceMapper;
	}

	public void setUservoucherServiceMapper(UservoucherServiceMapper uservoucherServiceMapper) {
		this.uservoucherServiceMapper = uservoucherServiceMapper;
	}

}


text:
<!DOCTYPE html>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <meta name="description" content="TinyMapper is a quick object-object mapper for .NET">
        <meta name="keywords" content="object mapper C#, object mapper .net, mapper, object to object, object mapper">
        <meta name="msvalidate.01" content="E131468FC70A729451F8D412ECD7F5C0" />
        <title>TinyMapper</title>

        <link rel="icon" type="image/x-icon" href="favicon.ico" />
        <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.2/normalize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link href="css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.5/styles/tomorrow.min.css">

GitHub

NuGet

GitHub

NuGet

Tiny Mapper

The fastest object mapper for .NET

                    Get Started
                    Performance

Incredibly quick

Map thousands of objects in a jiffy.

We have compared TinyMapper with AutoMapper.

                        see comparison results

User Friendly

Usage of TinyMapper is very straightforward. It was designed to be simple and effective. NuGet package allows simple and quick installation of library.

Open Source

TinyMapper is an open-source project. This means that you can check out source code, fork it and participate in project.

100 times quicker than the next leading product

Speed comparison results

(Lower is better)

                <canvas id="myChart" width="800" height="400"></canvas>

Don't spend your time doing useless tedious tasks. beproductive

Code example

For more information please check out our Wiki page. If you have any questions regarding library usage and development you can ask them on the issue page.

Part of Nelibur project

Check out our other products that help you create powerful solutions in a few moments

Related projects

Nelibur

Nelibur.Sword

Links

GitHub site

NuGet package

Wiki


text:
title: Quotes
---

> Designing a product is keeping five thousand things in your brain and fitting them all together in new and different ways to get what you want. And every day you discover something new that is a new problem or new opportunity to fit these things together a little differently. And it's that process that is magic.

_Steve Jobs, The Lost Interview_


text:
package com.codepath.apps.restclienttemplate;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.text.format.DateUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.codepath.apps.restclienttemplate.models.Tweet;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;

/**
 * Created by andreadeoli on 6/26/17.
 */

public class TweetAdapter extends RecyclerView.Adapter<TweetAdapter.ViewHolder> {
    List<Tweet> mTweets;
    Context context;
    private final int REQUEST_CODE = 20;
    private final int RESULT_OK = 10;

    //pass Tweets array into constructor
    public TweetAdapter(List<Tweet> tweets) {
        mTweets = tweets;
    }
    //for each row, inflate layout and cache references into ViewHolder

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        context = parent.getContext();
        LayoutInflater inflater = LayoutInflater.from(context);

        View tweetView = inflater.inflate(R.layout.item_tweet, parent, false);
        ViewHolder viewHolder = new ViewHolder(tweetView);
        return viewHolder;
    }

    //bind view based on position

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        //get data according to position
        Tweet tweet = mTweets.get(position);
        //populate views according to this data
        holder.tvUsername.setText(tweet.user.name);
        holder.tvBody.setText(tweet.body);
        holder.tvName.setText("@" + tweet.user.screenName);
        // TODO check if you need to include the button here
        holder.tvTimeStamp.setText(getRelativeTimeAgo(tweet.createdAt));

        Glide.with(context).load(tweet.user.profileImageUrl).into(holder.ivProfieImage);
    }

    @Override
    public int getItemCount() {
        return mTweets.size();
    }

    // getRelativeTimeAgo("Mon Apr 01 21:16:23 +0000 2014");
    public String getRelativeTimeAgo(String rawJsonDate) {
        String twitterFormat = "EEE MMM dd HH:mm:ss ZZZZZ yyyy";
        SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);
        sf.setLenient(true);

        String relativeDate = "";
        try {
            long dateMillis = sf.parse(rawJsonDate).getTime();
            relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis,
                    System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS).toString();
        } catch (ParseException e) {
            e.printStackTrace();
        }

        return relativeDate;
    }

    // Clean all elements of the recycler
    public void clear() {
        mTweets.clear();
        notifyDataSetChanged();
    }

    // Add a list of items -- change to type used
    public void addAll(List<Tweet> list) {
        mTweets.addAll(list);
        notifyDataSetChanged();
    }

    //create ViewHolder class
    public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
        public ImageView ivProfieImage;
        public TextView tvUsername;
        public TextView tvBody;
        public TextView tvName;
        public TextView tvTimeStamp;
        public Button replyButton;

        public ViewHolder(View itemView) {
            super(itemView);

            //findViewById lookups
            ivProfieImage = (ImageView) itemView.findViewById(R.id.ivProfileImage);
            tvUsername = (TextView) itemView.findViewById(R.id.tvUsername);
            tvBody = (TextView) itemView.findViewById(R.id.tvBody);
            tvName = (TextView) itemView.findViewById(R.id.tvName);
            tvTimeStamp = (TextView) itemView.findViewById(R.id.tvTimeStamp);
            replyButton = (Button) itemView.findViewById(R.id.replyButton);
            replyButton.setOnClickListener(this);
        }

        @Override
        public void onClick (View v) {
            // gets item position
            int position = getAdapterPosition();
            // make sure the position is valid
            if (position != RecyclerView.NO_POSITION) {
                // get the movie at the position
                Tweet tweet = mTweets.get(position);
                // create intent for the new activity
                Intent intent = new Intent(context, ComposeActivity.class);
                // serialize the movie using parceler, use its short name as a key
                //intent.putExtra(Tweet.class.getSimpleName(), Parcels.wrap(tweet));
                intent.putExtra("tweet", tweet);
                intent.putExtra("hello", "yo");
                // show the activity
                //intent.putExtra("mode", 2); // pass arbitrary data to launched activity

                //startActivityForResult(intent, REQUEST_CODE);
                //context.startActivity(intent);
                ((TimelineActivity) context).startActivityForResult(intent, REQUEST_CODE);
            }
        }
    }
}


text:
<?php

namespace React\Tests\Http;

use PHPUnit\Framework\TestCase as BaseTestCase;

class TestCase extends BaseTestCase
{
    protected function expectCallableOnce()
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->once())
            ->method('__invoke');

        return $mock;
    }

    protected function expectCallableOnceWith($value)
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->once())
            ->method('__invoke')
            ->with($value);

        return $mock;
    }

    protected function expectCallableNever()
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->never())
            ->method('__invoke');

        return $mock;
    }

    protected function createCallableMock()
    {
        if (method_exists('PHPUnit\Framework\MockObject\MockBuilder', 'addMethods')) {
            // PHPUnit 9+
            return $this->getMockBuilder('stdClass')->addMethods(array('__invoke'))->getMock();
        } else {
            // legacy PHPUnit 4 - PHPUnit 8
            return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock();
        }
    }

    public function assertContainsString($needle, $haystack)
    {
        if (method_exists($this, 'assertStringContainsString')) {
            // PHPUnit 7.5+
            $this->assertStringContainsString($needle, $haystack);
        } else {
            // legacy PHPUnit 4 - PHPUnit 7.5
            $this->assertContains($needle, $haystack);
        }
    }

    public function assertNotContainsString($needle, $haystack)
    {
        if (method_exists($this, 'assertStringNotContainsString')) {
            // PHPUnit 7.5+
            $this->assertStringNotContainsString($needle, $haystack);
        } else {
            // legacy PHPUnit 4 - PHPUnit 7.5
            $this->assertNotContains($needle, $haystack);
        }
    }

    public function setExpectedException($exception, $exceptionMessage = '', $exceptionCode = null)
    {
        if (method_exists($this, 'expectException')) {
            // PHPUnit 5+
            $this->expectException($exception);
            if ($exceptionMessage !== '') {
                $this->expectExceptionMessage($exceptionMessage);
            }
            if ($exceptionCode !== null) {
                $this->expectExceptionCode($exceptionCode);
            }
        } else {
            // legacy PHPUnit 4
            parent::setExpectedException($exception, $exceptionMessage, $exceptionCode);
        }
    }

}


text:
from time import time

class RateMeasure:
    def __init__(self, left):
        self.start = None
        self.last = None
        self.rate = 0
        self.remaining = None
        self.left = left
        self.broke = False
        self.got_anything = False

    def data_came_in(self, amount):
        if not self.got_anything:
            self.got_anything = True
            self.start = time() - 2
            self.last = self.start
            self.left -= amount
            return
        self.update(time(), amount)

    def data_rejected(self, amount):
        self.left += amount

    def get_time_left(self):
        if not self.got_anything:
            return None
        t = time()
        if t - self.last > 15:
            self.update(t, 0)
        return self.remaining

    def get_size_left(self):
        return self.left

    def update(self, t, amount):
        self.left -= amount
        try:
            self.rate = ((self.rate * (self.last - self.start)) + amount) / (t - self.start)
            self.last = t
            self.remaining = self.left / self.rate
            if self.start < self.last - self.remaining:
                self.start = self.last - self.remaining
        except ZeroDivisionError:
            self.remaining = None
        if self.broke and self.last - self.start < 20:
            self.start = self.last - 20
        if self.last - self.start > 20:
            self.broke = True


text:
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}

-- | Implementation of lightweight profiling.  Most users should
-- import "Haxl.Core" instead.
--
module Haxl.Core.Profile
  ( withLabel
  , withFingerprintLabel
  , addProfileFetch
  , incrementMemoHitCounterFor
  , collectProfileData
  , profileCont
  ) where

import Data.IORef
import Data.Hashable
import Data.Monoid
import Data.Text (Text)
import Data.Typeable
import qualified Data.HashMap.Strict as HashMap
import qualified Data.HashSet as HashSet
import GHC.Exts
import qualified Data.Text as Text

import Haxl.Core.DataSource
import Haxl.Core.Flags
import Haxl.Core.Stats
import Haxl.Core.Monad

-- -----------------------------------------------------------------------------
-- Profiling

-- | Label a computation so profiling data is attributed to the label.
withLabel :: ProfileLabel -> GenHaxl u a -> GenHaxl u a
withLabel l (GenHaxl m) = GenHaxl $ \env ->
  if report (flags env) < 4
     then m env
     else collectProfileData l m env

-- | Label a computation so profiling data is attributed to the label.
-- Intended only for internal use by 'memoFingerprint'.
withFingerprintLabel :: Addr# -> Addr# -> GenHaxl u a -> GenHaxl u a
withFingerprintLabel mnPtr nPtr (GenHaxl m) = GenHaxl $ \env ->
  if report (flags env) < 4
     then m env
     else collectProfileData
            (Text.unpackCString# mnPtr <> "." <> Text.unpackCString# nPtr)
            m env

-- | Collect profiling data and attribute it to given label.
collectProfileData
  :: ProfileLabel
  -> (Env u -> IO (Result u a))
  -> Env u
  -> IO (Result u a)
collectProfileData l m env = do
   a0 <- getAllocationCounter
   r <- m env{profLabel=l} -- what if it throws?
   a1 <- getAllocationCounter
   modifyProfileData env l (a0 - a1)
   -- So we do not count the allocation overhead of modifyProfileData
   setAllocationCounter a1
   case r of
     Done a -> return (Done a)
     Throw e -> return (Throw e)
     Blocked ivar k -> return (Blocked ivar (Cont (withLabel l (toHaxl k))))
{-# INLINE collectProfileData #-}

modifyProfileData :: Env u -> ProfileLabel -> AllocCount -> IO ()
modifyProfileData env label allocs =
  modifyIORef' (profRef env) $ \ p ->
    p { profile =
          HashMap.insertWith updEntry label newEntry .
          HashMap.insertWith updCaller caller newCaller $
          profile p }
  where caller = profLabel env
        newEntry =
          emptyProfileData
            { profileAllocs = allocs
            , profileDeps = HashSet.singleton caller }
        updEntry _ old =
          old { profileAllocs = profileAllocs old + allocs
              , profileDeps = HashSet.insert caller (profileDeps old) }
        -- subtract allocs from caller, so they are not double counted
        -- we don't know the caller's caller, but it will get set on
        -- the way back out, so an empty hashset is fine for now
        newCaller =
          emptyProfileData { profileAllocs = -allocs }
        updCaller _ old =
          old { profileAllocs = profileAllocs old - allocs }

-- Like collectProfileData, but intended to be run from the scheduler.
--
-- * doesn't add a dependency (the original withLabel did this)
--
-- * doesn't subtract allocs from the caller (we're evaluating this
--   cont from the top level, so we don't need this)
--
-- * doesn't wrap a Blocked continuation in withLabel (the scheduler
--   will call profileCont the next time this cont runs)
--
profileCont
  :: (Env u -> IO (Result u a))
  -> Env u
  -> IO (Result u a)
profileCont m env = do
  a0 <- getAllocationCounter
  r <- m env
  a1 <- getAllocationCounter
  let
    allocs = a0 - a1
    newEntry = emptyProfileData { profileAllocs = allocs }
    updEntry _ old = old { profileAllocs = profileAllocs old + allocs }
  modifyIORef' (profRef env) $ \ p ->
    p { profile =
         HashMap.insertWith updEntry (profLabel env) newEntry $
         profile p }
  -- So we do not count the allocation overhead of modifyProfileData
  setAllocationCounter a1
  return r
{-# INLINE profileCont #-}

incrementMemoHitCounterFor :: ProfileLabel -> Profile -> Profile
incrementMemoHitCounterFor lbl p =
  p { profile = HashMap.adjust incrementMemoHitCounter lbl (profile p) }

incrementMemoHitCounter :: ProfileData -> ProfileData
incrementMemoHitCounter pd = pd { profileMemoHits = succ (profileMemoHits pd) }

{-# NOINLINE addProfileFetch #-}
addProfileFetch
  :: forall r u a . (DataSourceName r, Eq (r a), Hashable (r a), Typeable (r a))
  => Env u -> r a -> IO ()
addProfileFetch env _req = do
  c <- getAllocationCounter
  modifyIORef' (profRef env) $ \ p ->
    let
      dsName :: Text
      dsName = dataSourceName (Proxy :: Proxy r)

      upd :: ProfileData -> ProfileData
      upd d = d { profileFetches =
        HashMap.insertWith (+) dsName 1 (profileFetches d) }

    in p { profile = HashMap.adjust upd (profLabel env) (profile p) }
  -- So we do not count the allocation overhead of addProfileFetch
  setAllocationCounter c


text:
using System.Globalization;
using Sitecore.Web.UI.WebControls;
using Synthesis.FieldTypes.Interfaces;

namespace Synthesis.FieldTypes
{
	public class NumericField : FieldType, INumericField
	{
		public NumericField(LazyField field, string indexValue) : base(field, indexValue) { }

		/// <summary>
		/// Gets the value of the field. If the field does not have a value, default(decimal) is returned instead.
		/// </summary>
		public virtual decimal Value
		{
			get
			{
				decimal value;
				if (decimal.TryParse(InnerField.Value, out value)) return value;

				return default(decimal);
			}
			set { SetFieldValue(value.ToString(CultureInfo.InvariantCulture)); }
		}

		/// <summary>
		/// Renders the field using a Sitecore FieldRenderer and returns the result
		/// </summary>
		public virtual string RenderedValue
		{
			get
			{
				return FieldRenderer.Render(InnerItem, InnerField.ID.ToString());
			}
		}

		/// <summary>
		/// Checks if the field has a value
		/// </summary>
		public override bool HasValue
		{
			get
			{
				if (InnerField == null) return false;

				decimal value;
				return decimal.TryParse(InnerField.Value, out value);
			}
		}

		public override string ToString()
		{
			return Value.ToString(CultureInfo.InvariantCulture);
		}
	}
}


text:
"""
This module allows tests to change configs, since some parameters specified
can be changed.
Configs will be locked when they are read to prevent concurrent use of a
device.
"""
from silk.tools import usbdevice

# HW Config file options

HW_MODEL_OPTION = "HwModel"
HW_LINUX_PORT_OPTION = "LinuxSerialPort"
HW_MAC_PORT_OPTION = "MacSerialPort"
INTERFACE_SERIAL = "InterfaceSerialNumber"
INTERFACE_NUMBER = "USBInterfaceNumber"
DUT_SERIAL_NUMBER = "DutSerial"
OTNS_VIS_POSITION = "OTNSVisPosition"

# HW Config Models

# Nordic Dev Board NRF52840
HW_NRF52840 = "nRF52840_OpenThread_Device"
HW_NORDIC_SNIFFER = "NordicSniffer"

# Silabs Dev Board EFR32
HW_EFR32 = "Efr32"

# Generic Virtual Device (for log replay purpose)
HW_GENERIC = "Generic"

DEV_DEVICES = [HW_NRF52840, HW_EFR32, HW_NORDIC_SNIFFER]

class HwModule(object):
    """Maintains usage of a hardware resource.
    """

    def __init__(self,
                 name,
                 parser,
                 node_id,
                 layout_center=None,
                 layout_radius=None,
                 model=None,
                 interface_serial=None,
                 interface_number=None,
                 port=None,
                 dut_serial=None,
                 jlink_serial=None,
                 virtual=False):
        self._name = name
        self._parser = parser
        self._claimed = False
        self._port = port
        self._model = model
        self._dut_serial = dut_serial
        self._node_id = node_id

        if not virtual:
            if model and interface_serial and interface_number:
                if port is None:
                    self.__set_options(model, interface_serial, int(interface_number))
            elif model or interface_serial or interface_number:
                raise ValueError(
                    "You must specify either all of model, interface_serial and interface_number or none. "
                    "Provided: %s" % ([model, interface_serial, interface_number]))

            if self._port is None:
                self.set_port()

        assert (layout_center is None) == (layout_radius is None)
        self._layout_center = layout_center
        self._layout_radius = layout_radius

    def is_claimed(self):
        return self._claimed

    def claim(self):
        if self._claimed:
            raise RuntimeError("HwModule %s already claimed." % self.name)
        self._claimed = True

    def free(self):
        if self._claimed is False:
            raise RuntimeError("HwModule %s is not claimed." % self.name)
        self._claimed = False

    def name(self):
        return self._name

    def model(self):
        if self._model is not None:
            return self._model
        else:
            return self.__get_option_str(HW_MODEL_OPTION)

    def interface_serial(self):
        return self.__get_option_str(INTERFACE_SERIAL)

    def interface_number(self):
        return int(self.__get_option_float(INTERFACE_NUMBER))

    def port(self):
        return self._port

    def get_dut_serial(self):
        return self.__get_option_str(DUT_SERIAL_NUMBER)

    def get_otns_vis_position(self):
        coord_str = self.__get_option_str(OTNS_VIS_POSITION)
        parts = coord_str.split(",")
        if len(parts) != 2:
            raise ValueError("Node position must have x and y coordinates. Provided: %s" % coord_str)

        return int(parts[0]), int(parts[1])

    def get_otns_vis_node_id(self):
        return self._node_id

    def get_otns_vis_layout_center(self):
        return self._layout_center

    def get_otns_vis_layout_radius(self):
        return self._layout_radius

    def find_device_from_serial(self, device_type, serial, interface_number):
        devname, device = usbdevice.device_find_from_serial(device_type, serial, interface_number)

        return devname

    def find_dev_board_from_serial(self, serial, interface_number, model):
        return self.find_device_from_serial(model, serial, interface_number)

    def set_port(self):
        serial_to_find = self.interface_serial()
        interface_number = self.interface_number()

        model = self.model()

        if model in DEV_DEVICES:
            self._port = self.find_dev_board_from_serial(serial_to_find, interface_number, model)
        else:
            raise RuntimeError("Device not supported %s" % model)

        if self._port is None:
            raise RuntimeError("Device not found %s" % self._name)

    def __str__(self):
        return_string = "[{!s}]\n".format(self.name())
        return_string += "model: {!s}\n".format(self.model())
        return_string += "port : {!s}\n".format(self.port())
        return_string += "claim: {!s}".format(self._claimed)

        return return_string

    def __set_options(self, model, interface_serial, interface_number):
        self._parser.set(self._name, HW_MODEL_OPTION, model)
        self._parser.set(self._name, INTERFACE_SERIAL, interface_serial)
        self._parser.set(self._name, INTERFACE_NUMBER, str(interface_number))

    def __get_option_str(self, option, default=""):
        if self._parser.has_option(self._name, option):
            return self._parser.get(self._name, option)
        return default

    def __get_option_float(self, option, default=0.0):
        if self._parser.has_option(self._name, option):
            return self._parser.getfloat(self._name, option)
        return default


text:
package com.kehxstudios.insight.perceptron;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.MotionEvent;

import com.kehxstudios.insight.tools.GameActivity;
import com.kehxstudios.insight.tools.GameControl;
import com.kehxstudios.insight.tools.Tools;

/**
 *
 */

public class Graph extends GameControl {

    private float learningRate;
    private float[] weights;
    private Point[] points;

    private Paint backgroundPaint, linePaint, pPaint, nPaint, cPaint, iPaint;

    private boolean currentlyTraining, newTrainingPool, trainingComplete;

    public Graph(GameActivity gameActivity, float width, float height) {
        super(gameActivity, width, height);
        learningRate = 0.1f;
        currentlyTraining = false;
        newTrainingPool = false;
        trainingComplete = false;
        weights = new float[3];
        for (int i = 0; i < weights.length; i++) {
            weights[i] = random.nextFloat() * 2 - 1;
        }
        newTestPoints();
    }

    @Override
    public void update(float delta) {
        super.update(delta);
        if (newTrainingPool) {
            newTestPoints();
            trainingComplete = false;
            newTrainingPool = false;
        }

        if (currentlyTraining) {
            int correct = 0;
            for (Point point : points) {
                float[] inputs = {point.x, point.y, 1};
                if (train(inputs, point.label)) {
                    point.correct = true;
                    correct++;
                } else {
                    point.correct = false;
                }
            }
            if (correct == points.length) {
                currentlyTraining = false;
                trainingComplete = true;
            }
        }
    }

    @Override
    public void draw(Canvas canvas) {
        super.draw(canvas);
        canvas.drawRect(0, 0, width, height, backgroundPaint);

        float x1 = Tools.map(-1, -1, 1, 0, width);
        float y1 = Tools.map(line(-1), -1, 1, height, 0);
        float x2 = Tools.map(1, -1, 1, 0, width);
        float y2 = Tools.map(line(1), -1, 1, height, 0);

        canvas.drawLine(x1, y1, x2, y2, linePaint);

        float gx1 = Tools.map(-1, -1, 1, 0, width);
        float gy1 = Tools.map(guessY(-1), -1, 1, height, 0);
        float gx2 = Tools.map(1, -1, 1, 0, width);
        float gy2 = Tools.map(guessY(1), -1, 1, height, 0);

        canvas.drawLine(gx1, gy1, gx2, gy2, linePaint);

        if (points != null) {
            for (Point point : points) {
                float px = Tools.map(point.x, -1, 1, 0, width);
                float py = Tools.map(point.y, -1, 1, height, 0);

                if (point.label == 1)
                    canvas.drawCircle(px, py, 20f, pPaint);
                else
                    canvas.drawCircle(px, py, 20f, nPaint);
                if (point.correct)
                    canvas.drawCircle(px, py, 10f, cPaint);
                else
                    canvas.drawCircle(px, py, 10f, iPaint);
            }
        }
    }

    private void newTestPoints() {
        points = new Point[100];
        for (int i = 0; i < points.length; i++) {
            points[i] = new Point(random.nextFloat() * 2 - 1, random.nextFloat() * 2 - 1);
            if (points[i].y > line(points[i].x)) {
                points[i].label = 1;
            } else {
                points[i].label = -1;
            }
        }
    }

    private int guess(float[] inputs) {
        float sum = 0;
        for (int i = 0; i < weights.length; i++) {
            sum += inputs[i] * weights[i];
        }
        int output = sign(sum);
        return output;
    }

    private float guessY(float x) {
        return -(weights[2]/weights[1]) - (weights[0]/weights[1]) * x;
    }

    private boolean train(float[] inputs, int target) {
        int guess = guess(inputs);
        int error = target - guess;

        if (error == 0)
            return true;

        for (int i = 0; i < weights.length; i++) {
            weights[i] += error * inputs[i] * learningRate;
        }
        return false;
    }

    private int sign(float n) {
        if (n >= 0)
            return 1;
        else
            return -1;
    }

    public float line(float x) {
        return 0.3f * x + 0.2f;
    }

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (trainingComplete) {
            newTestPoints();
        }
        currentlyTraining = true;
        return false;
    }

    @Override
    protected void createPaints() {
        backgroundPaint = new Paint();
        backgroundPaint.setColor(Color.WHITE);
        backgroundPaint.setStyle(Paint.Style.FILL);

        linePaint = new Paint();
        linePaint.setColor(Color.BLACK);
        linePaint.setStyle(Paint.Style.STROKE);
        linePaint.setStrokeWidth(5f);

        pPaint = new Paint();
        pPaint.setColor(Color.BLACK);
        pPaint.setStyle(Paint.Style.FILL);

        nPaint = new Paint();
        nPaint.setColor(Color.BLACK);
        nPaint.setStyle(Paint.Style.STROKE);
        nPaint.setStrokeWidth(5f);

        cPaint = new Paint();
        cPaint.setColor(Color.GREEN);
        cPaint.setStyle(Paint.Style.FILL);

        iPaint = new Paint();
        iPaint.setColor(Color.RED);
        iPaint.setStyle(Paint.Style.FILL);
    }
}


text:
@charset "utf-8";

button::-moz-focus-inner {
 	border: 0;
}

* {
	outline: none;
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, table, th, td {
    margin: 0px;
    padding: 0px;
}

body {
    font-size: 62.5%;
    font-family: sans-serif;
    line-height: 22px;

    /*
    background: none repeat scroll 0% 0% rgb(245, 245, 245);
    color: rgb(68, 68, 68);
    */

    background: none repeat scroll 0 0 #222222;
    color: #DDDDDD;

    /* stupid firefox */
    position: absolute;
    top: 0px;
    bottom: 0px;
    width: 100%;

    /*---------------------------------
    http://stackoverflow.com/a/6900392
    ---------------------------------*/
    -webkit-user-select: none; /* Chrome/Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+ */

    /* Rules below not implemented in browsers yet */
    -o-user-select: none;
    user-select: none;
}

a {
    text-decoration: none;
}
a:active,
a:focus {
    outline: none;
    -moz-outline-style: none;
}

@font-face {
    font-family: 'Open Sans';
  	font-style: normal;
  	font-weight: 300;
    src: url('fonts/opensans/opensans_light_macroman/OpenSans-Light-webfont.eot');
    src: local('Open Sans Light'), local('OpenSans-Light'),
        url('fonts/opensans/opensans_light_macroman/OpenSans-Light-webfont.woff') format('woff');
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'),
        url('fonts/opensans/opensans_regular_macroman/OpenSans-Regular-webfont.woff') format('woff');
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600;
    src: url('fonts/opensans/opensans_semibold_macroman/OpenSans-Semibold-webfont.eot');
    src: local('Open Sans Semibold'), local('OpenSans-Semibold'),
        url('fonts/opensans/opensans_semibold_macroman/OpenSans-Semibold-webfont.woff') format('woff');
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 800;
    src: url('fonts/opensans/opensans_bold_macroman/OpenSans-Bold-webfont.eot');
    src: local('Open Sans Bold'),
        local('OpenSans-Bold'),
        url('fonts/opensans/opensans_bold_macroman/OpenSans-Bold-webfont.woff') format('woff');
}

@font-face {
    font-family: 'Trajan';
    src: url('fonts/trajan/fonts/Trajan-Regular.eot');
    src: local('Trajan'), url('fonts/trajan/fonts/Trajan-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Trajan';
    src: url('fonts/trajan/fonts/Trajan-Bold.eot');
    src: local('Trajan Bold'),url('fonts/trajan/fonts/Trajan-Bold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
}


text:
'Use Strict';
angular.module('App').controller('forgotController', function ($scope, $state,$cordovaOauth, $localStorage, $location,$http,$ionicPopup, $firebaseObject, Auth, FURL, Utils) {
  var ref = new Firebase(FURL);
  $scope.resetpassword = function(user) {
      if(angular.isDefined(user)){
      Auth.resetpassword(user)
        .then(function() {
          //console.log("Password reset email sent successfully!");
          $location.path('/login');
        }, function(err) {
           //console.error("Error: ", err);
        });
      }
    };
}
);


text:
/* individual style (common) */
*.hide{
  display:none;
}
button.workpunch{
  border:none;
  box-sizing:border-box;
  color:#fff;
  cursor:pointer;
  display:block;
  height:28px;
  line-height:28px;
  margin:1px;
  text-align:center;
  width:calc(100% - 2px);
}
button.workpunch.start{
  background-color:#3498db;
}
button.workpunch.start:hover{
  background-color:#1d6fa5;
}
button.workpunch.end{
  background-color:#ef5350;
}
button.workpunch.end:hover{
  background-color:#b94047;
}
div.punchboard{
  background-color:#ffffff;
  box-sizing:border-box;
  display:none;
  font-size:15px;
  height:100%;
  left:0px;
  overflow-x:hidden;
  overflow-y:auto;
  padding:3em 1em 1em 1em;
  position:fixed;
  top:0px;
  width:100%;
  z-index:999999;
}
div.punchboard button.close{
  background-color:transparent;
  background-image:url("https://tis2010.jp/library/kintone/images/close.svg");
  background-position:left top;
  background-repeat:no-repeat;
  background-size:3em 3em;
  border:none;
  box-sizing:border-box;
  cursor:pointer;
  height:3em;
  line-height:3em;
  margin:0px;
  outline:none;
  padding:0px;
  position:absolute;
  right:0px;
  top:0px;
  width:3em;
}
div.punchboard div.contents{
  box-sizing:border-box;
  position:relative;
  width:100%;
}
div.punchboard div.punchcard{
  background-color:#aed581;
  border-radius:50%;
  box-shadow:0px 0px 3px rgba(0,0,0,0.5);
  box-sizing:border-box;
  cursor:pointer;
  display:inline-block;
  height:200px;
  margin:1em;
  padding:1em;
  position:relative;
  vertical-align:top;
  width:200px;
}
div.punchboard div.punchcard.working{
  background-color:#ff5722;
}
div.punchboard div.punchcard.worked{
  background-color:#9e9e9e;
}
div.punchboard div.punchcard div.punchimage{
  background-position:center center;
  background-repeat:no-repeat;
  background-size:cover;
  border-radius:50%;
  height:100%;
  width:100%;
}
div.punchboard div.punchcard p.caption{
  background-color:rgba(0,0,0,0.5);
  border-radius:0.5em;
  color:#ffffff;
  font-size:1.25em;
  line-height:1.5em;
  left:50%;
  margin:0px;
  padding:0.5em;
  position:absolute;
  text-align:center;
  top:50%;
  -webkit-transform:translate(-50%,0%);
  -ms-transform:translate(-50%,0%);
  transform:translate(-50%,0%);
}
div.punchboard div.punchcard p.caption span{
  display:block;
  font-size:0.75em;
  white-space:nowrap;
}
div.workshift-headermenucontents{
  display:inline-block;
  height:48px;
  line-height:48px;
  vertical-align:top;
}
div.workshift-headermenucontents *{
  vertical-align:middle;
}
div.workshift-legend{
  background-color:#FFFFFF;
  padding:0.5em;
  text-align:center;
  width:100%;
}
div.workshift-legend p{
  border:1px solid #e3e7e8;
  display:inline-block;
  font-size:13px;
  line-height:2em;
  margin:3px;
  padding:0px 0.5em;
  text-align:left;
  vertical-align:top;
}
div.workshift-legend p span{
  display:inline-block;
  vertical-align:top;
}
div.workshift-legend p span.color{
  border-radius:50%;
  height:1em;
  margin-right:0.5em;
  margin-top:0.5em;
  width:1em;
}
div.guidefrom{
  background-color:#3498DB;
  border-radius:0.25em;
  box-shadow:0px 0px 3px rgba(0,0,0,0.5);
  color:#FFFFFF;
  display:none;
  font-size:0.75em;
  height:2em;
  line-height:2em;
  padding:0px 1em;
  position:fixed;
  transition:all 0.35s ease-out 0s;
  white-space:nowrap;
  width:auto;
  z-index:999;
}
div.guideto{
  background-color:#3498DB;
  border-radius:0.25em;
  box-shadow:0px 0px 3px rgba(0,0,0,0.5);
  color:#FFFFFF;
  display:none;
  font-size:0.75em;
  height:2em;
  line-height:2em;
  padding:0px 1em;
  position:fixed;
  transition:all 0.35s ease-out 0s;
  white-space:nowrap;
  width:auto;
  z-index:999;
}
table.workshift{
  background-color:#FFFFFF;
  table-layout:fixed;
  width:100%;
}
table.workshift .workshift-rowcaption{
  background-color:#EFEFEF;
  left:0;
  padding:0px;
  position:-webkit-sticky;
  position:sticky;
  width:10em;
  z-index:2;
}
table.workshift .workshift-rowcaption p{
  border-right:1px solid #C9C9C9;
  margin:0px;
  padding-left:0.5em;
  padding-right:0.5em;
}
table.workshift.cellfixed{
  table-layout:auto;
}
table.workshift.cellfixed .workshift-rowcaption{
  white-space:nowrap;
  width:auto;
}
table.workshift thead tr:nth-of-type(1) th{
  border-bottom:none;
  text-align:left;
}
table.workshift thead tr:nth-of-type(2) th{
  border-top:none;
  border-bottom:none;
}
table.workshift thead tr:nth-of-type(3) th{
  border-top:none;
  font-size:10px;
  height:10px;
  line-height:10px;
  padding:0px;
}
table.workshift tbody tr:hover{
  background-color:#ffcdd2;
}
table.workshift tbody tr td{
  cursor:pointer;
  position:relative;
}
table.workshift tbody tr td.workshift-drag:after{
  background-color:#3498db;
  border-radius:5px;
  box-sizing:border-box;
  content:'';
  display:block;
  height:10px;
  left:0px;
  margin:0px;
  padding:0px;
  position:absolute;
  top:50%;
  width:100%;
  -webkit-transform:translateY(-50%);
  -ms-transform:translateY(-50%);
  transform:translateY(-50%);
}
table.workshift tbody tr td.workshift-merge{
  vertical-align:middle;
  z-index:1;
}
table.workshift tbody tr td.workshift-merge span.workshift-merge-span{
  background-color:transparent;
  border-radius:5px;
  box-sizing:border-box;
  display:block;
  height:10px;
  margin:0px;
  padding:0px;
  vertical-align:middle;
  width:100%;
  z-index:1;
}
table.workshift tbody tr td.workshift-merge span.workshift-merge-span-plus{
  background-color:#ffffff;
  border:1px solid #C9C9C9;
  border-radius:5px;
  display:inline-block;
  font-size:13px;
  left:0.5em;
  line-height:1.5em;
  padding:0px 5px;
  position:absolute;
  top:50%;
  z-index:2;
  -webkit-transform:translateY(-50%);
  -ms-transform:translateY(-50%);
  transform:translateY(-50%);
}
table.works tr td,
table.works tr th{
  font-size:14px;
  height:auto;
  line-height:30px;
  padding:0px 3px;
  vertical-align:top;
}
table.works tbody tr:hover{
  background-color:#ffcdd2;
}
table.works tbody tr td:nth-of-type(1){
  padding:0px;
  width:36px;
}
table.works tbody tr td:nth-of-type(2){
  padding:0px;
  width:100px;
}
table.attendance tr td,
table.attendance tr th{
  font-size:14px;
  height:auto;
  line-height:30px;
  padding:0px 3px;
  vertical-align:top;
}
table.attendance tr td:nth-of-type(n+4){
  text-align:right;
  width:8em;
}


text:
layout: organization
category: local

title: Pediatric Cancer Foundation
impact_area: Health
keywords:
location_services:
location_offices:
website: www.pediatriccancerfoundation.com

description:
mission: |
  The Pediatric Cancer Foundation, was founded in 1970 by grateful parents whose son underwent surgery and treatment at Babies Hospital, New York. Today PCF has grown to support children and their families afflicted with all types of cancer. Three decades of support has enabled the foundation to purchase state of the art equipment, support research projects and bring exceptional fellows to both the surgical and oncology departments.

cash_grants:
grants:
service_opp:
services:

learn:
cont_relationship:

salutation:
first_name:
last_name:
title_contact_person:

city: White Plains
state: NY
address: |
  405 Tarrytown Road PMB 572
  White Plains NY 10607
lat: 41.043141
lng: -73.797999
phone: 949-859-6312
ext:
fax: 949-859-6323
email:
preferred_contact:
contact_person_intro:
---


text:
<?php

/* ENTER YOUR HOSTNAME */
$HOSTNAME = 'YOUR_HOST_NAME_HERE';

/* ENTER YOU USER FOR DATABASE */
$USERNAME = 'YOUR_DATABASE_USER_HERE';

/* ENTER YOUR PASSWORD FOR DATABASE */
$PASSWORD = 'YOUR_DATABASE_PASSWORD_HERE';

/* ENTER DATABASE NAME */
$DATABASE = 'YOUR_DATABASE_NAME_HERE';

if($HOSTNAME == 'YOUR_HOST_NAME_HERE'){
	header('Location:readme.html');
  exit(0);
}

if($USERNAME == 'YOUR_DATABASE_USER_HERE'){
	header('Location:readme.html');
  exit(0);
}

if($PASSWORD == 'YOUR_DATABASE_PASSWORD_HERE'){
	header('Location:readme.html');
  exit(0);
}

if($DATABASE == 'YOUR_DATABASE_NAME_HERE'){
	header('Location:readme.html');
  exit(0);
}

/************************************/
$db_conx = mysqli_connect($HOSTNAME,$USERNAME,$PASSWORD,$DATABASE);
if(!$db_conx){
  die("Can't connect to database");
}

?>


text:
package com.example.numbering;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Numbering {

	@Autowired
	private NumberingMapper mapper;
	@Autowired
	private LocalDateProvider localDateProvider;
	private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("uuuuMMdd");

	public String numberingA() {
		long value = mapper.nextval("numbering1");
		return String.format("%020d", value);
	}

	public String numberingB() {
		long value = mapper.nextval("numbering2");
		return String.format("%05d", value);
	}

	public String numberingC() {
		long value = mapper.nextval("numbering3");
		LocalDate date = localDateProvider.now();
		return String.format("%1$tY%1$tm%1$td%2$04d", date, value);
	}

	public String numberingD() {
		long value = mapper.nextval("numbering4");
		LocalDate date = localDateProvider.now();
		return date.format(dateTimeFormatter) + String.format("%04d", value);
	}

	public long numberingE() {
		return mapper.nextval("numbering5");
	}

	public int numberingF() {
		return (int) mapper.nextval("numbering6");
	}
}


text:
angular.module('templates/angular-social-count.html', []).run(['$templateCache', function($templateCache) {
  'use strict';

  $templateCache.put('templates/angular-social-count.html',
    "
\n" +
    "\t<ng-odometer ng-show=\"count\" class=\"count\" value=\"count\"></ng-odometer>\n" +
    "
"
  );

}]);