text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <link rel='stylesheet' type='text/css' href='__PUBLIC__/css/style.css'>

            <base target="main" />

                     <present name="Think.get.title"> {$Think.get.title}</present><notpresent name="Think.get.title">后台首页</notpresent>

                <volist id="item" name="menu" >
                    <eq name="item['group_id']" value="$menuTag">
                        <neq name="item['name']|strtolower" value="public" >
                            <neq name="item['name']|strtolower" value="index" >
                                <eq name="item['access']" value="1" >

 {$item['title']}

                                </eq>
                            </neq>
                        </neq>
                    </eq>
                </volist>


text:
package activity;

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

import model.Endereco;
import model.ProfissionalSaude;
import model.TipoProfissional;

import com.example.seudoto.R;

import controller.ProfissionalController;
import exception.ProfissionalSaudeException;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class ListaProfissionaisActivity extends Activity {

	private ListView resultadoPesquisa;
	private List<ProfissionalSaude> listaProfissional;
	private static ProfissionalController controller;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lista_profissionais);

		listaProfissional = ProfissionalController.getResultadoBuscaSimples();
		controller = ProfissionalController.getInstance();

		resultadoPesquisa = (ListView) findViewById(R.id.resultadoPesquisa);
		resultadoPesquisa.setAdapter(new EfficientAdapter(this,
				listaProfissional.size()));

		resultadoPesquisa.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view,
					int position, long id) {

				ProfissionalController
						.setProfissionalSelecionado(listaProfissional
								.get(position));

				Intent telaDetalhes = new Intent(
						ListaProfissionaisActivity.this,
						DetalhesProfissionalActivity.class);
				ListaProfissionaisActivity.this.startActivity(telaDetalhes);

			}

		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.activity_cadastrar_home_actions, menu);

		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Take appropriate action for each action item click
		switch (item.getItemId()) {
		case R.id.action_search:
			locationFound(R.id.action_search);
			return true;
		case R.id.action_home_main:
			locationFound(R.id.action_home_main);
			return true;
		default:
			return super.onOptionsItemSelected(item);
		}
	}

	private void locationFound(int id) {
		if(id==R.id.action_search){
			Intent i = new Intent(ListaProfissionaisActivity.this,
					CadastrarProfissionalActivity.class);
			startActivity(i);
		}else if(id==R.id.action_home_main){
			Intent i = new Intent(ListaProfissionaisActivity.this,
					BuscarActivity.class);
			startActivity(i);
		}

	}

	private static class EfficientAdapter extends BaseAdapter {

		private LayoutInflater layoutInflater;
		private int quantidadeDeAtividades;

		public EfficientAdapter(Context context, int quantidadeTotalDeAtividades) {
			layoutInflater = LayoutInflater.from(context);
			quantidadeDeAtividades = quantidadeTotalDeAtividades;
		}

		@Override
		public int getCount() {
			return quantidadeDeAtividades;
		}

		@Override
		public Object getItem(int position) {
			return position;
		}

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

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			ViewCampo campo;

			if (convertView == null) {
				convertView = layoutInflater.inflate(
						R.layout.modelo_lista_profissional, null);
				campo = new ViewCampo();
				campo.campoCRM = (TextView) convertView
						.findViewById(R.id.pesq_crm_resp_prof1);
				campo.campoNome = (TextView) convertView
						.findViewById(R.id.pesq_nome_prof1);
				campo.campoConvenio = (TextView) convertView
						.findViewById(R.id.pesq_convenio_resp_prof1);
				campo.campoAvaliacao = (TextView) convertView
						.findViewById(R.id.pesq_avaliacao_resp_prof1);

				convertView.setTag(campo);
			} else {
				campo = (ViewCampo) convertView.getTag();
			}

			/*
			 * Esse bloco � responsavel por jogar as informa��es dos
			 * profissionais na tela
			 */
			ProfissionalSaude profListagem = ProfissionalController.getResultadoBuscaSimples().get(position);

			campo.campoNome.setText(String.valueOf(profListagem.getNome()));
			campo.campoCRM.setText(String.valueOf(profListagem.getNumeroRegistro())+"-PB");
			campo.campoConvenio.setText(String.valueOf(profListagem.toStringConveios()));

			int avaliacoesNegativas=0;
			int avaliacoesPositivas = 0;

			avaliacoesNegativas = profListagem.getAvaliacoesNegativas();
			avaliacoesPositivas = profListagem.getAvaliacoesPositivas();

			if(avaliacoesPositivas>=avaliacoesNegativas){
				campo.campoAvaliacao.setText("Positiva");
			}else{
				campo.campoAvaliacao.setText("Negativa");
			}

			return convertView;
		}

	}

	static class ViewCampo {
		TextView campoCRM;
		TextView campoNome;
		TextView campoConvenio;
		TextView campoAvaliacao;
		TextView campoEndereco;
	}

	private void limparTabelas(ListView view) {
		if (view.isDirty()) {
			view.clearAnimation();
			view.clearChoices();
			view.clearDisappearingChildren();
			view.clearFocus();
			view.clearTextFilter();
		}

	}
}

