text:
using namespace sheaf;
using namespace std;

//#define DIAGNOSTIC_OUTPUT

///
sheaf::poset_path::
poset_path()
{
  // Preconditions:

  // Body:

  // Nothing to do.

  // Postconditions:

  ensure(empty());

  // Exit:

  return;
}

///
sheaf::poset_path::
poset_path(const poset_path& xposet_path)
{

  // Preconditions:

  // Body:

  *this = xposet_path;

  // Postconditions:

  ensure(*this == xposet_path);

  // Exit:

  return;
}

///
sheaf::poset_path::
poset_path(const std::string& xposet_name, const std::string& xmember_name)
{
  // Preconditions:

  require(!xposet_name.empty());
  require(is_valid_path(xposet_name + delimiter() + xmember_name));

  // Body:

  *this = xposet_name + delimiter() + xmember_name;

  // Postconditions:

  ensure(poset_name() == xposet_name);
  ensure(member_name() == xmember_name);

  // Exit:

  return;
}

///
sheaf::poset_path::
~poset_path()
{

  // Preconditions:

  // Body:

  // Nothing to do.

  // Postconditions:

  // Exit:

  return;
}

///
sheaf::poset_path::
poset_path(const std::string& xpath)
{
  // Preconditions:

  require(is_valid_path(xpath));

  // Body:

  *this = xpath;

  // Postconditions:

  ensure(*this == xpath);

  // Exit:

  return;
}

///
sheaf::poset_path::
poset_path(const char* xpath)
{
  // Preconditions:

  require(xpath != 0);
  require(is_valid_path(xpath));

  // Body:

  *this = xpath;

  // Postconditions:

  ensure((*this) == xpath);
}