redpajama_set_name: RedPajamaGithub


text:
package imageviewer.imageviewer;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.GridView;

import imageviewer.imageviewer.callbacks.ActivityCallback;

/**
 * Created by Mohit on 9/6/2014.
 */
public class GalleryFragment extends Fragment {
    private GridView gridView;
    private GridViewAdapter customGridAdapter;
    ActivityCallback _callback;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View root = inflater.inflate(R.layout.gallery_fragment, container, false);
        gridView = (GridView) root.findViewById(R.id.gridView);
        customGridAdapter = new GridViewAdapter(getActivity(), R.layout.row_grid, _callback.getImagesData(),_callback);
        gridView.setAdapter(customGridAdapter);
        return root;
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        if (getActivity() instanceof ActivityCallback) {
            _callback = (ActivityCallback) getActivity();
        } else {
            new IllegalArgumentException("Parent activity of " +
                    GalleryFragment.class.getName() + " should implement " + ActivityCallback.class.getName());
        }
    }

    @Override
    public void onDetach() {
        super.onDetach();
        _callback = null;
    }
}


text:
#include "libxl_format.h"

using namespace v8;
using namespace libxl;

Persistent<Function> LibxlFormat::constructor;

Handle<Value> LibxlFormat::NewInstance(Book* book, Format* format) {
  const unsigned argc = 2;
  Local<Value> argv[argc] = {
    External::Wrap((void*) book),
    External::Wrap((void*) format)
  };
  return constructor->NewInstance(argc, argv);
}

Handle<Value> LibxlFormat::NewInstance(unsigned argc, Local<Value>* argv) {
  return constructor->NewInstance(argc, argv);
}

LibxlFormat::LibxlFormat(Book* book, Format* format) {
  this->book = book;
  this->format = format;
}

LibxlFormat::~LibxlFormat() {
  this->format = NULL;
  this->book = NULL;
}

/**
 * Getter for real format instance
 */
Format* LibxlFormat::getFormat() {
  return format;
}

/**
 * Create new Format instance
 *
 * @constructor
 * @param {Book} book
 *    Book instance (wrapped into v8::External)
 * @param {Format} format
 *    Format instance (wrapped into v8::External)
 */
Handle<Value> LibxlFormat::New(const Arguments& args) {
  HandleScope scope;

  if (args.Length() < 2) {
    return THREXC("No format object specified for Format constructor");
  } else {
    Book* book = (Book*) External::Unwrap(args[0]);
    Format* format = (Format*) External::Unwrap(args[1]);

    LibxlFormat* obj = new LibxlFormat(book, format);
    obj->Wrap(args.This());
    return args.This();
  }
}

void LibxlFormat::Initialize(Handle<Object> target) {
  Local<FunctionTemplate> t = FunctionTemplate::New(New);
  t->SetClassName(String::NewSymbol("Format"));
  t->InstanceTemplate()->SetInternalFieldCount(1);

  constructor = Persistent<Function>::New(t->GetFunction());
  target->Set(String::NewSymbol("Format"), constructor);
}


text:
This module is a placeholder module which aims to be the new home for the REST API code.

Tasks:

* Move endpoint code from `/core` into this module.


text:
require "review_and_approve/version"
require "review_and_approve/engine" if defined? Rails
require "review_and_approve/model_additions"
require "review_and_approve/controller_additions"
require "review_and_approve/railtie" if defined? Rails
require 'active_record'
require "review_and_approve/cache_record"
require 'review_and_approve/hash_diff'

module ReviewAndApprove

end


text:
module Fog
  module OpenStack
    class Network
      class Real
        def get_lbaas_healthmonitor(healthmonitor_id)
          request(
            :expects => [200],
            :method  => 'GET',
            :path    => "lbaas/healthmonitors/#{healthmonitor_id}"
          )
        end
      end

      class Mock
        def get_lbaas_healthmonitor(healthmonitor_id)
          response = Excon::Response.new
          if data = self.data[:lbaas_healthmonitors][healthmonitor_id]
            response.status = 200
            response.body = {'healthmonitor' => data}
            response
          else
            raise Fog::OpenStack::Network::NotFound
          end
        end
      end
    end
  end
end


text:
package domino

import (
	"bytes"
	"fmt"
	"html"
	"sort"
	"strings"
)

// NSpaces can be adjusted to determine how many spaces are used in each
// indent.
var NSpaces = 4

// Attr is a shorthand for map[string]interface{}, used when declaring
// attributes for DomNodes.
type Attr map[string]interface{}

// Node is basically a stringer interface but with the ability to append
// to a buffer for performance reasons.
type Node interface {
	String() string
	IndentString() string
	StringBuild(*bytes.Buffer, bool, int)
}

// DomNode is a node in a dom tree. It has children nodes and attributes.
type DomNode struct {
	NodeName string
	Attrs    Attr
	Children []Node
}

// TextNode represents text in the dom tree. Text can not have child nodes or
// attributes.
type TextNode struct {
	Value string
}

// NewDomNode creates a new dom node with it's name (div, ul, html) and any
// number of arguments, these can be: children dom or text nodes, or Attr lists.
func NewDomNode(name string, args ...interface{}) *DomNode {
	n := &DomNode{
		NodeName: name,
		Attrs:    make(Attr, 0),
		Children: make([]Node, 0),
	}
	for _, arg := range args {
		switch a := arg.(type) {
		case *DomNode:
			n.Add(a)
		case *TextNode:
			n.Add(a)
		case string:
			n.Add(NewTextNode(a))
		case *Context:
			a.Add(n)
		case Attr:
			for k, v := range a {
				n.Attrs[k] = v
			}
		default:
			panic("wrong argument type")
		}
	}
	return n
}

// NewTextNode creates a new text node with the provided text.
func NewTextNode(value string) *TextNode {
	return &TextNode{Value: value}
}

// Add a new child node.
func (n *DomNode) Add(children ...Node) Node {
	n.Children = append(n.Children, children...)
	return children[len(children)-1]
}

func (n *DomNode) setAttribute(k string, v interface{}) *DomNode {
	n.Attrs[k] = v
	return n
}

// String returns HTML for this node and all its ancestors
func (n *TextNode) String() string {
	return n.Value
}

// IndentString appends it's value to the provided buffer.
func (n *TextNode) IndentString() string {
	return n.Value
}

// StringBuild appends it's value to the provided buffer.
func (n *TextNode) StringBuild(b *bytes.Buffer, indent bool, depth int) {
	if indent && depth > 0 {
		indent := strings.Repeat(" ", NSpaces*depth)
		b.WriteString(indent)
		b.WriteString(strings.Replace(n.Value, "\n", "\n"+indent, -1))
		b.WriteByte('\n')
	} else {
		b.WriteString(n.Value)
	}
}

// String returns HTML for this node and all it's ancestors.
func (n *DomNode) String() string {
	b := &bytes.Buffer{}
	n.StringBuild(b, false, 0)
	return b.String()
}

// IndentString returns HTML for this node and all it's ancestors with
// indentation.
func (n *DomNode) IndentString() string {
	b := &bytes.Buffer{}
	n.StringBuild(b, true, 0)
	return b.String()
}