///
sheaf::poset_path::
poset_path(const primitive_value& xpath)
{
  // Preconditions:

  require(xpath.id() == C_STRING);
  require(is_valid_path(xpath.value().c_string_primitive));

  // Body:

  *this = xpath;

  // Postconditions:

  ensure((*this) == xpath);
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
// $$SCRIBBLE kabuch: Warning: member `operator sheaf::primitive_value' of class `poset_path' cannot be found

///
sheaf::poset_path::
operator sheaf::primitive_value() const
{
  // Preconditions:

  // Body:

  primitive_value result = path().c_str();

  // Postconditions:

  ensure(result.id() == C_STRING);
  ensure(string(result) == path());

  // Exit:

  return result;
}
#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS

///
sheaf::poset_path&
sheaf::poset_path::
operator=(const poset_path& xposet_path)
{
  // Preconditions:

  // Body:

  _poset_name = xposet_path._poset_name;
  _member_name = xposet_path._member_name;

  // Postconditions:

  ensure(*this == xposet_path);

  // Exit:

  return *this;
}

///
sheaf::poset_path&
sheaf::poset_path::
operator=(const std::string& xpath)
{
  // Preconditions:

  require(is_valid_path(xpath));

  // Body:

  string ldelimiter;
  parse_path(xpath, _poset_name, ldelimiter, _member_name);

  // Postconditions:

  ensure(*this == xpath);

  // Exit:

  return *this;
}

///
sheaf::poset_path&
sheaf::poset_path::
operator=(const char* cpath)
{
  // Preconditions:

  require(cpath != 0);
  require(is_valid_path(cpath));

  // Body:

  string ldelimiter;
  parse_path(cpath, _poset_name, ldelimiter, _member_name);

  // Postconditions:

  ensure(*this == cpath);

  // Exit:

  return *this;
}

///
sheaf::poset_path&
sheaf::poset_path::
operator=(const primitive_value& xposet_path)
{
  // Preconditions:

  // Body:

  *this = xposet_path.value().c_string_primitive;

  // Postconditions:

  ensure(*this == xposet_path);

  // Exit:

  return *this;
}

///
bool
sheaf::poset_path::
empty() const
{
  bool result;

  // Preconditions:

  // Body:

  result = _poset_name.empty() && _member_name.empty();

  // Postconditions:

  // Exit

  return result;
}

///
bool
sheaf::poset_path::
full() const
{
  bool result;

  // Preconditions:

  // Body:

  result = !_poset_name.empty() && !_member_name.empty();

  // Postconditions:

  // Exit

  return result;
}

///
bool
sheaf::poset_path::
is_valid_name(const std::string& xname)
{
  bool result;

  // Preconditions:

  // Body:

  //  result = (!xname.empty() && contains_legal_characters(xname, name_legal_characters()));
  result = (!xname.empty() && (xname.find_first_not_of(name_legal_characters()) == string::npos));

  // Postconditions:

  //  ensure(result == (!xname.empty() && contains_legal_characters(xname, name_legal_characters())));
  ensure(result == (!xname.empty() && (xname.find_first_not_of(name_legal_characters()) == string::npos)));

  // Exit

  return result;
}

///
bool
sheaf::poset_path::
is_valid_path(const std::string& xpath)
{

  // Preconditions:

  // Body:

  bool result = (xpath.find_first_not_of(path_legal_characters()) == string::npos);

  if(result)
  {
    string lposet_name, ldelimiter, lmember_name;
    parse_path(xpath, lposet_name, ldelimiter, lmember_name);
    result =
      lposet_name.empty() ? (ldelimiter.empty() && lmember_name.empty()) : true;
  }

  // Postconditions:

  ensure(result == ((xpath.find_first_not_of(path_legal_characters()) == string::npos) &&
                    (!poset_name(xpath).empty() || (delimiter(xpath).empty() && member_name(xpath).empty()))));

  // Exit

  return result;
}

///
bool
sheaf::poset_path::
operator==(const poset_path& xother) const
{
  bool result;

  // Preconditions:

  // Body:

  result =
    (_poset_name == xother._poset_name) && (_member_name == xother._member_name);

  // Postconditions:

  return result;
}

///
bool
sheaf::poset_path::
operator==(const std::string& xother) const
{
  bool result;

  // Preconditions:

  // Body:

  string lposet_name, ldelimiter, lmember_name;
  parse_path(xother, lposet_name, ldelimiter, lmember_name);
  result =
    (_poset_name == lposet_name) && (_member_name == lmember_name);

  // Postconditions:

  return result;
}

///
bool
sheaf::poset_path::
operator==(const char* xother) const
{
  bool result;

  // Preconditions:

  require(xother != 0);

  // Body:

  string lother(xother);
  result = operator==(lother);

  // Postconditions:

  return result;
}

///
std::string
sheaf::poset_path::
path() const
{
  // Preconditions:

  // Body:

  string result = _poset_name;
  if(!_member_name.empty())
  {
    result += delimiter() + _member_name;
  }

  // Postconditions:

  //ensure(is_valid_path(result));

  return result;
}

///
std::string
sheaf::poset_path::
poset_name() const
{
  // Preconditions:

  // Body:

  // Postconditions:

  // Exit:

  return _poset_name;
}

///
void
sheaf::poset_path::
put_poset_name(const std::string& xname)
{
  // Preconditions:

  require(is_valid_name(xname));

  // Body:

  _poset_name = xname;

  // Postconditions:

  ensure(poset_name() == xname);

  // Exit:

  return;
}

///
std::string
sheaf::poset_path::
member_name() const
{
  // Preconditions:

  // Body:

  // Postconditions:

  return _member_name;

}

///
void
sheaf::poset_path::
put_member_name(const std::string& xname)
{
  // Preconditions:

  require(is_valid_name(xname));

  // Body:

  _member_name = xname;

  // Postconditions:

  ensure(member_name() == xname);

  // Exit:

  return;
}

const std::string&
sheaf::poset_path::
name_legal_characters()
{
  // cout << endl << "Entering poset_path::name_legal_characters." << endl;

  // Preconditions:

  // Body:

  // @hack temporarily allow characters other than [A-Za-z0-9_] in
  // poset and poset member names, until we get a chance to purge all
  // the offending names in the standard name spaces and examples.

  static const string result("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ -,.=+()*:?");

  // Postconditions:

  ensure(result == "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ -,.=+()*:?");

  // Exit:

  // cout << "Leaving poset_path::name_legal_characters." << endl;
  return result;
}

char
sheaf::poset_path::
delimiter()
{
  // cout << endl << "Entering poset_path::delimiter." << endl;

  // Preconditions:

  // Body:

  char result = '/';

  // Postconditions:

  ensure(result == '/');

  // Exit:

  // cout << "Leaving poset_path::delimiter." << endl;
  return result;
}

const std::string&
sheaf::poset_path::
path_legal_characters()
{
  // cout << endl << "Entering poset_path::path_legal_characters." << endl;

  // Preconditions:

  // Body:

  static const string result(name_legal_characters() + delimiter());

  // Postconditions:

  ensure(result == (name_legal_characters() + delimiter()));

  // Exit:

  // cout << "Leaving poset_path::path_legal_characters." << endl;
  return result;
}

std::string
sheaf::poset_path::
poset_name(const std::string& xpath)
{
  // cout << endl << "Entering poset_path::poset_name." << endl;

  // Preconditions:

  // Body:

  string result, ldelim, lmbr_name;

  parse_path(xpath, result, ldelim, lmbr_name);

  // Postconditions:

  // Exit:

  // cout << "Leaving poset_path::poset_name." << endl;
  return result;
}

std::string
sheaf::poset_path::
delimiter(const std::string& xpath)
{
  // cout << endl << "Entering poset_path::delimiter." << endl;

  // Preconditions:

  // Body:

  string lposet_name, result, lmbr_name;

  parse_path(xpath, lposet_name, result, lmbr_name);

  // Postconditions:

  // Exit:

  // cout << "Leaving poset_path::delimiter." << endl;
  return result;
}

std::string
sheaf::poset_path::
member_name(const std::string& xpath)
{
  // cout << endl << "Entering poset_path::member_name." << endl;

  // Preconditions:

  // Body:

  string lposet_name, ldelim, result;

  parse_path(xpath, lposet_name, ldelim, result);

  // Postconditions:

  ensure(delimiter(xpath).empty() ? result.empty() : true);

  // Exit:

  // cout << "Leaving poset_path::member_name." << endl;
  return result;
}

///
void
sheaf::poset_path::
to_stream(ostream& xos) const
{
  xos << *this;
}

///
std::string
sheaf::poset_path::
make_name(const std::string& xprefix, int xindex, const std::string& xsuffix)
{
  string result;

  // Preconditions:

  // Body:

  stringstream lname_stream;
  lname_stream << xprefix << xindex << xsuffix;
  lname_stream >> result;

  // Postconditions:

  ensure(!result.empty());
  ensure(!xprefix.empty() ? result.find(xprefix) == 0 : true);
  ensure(!xsuffix.empty() ?
         (result.find(xsuffix) + xsuffix.size()) == result.size() : true);

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
make_reserved_name(const std::string& xprefix, const size_t& xindex, const std::string& xsuffix)
{
  // Preconditions:

  // Body:

  // Postconditions:

  ensure(postcondition_of(make_name(reserved_prefix()+xprefix, xindex, xsuffix)));

  // Exit:

  return make_name(reserved_prefix()+xprefix, xindex, xsuffix);
}

///
std::string
sheaf::poset_path::
block_name(const size_t& xindex)
{
  string result;

  // Preconditions:

  require(index_traits<size_t>::is_valid(xindex));

  // Body:

  result = make_name(block_prefix(), xindex, "");

  // Postconditions:

  ensure(!result.empty());
  ensure(result.find(block_prefix()) == 0);

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
block_name(const std::string& xneighborhood_name)
{
  string result;

  // Preconditions:

  require(xneighborhood_name.find(neighborhood_prefix()) != string::npos);

  // Body:

  result = xneighborhood_name.substr(neighborhood_prefix().size());

  // Postconditions:

  ensure(!result.empty());
  ensure(result.find(block_prefix()) == 0);

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
block_neighborhood_name(const size_t& xindex)
{
  string result;

  // Preconditions:

  require(index_traits<size_t>::is_valid(xindex));

  // Body:

  result = neighborhood_prefix() + block_name(xindex);

  // Postconditions:

  ensure(!result.empty());
  ensure(result.find(neighborhood_prefix()) == 0);

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
block_neighborhood_name(const std::string& xblock_name)
{
  string result;

  // Preconditions:

  ensure(xblock_name.find(block_prefix()) == 0);

  // Body:

  result = neighborhood_prefix() + xblock_name;

  // Postconditions:

  ensure(!result.empty());
  ensure(result.find(neighborhood_prefix()) == 0);

  // Exit:

  return result;
}

///
size_t
sheaf::poset_path::
block_id(const std::string& xname)
{
  size_t result;

  // Preconditions:

  require(xname.find(block_prefix()) != string::npos);

  // Body:

  stringstream lname_stream;
  string lblock_prefix = block_prefix();
  lname_stream << xname.substr(xname.find(lblock_prefix) + lblock_prefix.size());
  lname_stream >> result;

  // Postconditions:

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
reserved_prefix()
{

  // Preconditions:

  // Body:

  string result("__");

  // Postconditions:

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
boundary_prefix()
{

  // Preconditions:

  // Body:

  string result(reserved_prefix() + "bdy_of_");

  // Postconditions:

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
boundary_name(const std::string& xmbr_name)
{
  string result;

  // Preconditions:

  // Body:

  result = boundary_prefix() + xmbr_name;

  // Postconditions:

  ensure(!result.empty());
  ensure(result.find(boundary_prefix()) == 0);

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
block_prefix()
{

  // Preconditions:

  // Body:

  string result(reserved_prefix() + "block_");

  // Postconditions:

  // Exit:

  return result;
}

///
std::string
sheaf::poset_path::
neighborhood_prefix()
{

  // Preconditions:

  // Body:

  string result(reserved_prefix() + "neighborhood_of_");

  // Postconditions:

  // Exit:

  return result;
}

///
sheaf::namespace_poset*
sheaf::poset_path::
current_namespace() const
{
  namespace_poset* result;

  // Preconditions:

  // Body:

  result = namespace_poset::current_namespace();

  // Postconditions:

  ensure(result == namespace_poset::current_namespace());

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
state_exists(bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());

  // Body:

  result = !_poset_name.empty();
  if(result)
  {
    if(!_member_name.empty())
    {
      result = current_namespace()->contains_poset_member(*this, xauto_access);
    }
    else
    {
      result = current_namespace()->contains_poset(*this, xauto_access);
    }
  }

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
poset_exists(bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());

  // Body:

  result = !empty() && state_exists(xauto_access);

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
member_exists(bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());

  // Body:

  result = full() && state_exists(xauto_access);

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
state_is_read_accessible(bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());
  require(state_exists(xauto_access));

  // Body:

  result =
    current_namespace()->member_poset(*this, xauto_access).state_is_read_accessible();

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
state_is_read_write_accessible(bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());
  require(state_exists(xauto_access));

  // Body:

  result =
    current_namespace()->member_poset(*this, xauto_access).state_is_read_write_accessible();

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
conforms_to(const poset_path& xother, bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(current_namespace() != 0);
  require(xauto_access || current_namespace()->state_is_read_accessible());
  require(state_exists(xauto_access));
  require(xauto_access || state_is_read_accessible(xauto_access));
  require(xother.state_exists(xauto_access));
  require(xauto_access || xother.state_is_read_accessible(xauto_access));

  // Body:

  result = poset_name() == xother.poset_name();

  if(result)
  {

    schema_poset_member lthis_schema(current_namespace(), *this, xauto_access);
    schema_poset_member lother_schema(current_namespace(), *this, xauto_access);

    if(xauto_access)
    {
      lthis_schema.get_read_access();
    }

    result = lthis_schema.conforms_to(lother_schema);

    if(xauto_access)
    {
      lthis_schema.release_access();
    }

    lthis_schema.detach_from_state();
    lother_schema.detach_from_state();
  }

  // Postconditions:

  // Exit:

  return result;
}

///
bool
sheaf::poset_path::
conforms_to(const namespace_poset& xns, const poset_path& xother, bool xauto_access) const
{
  bool result;

  // Preconditions:

  require(xns.state_is_auto_read_accessible(xauto_access));
  require(xns.contains_path(*this, xauto_access));
  require(xns.member_poset(*this, xauto_access).state_is_auto_read_accessible(xauto_access));
  require(xns.contains_path(xother, xauto_access));
  require(xns.member_poset(xother, xauto_access).state_is_auto_read_accessible(xauto_access));

  // Body:

  result = schema_poset_member::conforms_to(xns, *this, xother, xauto_access);

  // Postconditions:

  // Exit:

  return result;
}

// ===========================================================
// PRIVATE MEMBER FUNCTIONS
// ===========================================================

// bool
// sheaf::poset_path::
// contains_legal_characters(const std::string& xname, const std::string& xlegal_chars)
// {
//   bool result;

//   // Preconditions:

//   // Body:

//   string::size_type lindex = xname.find_first_not_of(xlegal_chars);

// #ifdef DIAGNOSTIC_OUTPUT
//   if(lindex != string::npos)
//   {
//     cout << "poset_path::contains_name_legal_characters illegal char in name:" << xname
//     << " position: " << lindex
//     << " char '" << xname[lindex] << "'"
//     << endl;
//   }
// #endif

//   result = (lindex == string::npos);

//   // Postconditions:

//   ensure(result == (xname.find_first_not_of(xlegal_chars) == string::npos));

//   // Exit

//   return result;
// }

///
void
sheaf::poset_path::
parse_path(const std::string& xpath,
           std::string& xposet_name,
           std::string& xdelimiter,
           std::string& xmember_name)
{

  // Preconditions:

  // Body:

  xposet_name.clear();
  xmember_name.clear();

  string::const_iterator itr = xpath.begin();
  while((itr != xpath.end()))
  {
    char c = *itr;
    ++itr;
    if(c == delimiter())
    {
      xdelimiter = c;
      break;
    }
    else
    {
      xposet_name.push_back(c);
    }
  }

  while((itr != xpath.end()))
  {
    xmember_name.push_back(*itr);
    ++itr;
  }

  // Postconditions:

  ensure(xdelimiter.empty() ? xmember_name.empty() : true);

  // Exit

  return;
}

// ===========================================================
// NON-MEMBER FUNCTIONS
// ===========================================================

std::ostream&
sheaf::
operator << (std::ostream& xos, const poset_path& xpp)
{
  xos << xpp.path();

  return xos;
}

bool
sheaf::
operator==(const poset_path& xpath, const primitive_value& xprim)
{
  require(xprim.id() == C_STRING);
  return xpath.path() == xprim.value().c_string_primitive;
}

bool
sheaf::
operator==(const primitive_value& xprim, const poset_path& xpath)
{
  require(xprim.id() == C_STRING);
  return xpath.path() == xprim.value().c_string_primitive;
}

size_t
sheaf::
deep_size(const poset_path& xpath, bool xinclude_shallow)
{
  size_t result;

  // Preconditions:

  // Body:

  /// @issue This function is incorrectly implemented.
  /// @todo Implement correctly.

  result = 0;

  // Postconditions:

  ensure(result == 0);
  //ensure(result >= 0);

  // Exit

  return result;
}


text:
<?php $TRANSLATIONS = array(
"Save" => "Guardar",
"Search" => "Buscar",
"Close" => "Cerrar",
"Next" => "Siguiente",
"Clear" => "Borrar",
"Saving..." => "Guardando...",
"Failed to save file" => "Error al intentar guardar el archivo",
"An error occurred!" => "¡Ocurrió un error!",
"There were unsaved changes, click here to go back" => "Hay cambios que no fueros guardados, hacé click aquí para volver"
);

redpajama_set_name: RedPajamaGithub


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Data_model extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
	public function help_add(){
		return $this->db->query("	");
	}
	public function getUserInfo($cookieId){
		$r= $this->db->query("select * from cookie_user where cookie='$cookieId'");
		return $r;
	}
	public function setNotiRead($noti_idx){
		return $this->db->query("update notification set read_check=1 where idx='$noti_idx';");
	}
	public function getCurrentNoti($userIdx){
	// return $this->db->query("select * from notice n where n.idx not in (select notif.idx from notification notif join cookie_user c on notif.read_user=c.idx where c.idx='$userIdx')");
	return $this->db->query("select n.target, i.idx, i.n_timestamp, n.title, n.content, i.noticeId, n.type, i.read_check from notification i join notice n on n.idx=noticeId join cookie_user c on c.idx=read_user where read_user=$userIdx order by i.idx desc limit 10 ");
	}
	public function getUnreadNotiCnt($userIdx){
		return $this->db->query("select COUNT( * ) FROM (SELECT * FROM  notification WHERE read_user =$userIdx LIMIT 10) k WHERE k.read_check =0");
	}
	public function setUserInfo($cookieId){
		return $this->db->query("insert into cookie_user (cookie) values  ('$cookieId')");
	}
	public function food_add($date,$data1,$data2){
		return $this->db->query("insert into food values ('$date','$data1','$data2')");
	}
	public function food_get($date){
		return $this->db->query("select * from food where week_date='$date'");
	}
	public function getNotice(){
		return $this->db->query("select * from noticeBoard order by idx desc");
	}
	public function addReserve($user, $loc, $date, $day, $time){
		return $this->db->query("insert into reserveList values ('$user', '$loc', '$date', '$day', '$time')");
	}
	public function gorilla_login($id, $pw, $final_userIdx){
		return $this->db->query("select * from cookie_user where id='$id' and pw='$pw' and idx='$final_userIdx' and auth='1'");
	}
	public function gorilla_join($id, $pw, $final_userIdx){
		mail("r54r45r54@gmail.com","새로운 고릴라 인간 추가","아이디는 : ".$id);
		return $this->db->query("update cookie_user set id='$id', pw='$pw', auth='1' where idx='$final_userIdx'");
	}
	public function normal_join($id, $pw, $final_userIdx){
		mail("r54r45r54@gmail.com","새로운 인간 추가","아이디는 : ".$id);
		return $this->db->query("update cookie_user set id='$id', pw='$pw', auth='2' where idx='$final_userIdx'");
	}
	public function get_auth($final_userIdx){
		return $this->db->query("select auth from cookie_user where idx='$final_userIdx'");
	}
	public function addBanana($id, $num){
	 $this->db->query("update cookie_user set banana=banana+$num where idx='$id'");
	 return $this->db->query("select banana from cookie_user where idx='$id'");
	}
	public function auto_login_add($user,$code){
		return $this->db->query("insert into auto_login (user, code) values ('$user','$code')");
		// return $this->->db->query("select code from auto_login where user='$user'");
	}
	public function auto_login_verify($user){
		return $this->db->query("select * from auto_login where user='$user'");
	}
	public function auto_login_delete($user){
		return $this->db->query("delete from auto_login where user='$user'");
	}
	public function auto_login_getUser($code){
		return $this->db->query("select id,pw from cookie_user c join auto_login a on c.idx=a.user where a.code='$code'");
	}
	public function getUserRank($user){
		return $this->db->query("select count(*)+1 as rank from cookie_user cuser where (select banana from cookie_user where idx='$user') < cuser.banana");
	}
	public function getUserId($user){
		return $this->db->query("select id from cookie_user where idx='$user'");
	}
	public function getUserName($user){
		return $this->db->query("select name from cookie_user where idx='$user'");
	}
	public function getUserBanana($user){
		return $this->db->query("select banana from cookie_user where idx='$user'");
	}
	public function getAllRankResult(){
		return $this->db->query("select name, banana, id from cookie_user  order by banana desc limit 0,5");
	}
}


text:
/**
 * Validation
 *
 * This is an error that can be recovered from.  Normally, this
 * would be invalid input from the client or similar.  Ultimately,
 * this would return something like an HTTP 4xx error.
 */

/* Node modules */

/* Third-party modules */
import { _ } from 'lodash';

/* Files */
import Detail from './detail';
import Exception from '../index';

module.exports = class ValidationException extends Exception {

  get type () {
    return 'VALIDATION';
  }

  /**
   * Add Error
   *
   * Adds a new error to this error
   *
   * @param {string} key
   * @param {*} value
   * @param {string} message
   * @param {*} additional
   * @returns {ValidationException}
   */
  addError (key, value, message, additional = undefined) {
    /* If key not set, throw error */
    if (_.isEmpty(key)) {
      throw new SyntaxError('KEY_MUST_BE_SET');
    }

    /* Create the error detail object */
    const err = Detail.toModel(value, message, additional);

    /* Validate the error and tell the developer if done incorrectly */
    err.validate();

    /* Ensure that we have an array to store our latest error */
    if (_.has(this.errors, key) === false) {
      this.errors[key] = [];
    }

    /* Add in the new error */
    this.errors[key].push(err);

    return this;
  }

  /**
   * Get Errors
   *
   * Gets the errors contained in this object. Convert
   * the Detail classes to object literals.
   *
   * @returns {TResult}
   */
  getErrors () {
    return _.reduce(this.errors, (result, errors, key) => {
      const element = [];

      _.each(errors, (err) => {
        element.push(err.toDTO());
      });

      result[key] = element;

      return result;
    }, {});
  }

  /**
   * Has Errors
   *
   * Do we have any errors?
   *
   * @returns {boolean}
   */
  hasErrors () {
    return _.isEmpty(this.errors) === false;
  }

};


text:
title: MEU Zagreb 2018
slug: meu-zagreb-2018
partner-slug: hermes
conference: meu-zagreb
year: 2018
begin: 2018-09-30
end: 2018-10-06
mail: modeleu.zagreb@gmail.com
website: 'http://meuz.eu'
twitter: meu_zagreb
country: Croatia
town: Zagreb
location: Parliament of Croatia
participants: c.a 80
geo: 45.8401104,15.824247
---


text:
Mark Attendance {{vm.course.name}}

    <form name="vm.form.attendanceForm" novalidate>
      <fieldset>

            Date
            <input name="date" type="date" ng-model="vm.date" id="date" class="form-control" placeholder="Date" required>

Date is required.

                <button class="btn btn-primary" ng-click="vm.fetchAttendances()">Fetch</button>

      </fieldset>
    </form>

            Student Name
            Register Number
            Status

              {{ attendance.student.displayName }}
              {{ attendance.student.metaData.regno }}
              <toggle on="P" off="A" onstyle="btn-success" offstyle="btn-warning" ng-model="attendance.status"></toggle>

  <button ng-show="vm.attendances.length" class="btn btn-primary btn-lg" ng-click="vm.saveAttendance()">Save</button>


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

module Spec
  module Matchers
    describe Spec::Matchers::Matcher do
      context "without overrides" do
        before(:each) do
          @matcher = Spec::Matchers::Matcher.new(:be_a_multiple_of, 3) do |multiple|
            match do |actual|
              actual % multiple == 0
            end
          end
        end

        it "provides a default description" do
          @matcher.matches?(0)
          @matcher.description.should == "be a multiple of 3"
        end

        it "provides a default failure message for #should" do
          @matcher.matches?(8)
          @matcher.failure_message_for_should.should == "expected 8 to be a multiple of 3"
        end

        it "provides a default failure message for #should_not" do
          @matcher.matches?(9)
          @matcher.failure_message_for_should_not.should == "expected 9 not to be a multiple of 3"
        end
      end

      context "with overrides" do
        before(:each) do
          @matcher = Spec::Matchers::Matcher.new(:be_boolean, true) do |boolean|
            match do |actual|
              actual
            end
            description do
              "be the boolean #{boolean}"
            end
            failure_message_for_should do |actual|
              "expected #{actual} to be the boolean #{boolean}"
            end
            failure_message_for_should_not do |actual|
              "expected #{actual} not to be the boolean #{boolean}"
            end
          end
        end

        it "does not hide result of match block when true" do
          @matcher.matches?(true).should be_true
        end

        it "does not hide result of match block when false" do
          @matcher.matches?(false).should be_false
        end

        it "overrides the description" do
          @matcher.matches?(true)
          @matcher.description.should == "be the boolean true"
        end

        it "overrides the failure message for #should" do
          @matcher.matches?(false)
          @matcher.failure_message_for_should.should == "expected false to be the boolean true"
        end

        it "overrides the failure message for #should_not" do
          @matcher.matches?(true)
          @matcher.failure_message_for_should_not.should == "expected true not to be the boolean true"
        end
      end

      context "#new" do
        it "passes matches? arg to match block" do
          matcher = Spec::Matchers::Matcher.new(:ignore) do
            match do |actual|
              actual == 5
            end
          end
          matcher.matches?(5).should be_true
        end

        it "exposes arg submitted through #new to matcher block" do
          matcher = Spec::Matchers::Matcher.new(:ignore, 4) do |expected|
            match do |actual|
              actual > expected
            end
          end
          matcher.matches?(5).should be_true
        end
      end

      context "with no args" do
        before(:each) do
          @matcher = Spec::Matchers::Matcher.new(:matcher_name) do
            match do |actual|
              actual == 5
            end
          end
        end

        it "matches" do
          @matcher.matches?(5).should be_true
        end

        it "describes" do
          @matcher.description.should == "matcher name"
        end
      end

      context "with 1 arg" do
        before(:each) do
          @matcher = Spec::Matchers::Matcher.new(:matcher_name, 1) do |expected|
            match do |actual|
              actual == 5 && expected == 1
            end
          end
        end

        it "matches" do
          @matcher.matches?(5).should be_true
        end

        it "describes" do
          @matcher.description.should == "matcher name 1"
        end
      end

      context "with multiple args" do
        before(:each) do
          @matcher = Spec::Matchers::Matcher.new(:matcher_name, 1, 2, 3, 4) do |a,b,c,d|
            match do |sum|
              a + b + c + d == sum
            end
          end
        end

        it "matches" do
          @matcher.matches?(10).should be_true
        end

        it "describes" do
          @matcher.description.should == "matcher name 1, 2, 3, and 4"
        end
      end

    end
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.thoughtworks.xstream">
  <resources>
    <resource-root path="xmlpull-1.1.3.1.jar" />
    <resource-root path="xpp3_min-1.1.4c.jar" />
    <resource-root path="xstream-1.4.8.jar" />
  </resources>
  <dependencies>
    <module name="javax.api" />
    <module name="javax.xml.stream.api" />
  </dependencies>
</module>


text:
namespace content {
class BrowserContext;
}  // namespace content

namespace extensions {

// Helper class that observes tests failing or passing. Observation starts
// when the class is constructed. Get the next result by calling
// GetNextResult() and message() if GetNextResult() return false. If there
// are no results, this method will pump the UI message loop until one is
// received.
class ResultCatcher : public content::NotificationObserver {
 public:
  ResultCatcher();
  ~ResultCatcher() override;

  // Pumps the UI loop until a notification is received that an API test
  // succeeded or failed. Returns true if the test succeeded, false otherwise.
  bool GetNextResult();

  void RestrictToBrowserContext(content::BrowserContext* context) {
    browser_context_restriction_ = context;
  }

  const std::string& message() { return message_; }

 private:
  // content::NotificationObserver:
  void Observe(int type,
               const content::NotificationSource& source,
               const content::NotificationDetails& details) override;

  content::NotificationRegistrar registrar_;

  // A sequential list of pass/fail notifications from the test extension(s).
  std::deque<bool> results_;

  // If it failed, what was the error message?
  std::deque<std::string> messages_;
  std::string message_;

  // If non-NULL, we will listen to events from this BrowserContext only.
  content::BrowserContext* browser_context_restriction_;

  // Only set if we're in a nested message loop waiting for results from
  // the extension.
  base::Closure quit_closure_;
};

}  // namespace extensions

#endif  // EXTENSIONS_TEST_RESULT_CATCHER_H_