// StringBuild appends the html for this node and all it's ancestors to the
// provided buffer.
func (n *DomNode) StringBuild(b *bytes.Buffer, indent bool, depth int) {
	if indent && depth > 0 {
		b.WriteString(strings.Repeat(" ", NSpaces*depth))
	}

	b.WriteByte('<')
	b.WriteString(n.NodeName)

	keys := make([]string, 0, len(n.Attrs))
	for k, _ := range n.Attrs {
		keys = append(keys, k)
	}
	sort.Strings(keys)

	for _, k := range keys {
		v := n.Attrs[k]

		b.WriteByte(' ')
		if v == nil {
			fmt.Fprint(b, k)
			continue
		}

		vstr := html.EscapeString(fmt.Sprint(v))
		fmt.Fprintf(b, `%s="%s"`, k, vstr)
	}

	b.WriteByte('>')

	if _, ws := whiteSpaced[n.NodeName]; indent && !ws && len(n.Children) == 1 {
		if _, ok := n.Children[0].(*TextNode); ok {
			fmt.Fprintf(b, "%s</%s>\n", n.Children[0].String(), n.NodeName)
			return
		}
	}

	_, isVoid := voidElems[n.NodeName]

	if indent && (len(n.Children) > 0 || isVoid) {
		b.WriteByte('\n')
	}

	if isVoid {
		return
	}

	for _, child := range n.Children {
		child.StringBuild(b, indent, depth+1)
	}

	if indent && depth > 0 && len(n.Children) > 0 {
		b.WriteString(strings.Repeat(" ", depth*NSpaces))
	}

	b.WriteString("</")
	b.WriteString(n.NodeName)
	b.WriteByte('>')
	if indent {
		b.WriteByte('\n')
	}
}

// Text adds a text node with the provided text.
func (n *DomNode) Text(text string) *DomNode {
	n.Add(NewTextNode(text))
	return n
}

// Clear removes all children.
func (n *DomNode) Clear() *DomNode {
	n.Children = make([]Node, 0)
	return n
}

var voidElems = map[string]struct{}{
	"area":    struct{}{},
	"base":    struct{}{},
	"br":      struct{}{},
	"col":     struct{}{},
	"command": struct{}{},
	"embed":   struct{}{},
	"hr":      struct{}{},
	"img":     struct{}{},
	"input":   struct{}{},
	"keygen":  struct{}{},
	"link":    struct{}{},
	"meta":    struct{}{},
	"param":   struct{}{},
	"source":  struct{}{},
	"track":   struct{}{},
	"wbr":     struct{}{},
}

var whiteSpaced = map[string]struct{}{
	"style":    struct{}{},
	"script":   struct{}{},
	"textarea": struct{}{},
}


text:
package com.lightbend.training.coffeehouse;

import akka.actor.AbstractLoggingActor;
import akka.actor.ActorRef;
import akka.actor.Props;
import akka.japi.pf.ReceiveBuilder;
import scala.concurrent.duration.FiniteDuration;

public class Guest extends AbstractLoggingActor {

    private final ActorRef waiter;

    private final Coffee favoriteCoffee;

    private final FiniteDuration finishCoffeeDuration;

    private int coffeeCount = 0;

    public Guest(ActorRef waiter, Coffee favoriteCoffee, FiniteDuration finishCoffeeDuration) {
        this.waiter = waiter;
        this.favoriteCoffee = favoriteCoffee;
        this.finishCoffeeDuration = finishCoffeeDuration;
        orderFavoriteCoffee();

        receive(ReceiveBuilder.
                match(Waiter.CoffeeServed.class, coffeeServed -> {
                    coffeeCount++;
                    log().info("Enjoying my {} yummy {}!", coffeeCount, coffeeServed.coffee);
                    scheduleCoffeeFinished();
                }).
                match(CoffeeFinished.class, coffeeFinished ->
                        orderFavoriteCoffee()
                ).
                matchAny(this::unhandled).build()
        );
    }

    public static Props props(final ActorRef waiter, final Coffee favoriteCoffee, FiniteDuration finishCoffeeDuration) {
        return Props.create(Guest.class, () -> new Guest(waiter, favoriteCoffee, finishCoffeeDuration));
    }

    @Override
    public void postStop() {
        log().info("Goodbye!");
    }

    private void orderFavoriteCoffee() {
        waiter.tell(new Waiter.ServeCoffee(favoriteCoffee), self());
    }

    private void scheduleCoffeeFinished() {
        context().system().scheduler().scheduleOnce(finishCoffeeDuration, self(),
                CoffeeFinished.Instance, context().dispatcher(), self());
    }

    public static final class CoffeeFinished {

        public static final CoffeeFinished Instance =
                new CoffeeFinished();

        private CoffeeFinished() {
        }
    }
}