text:
const char* VisualScriptBuiltinFunc::func_name[VisualScriptBuiltinFunc::FUNC_MAX]={
	"sin",
	"cos",
	"tan",
	"sinh",
	"cosh",
	"tanh",
	"asin",
	"acos",
	"atan",
	"atan2",
	"sqrt",
	"fmod",
	"fposmod",
	"floor",
	"ceil",
	"round",
	"abs",
	"sign",
	"pow",
	"log",
	"exp",
	"is_nan",
	"is_inf",
	"ease",
	"decimals",
	"stepify",
	"lerp",
	"dectime",
	"randomize",
	"randi",
	"randf",
	"rand_range",
	"seed",
	"rand_seed",
	"deg2rad",
	"rad2deg",
	"linear2db",
	"db2linear",
	"max",
	"min",
	"clamp",
	"nearest_po2",
	"weakref",
	"funcref",
	"convert",
	"typeof",
	"type_exists",
	"str",
	"print",
	"printerr",
	"printraw",
	"var2str",
	"str2var",
	"var2bytes",
	"bytes2var",
};

VisualScriptBuiltinFunc::BuiltinFunc VisualScriptBuiltinFunc::find_function(const String& p_string) {

	for(int i=0;i<FUNC_MAX;i++) {
		if (p_string==func_name[i])
			return BuiltinFunc(i);
	}

	return FUNC_MAX;
}

String VisualScriptBuiltinFunc::get_func_name(BuiltinFunc p_func) {

	ERR_FAIL_INDEX_V(p_func,FUNC_MAX,String());
	return func_name[p_func];
}

int VisualScriptBuiltinFunc::get_output_sequence_port_count() const {

	return has_input_sequence_port() ? 1 : 0;
}

bool VisualScriptBuiltinFunc::has_input_sequence_port() const{

	switch(func) {

		case MATH_RANDOMIZE:
		case TEXT_PRINT:
		case TEXT_PRINTERR:
		case TEXT_PRINTRAW:
			return true;
		default:
			return false;

	}

}

int VisualScriptBuiltinFunc::get_func_argument_count(BuiltinFunc p_func) {

	switch(p_func) {

		case MATH_RANDOMIZE:
		case MATH_RAND:
		case MATH_RANDF:
			return 0;
		case MATH_SIN:
		case MATH_COS:
		case MATH_TAN:
		case MATH_SINH:
		case MATH_COSH:
		case MATH_TANH:
		case MATH_ASIN:
		case MATH_ACOS:
		case MATH_ATAN:
		case MATH_SQRT:
		case MATH_FLOOR:
		case MATH_CEIL:
		case MATH_ROUND:
		case MATH_ABS:
		case MATH_SIGN:
		case MATH_LOG:
		case MATH_EXP:
		case MATH_ISNAN:
		case MATH_ISINF:
		case MATH_DECIMALS:
		case MATH_SEED:
		case MATH_RANDSEED:
		case MATH_DEG2RAD:
		case MATH_RAD2DEG:
		case MATH_LINEAR2DB:
		case MATH_DB2LINEAR:
		case LOGIC_NEAREST_PO2:
		case OBJ_WEAKREF:
		case TYPE_OF:
		case TEXT_STR:
		case TEXT_PRINT:
		case TEXT_PRINTERR:
		case TEXT_PRINTRAW:
		case VAR_TO_STR:
		case STR_TO_VAR:
		case VAR_TO_BYTES:
		case BYTES_TO_VAR:
		case TYPE_EXISTS:
			return 1;
		case MATH_ATAN2:
		case MATH_FMOD:
		case MATH_FPOSMOD:
		case MATH_POW:
		case MATH_EASE:
		case MATH_STEPIFY:
		case MATH_RANDOM:
		case LOGIC_MAX:
		case LOGIC_MIN:
		case FUNC_FUNCREF:
		case TYPE_CONVERT:
			return 2;
		case MATH_LERP:
		case MATH_DECTIME:
		case LOGIC_CLAMP:
			return 3;
		case FUNC_MAX:{}

	}
	return 0;
}

int VisualScriptBuiltinFunc::get_input_value_port_count() const{

	return get_func_argument_count(func);
}
int VisualScriptBuiltinFunc::get_output_value_port_count() const{

	switch(func) {
		case MATH_RANDOMIZE:
		case TEXT_PRINT:
		case TEXT_PRINTERR:
		case TEXT_PRINTRAW:
		case MATH_SEED:
			return 0;
		case MATH_RANDSEED:
			return 2;
		default:
			return 1;
	}

	return 1;
}

String VisualScriptBuiltinFunc::get_output_sequence_port_text(int p_port) const {

	return String();
}

PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const{

	switch(func) {

		case MATH_SIN:
		case MATH_COS:
		case MATH_TAN:
		case MATH_SINH:
		case MATH_COSH:
		case MATH_TANH:
		case MATH_ASIN:
		case MATH_ACOS:
		case MATH_ATAN:
		case MATH_ATAN2:
		case MATH_SQRT: {
			return PropertyInfo(Variant::REAL,"num");
		} break;
		case MATH_FMOD:
		case MATH_FPOSMOD: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"x");
			else
				return PropertyInfo(Variant::REAL,"y");
		} break;
		case MATH_FLOOR:
		case MATH_CEIL:
		case MATH_ROUND:
		case MATH_ABS:
		case MATH_SIGN: {
			return PropertyInfo(Variant::REAL,"num");

		} break;

		case MATH_POW: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"x");
			else
				return PropertyInfo(Variant::REAL,"y");
		} break;
		case MATH_LOG:
		case MATH_EXP:
		case MATH_ISNAN:
		case MATH_ISINF: {
			return PropertyInfo(Variant::REAL,"num");
		} break;
		case MATH_EASE: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"s");
			else
				return PropertyInfo(Variant::REAL,"curve");
		} break;
		case MATH_DECIMALS: {
			return PropertyInfo(Variant::REAL,"step");
		} break;
		case MATH_STEPIFY: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"s");
			else
				return PropertyInfo(Variant::REAL,"steps");
		} break;
		case MATH_LERP: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"from");
			else if (p_idx==1)
				return PropertyInfo(Variant::REAL,"to");
			else
				return PropertyInfo(Variant::REAL,"weight");

		} break;
		case MATH_DECTIME: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"value");
			else if (p_idx==1)
				return PropertyInfo(Variant::REAL,"amount");
			else
				return PropertyInfo(Variant::REAL,"step");
		} break;
		case MATH_RANDOMIZE: {

		} break;
		case MATH_RAND: {

		} break;
		case MATH_RANDF: {

		} break;
		case MATH_RANDOM: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"from");
			else
				return PropertyInfo(Variant::REAL,"to");
		} break;
		case MATH_SEED: {
			return PropertyInfo(Variant::INT,"seed");
		} break;
		case MATH_RANDSEED: {
			return PropertyInfo(Variant::INT,"seed");
		} break;
		case MATH_DEG2RAD: {
			return PropertyInfo(Variant::REAL,"deg");
		} break;
		case MATH_RAD2DEG: {
			return PropertyInfo(Variant::REAL,"rad");
		} break;
		case MATH_LINEAR2DB: {
			return PropertyInfo(Variant::REAL,"nrg");
		} break;
		case MATH_DB2LINEAR: {
			return PropertyInfo(Variant::REAL,"db");
		} break;
		case LOGIC_MAX: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"a");
			else
				return PropertyInfo(Variant::REAL,"b");
		} break;
		case LOGIC_MIN: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"a");
			else
				return PropertyInfo(Variant::REAL,"b");
		} break;
		case LOGIC_CLAMP: {
			if (p_idx==0)
				return PropertyInfo(Variant::REAL,"a");
			else if (p_idx==0)
				return PropertyInfo(Variant::REAL,"min");
			else
				return PropertyInfo(Variant::REAL,"max");
		} break;
		case LOGIC_NEAREST_PO2: {
			return PropertyInfo(Variant::INT,"num");
		} break;
		case OBJ_WEAKREF: {

			return PropertyInfo(Variant::OBJECT,"source");

		} break;
		case FUNC_FUNCREF: {

			if (p_idx==0)
				return PropertyInfo(Variant::OBJECT,"instance");
			else
				return PropertyInfo(Variant::STRING,"funcname");

		} break;
		case TYPE_CONVERT: {

			if (p_idx==0)
				return PropertyInfo(Variant::NIL,"what");
			else
				return PropertyInfo(Variant::STRING,"type");
		} break;
		case TYPE_OF: {
			return PropertyInfo(Variant::NIL,"what");

		} break;
		case TYPE_EXISTS: {

			return PropertyInfo(Variant::STRING,"type");

		} break;
		case TEXT_STR: {

			return PropertyInfo(Variant::NIL,"value");

		} break;
		case TEXT_PRINT: {

			return PropertyInfo(Variant::NIL,"value");

		} break;
		case TEXT_PRINTERR: {
			return PropertyInfo(Variant::NIL,"value");

		} break;
		case TEXT_PRINTRAW: {

			return PropertyInfo(Variant::NIL,"value");

		} break;
		case VAR_TO_STR: {
			return PropertyInfo(Variant::NIL,"var");

		} break;
		case STR_TO_VAR: {

			return PropertyInfo(Variant::STRING,"string");
		} break;
		case VAR_TO_BYTES: {
			return PropertyInfo(Variant::NIL,"var");

		} break;
		case BYTES_TO_VAR: {

			return PropertyInfo(Variant::RAW_ARRAY,"bytes");
		} break;
		case FUNC_MAX:{}
	}

	return PropertyInfo();
}

PropertyInfo VisualScriptBuiltinFunc::get_output_value_port_info(int p_idx) const{

	Variant::Type t=Variant::NIL;
	switch(func) {

		case MATH_SIN:
		case MATH_COS:
		case MATH_TAN:
		case MATH_SINH:
		case MATH_COSH:
		case MATH_TANH:
		case MATH_ASIN:
		case MATH_ACOS:
		case MATH_ATAN:
		case MATH_ATAN2:
		case MATH_SQRT:
		case MATH_FMOD:
		case MATH_FPOSMOD:
		case MATH_FLOOR:
		case MATH_CEIL: {
			t=Variant::REAL;
		} break;
		case MATH_ROUND: {
			t=Variant::INT;
		} break;
		case MATH_ABS: {
			t=Variant::NIL;
		} break;
		case MATH_SIGN: {
			t=Variant::NIL;
		} break;
		case MATH_POW:
		case MATH_LOG:
		case MATH_EXP: {
			t=Variant::REAL;
		} break;
		case MATH_ISNAN:
		case MATH_ISINF: {
			t=Variant::BOOL;
		} break;
		case MATH_EASE: {
			t=Variant::REAL;
		} break;
		case MATH_DECIMALS: {
			t=Variant::INT;
		} break;
		case MATH_STEPIFY:
		case MATH_LERP:
		case MATH_DECTIME: {
			t=Variant::REAL;

		} break;
		case MATH_RANDOMIZE: {

		} break;
		case MATH_RAND: {

			t=Variant::INT;
		} break;
		case MATH_RANDF:
		case MATH_RANDOM: {
			t=Variant::REAL;
		} break;
		case MATH_SEED: {

		} break;
		case MATH_RANDSEED: {

			if (p_idx==0)
				return PropertyInfo(Variant::INT,"rnd");
			else
				return PropertyInfo(Variant::INT,"seed");
		} break;
		case MATH_DEG2RAD:
		case MATH_RAD2DEG:
		case MATH_LINEAR2DB:
		case MATH_DB2LINEAR: {
			t=Variant::REAL;
		} break;
		case LOGIC_MAX:
		case LOGIC_MIN:
		case LOGIC_CLAMP: {

		} break;

		case LOGIC_NEAREST_PO2: {
			t=Variant::NIL;
		} break;
		case OBJ_WEAKREF: {

			t=Variant::OBJECT;

		} break;
		case FUNC_FUNCREF: {

			t=Variant::OBJECT;

		} break;
		case TYPE_CONVERT: {

		} break;
		case TYPE_OF: {
			t=Variant::INT;

		} break;
		case TYPE_EXISTS: {

			t=Variant::BOOL;

		} break;
		case TEXT_STR: {

			t=Variant::STRING;

		} break;
		case TEXT_PRINT: {

		} break;
		case TEXT_PRINTERR: {

		} break;
		case TEXT_PRINTRAW: {

		} break;
		case VAR_TO_STR: {
			t=Variant::STRING;
		} break;
		case STR_TO_VAR: {

		} break;
		case VAR_TO_BYTES: {
			t=Variant::RAW_ARRAY;

		} break;
		case BYTES_TO_VAR: {

		} break;
		case FUNC_MAX:{}
	}

	return PropertyInfo(t,"");
}

String VisualScriptBuiltinFunc::get_caption() const {

	return "BuiltinFunc";
}

String VisualScriptBuiltinFunc::get_text() const {

	return func_name[func];
}

void VisualScriptBuiltinFunc::set_func(BuiltinFunc p_which) {

	ERR_FAIL_INDEX(p_which,FUNC_MAX);
	func=p_which;
	_change_notify();
	ports_changed_notify();
}

VisualScriptBuiltinFunc::BuiltinFunc VisualScriptBuiltinFunc::get_func() {
	return func;
}

#define VALIDATE_ARG_NUM(m_arg) \
	if (!p_inputs[m_arg]->is_num()) {\
		r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;\
		r_error.argument=m_arg;\
		r_error.expected=Variant::REAL;\
		return;\
	}

void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func,const Variant** p_inputs,Variant* r_return,Variant::CallError& r_error,String& r_error_str) {

	switch(p_func) {
		case VisualScriptBuiltinFunc::MATH_SIN: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::sin(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_COS: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::cos(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_TAN: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::tan(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_SINH: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::sinh(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_COSH: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::cosh(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_TANH: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::tanh(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ASIN: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::asin(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ACOS: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::acos(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ATAN: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::atan(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ATAN2: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::atan2(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_SQRT: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::sqrt(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_FMOD: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::fmod(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_FPOSMOD: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::fposmod(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_FLOOR: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::floor(*p_inputs[0]);
		  } break;
		case VisualScriptBuiltinFunc::MATH_CEIL: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::ceil(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ROUND: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::round(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ABS: {

			if (p_inputs[0]->get_type()==Variant::INT) {

				int64_t i = *p_inputs[0];
				*r_return=ABS(i);
			} else if (p_inputs[0]->get_type()==Variant::REAL) {

				real_t r = *p_inputs[0];
				*r_return=Math::abs(r);
			} else {

				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::REAL;

			}
		} break;
		case VisualScriptBuiltinFunc::MATH_SIGN: {

				if (p_inputs[0]->get_type()==Variant::INT) {

					int64_t i = *p_inputs[0];
					*r_return= i < 0 ? -1 : ( i > 0 ? +1 : 0);
				} else if (p_inputs[0]->get_type()==Variant::REAL) {

					real_t r = *p_inputs[0];
					*r_return= r < 0.0 ? -1.0 : ( r > 0.0 ? +1.0 : 0.0);
				} else {

					r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
					r_error.argument=0;
					r_error.expected=Variant::REAL;

				}
		} break;
		case VisualScriptBuiltinFunc::MATH_POW: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::pow(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_LOG: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::log(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_EXP: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::exp(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ISNAN: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::is_nan(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_ISINF: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::is_inf(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_EASE: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::ease(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_DECIMALS: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::step_decimals(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_STEPIFY: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::stepify(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_LERP: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			VALIDATE_ARG_NUM(2);
			*r_return=Math::lerp(*p_inputs[0],*p_inputs[1],*p_inputs[2]);
		} break;
		case VisualScriptBuiltinFunc::MATH_DECTIME: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			VALIDATE_ARG_NUM(2);
			*r_return=Math::dectime(*p_inputs[0],*p_inputs[1],*p_inputs[2]);
		} break;
		case VisualScriptBuiltinFunc::MATH_RANDOMIZE: {
			Math::randomize();

		} break;
		case VisualScriptBuiltinFunc::MATH_RAND: {
			*r_return=Math::rand();
		} break;
		case VisualScriptBuiltinFunc::MATH_RANDF: {
			*r_return=Math::randf();
		} break;
		case VisualScriptBuiltinFunc::MATH_RANDOM: {

			VALIDATE_ARG_NUM(0);
			VALIDATE_ARG_NUM(1);
			*r_return=Math::random(*p_inputs[0],*p_inputs[1]);
		} break;
		case VisualScriptBuiltinFunc::MATH_SEED: {

			VALIDATE_ARG_NUM(0);
			uint32_t seed=*p_inputs[0];
			Math::seed(seed);

		} break;
		case VisualScriptBuiltinFunc::MATH_RANDSEED: {

			VALIDATE_ARG_NUM(0);
			uint32_t seed=*p_inputs[0];
			int ret = Math::rand_from_seed(&seed);
			Array reta;
			reta.push_back(ret);
			reta.push_back(seed);
			*r_return=reta;

		} break;
		case VisualScriptBuiltinFunc::MATH_DEG2RAD: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::deg2rad(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_RAD2DEG: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::rad2deg(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_LINEAR2DB: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::linear2db(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::MATH_DB2LINEAR: {

			VALIDATE_ARG_NUM(0);
			*r_return=Math::db2linear(*p_inputs[0]);
		} break;
		case VisualScriptBuiltinFunc::LOGIC_MAX: {

			if (p_inputs[0]->get_type()==Variant::INT && p_inputs[1]->get_type()==Variant::INT) {

				int64_t a = *p_inputs[0];
				int64_t b = *p_inputs[1];
				*r_return=MAX(a,b);
			} else {
				VALIDATE_ARG_NUM(0);
				VALIDATE_ARG_NUM(1);

				real_t a = *p_inputs[0];
				real_t b = *p_inputs[1];

				*r_return=MAX(a,b);
			}

		} break;
		case VisualScriptBuiltinFunc::LOGIC_MIN: {

			if (p_inputs[0]->get_type()==Variant::INT && p_inputs[1]->get_type()==Variant::INT) {

				int64_t a = *p_inputs[0];
				int64_t b = *p_inputs[1];
				*r_return=MIN(a,b);
			} else {
				VALIDATE_ARG_NUM(0);
				VALIDATE_ARG_NUM(1);

				real_t a = *p_inputs[0];
				real_t b = *p_inputs[1];

				*r_return=MIN(a,b);
			}
		} break;
		case VisualScriptBuiltinFunc::LOGIC_CLAMP: {

			if (p_inputs[0]->get_type()==Variant::INT && p_inputs[1]->get_type()==Variant::INT && p_inputs[2]->get_type()==Variant::INT) {

				int64_t a = *p_inputs[0];
				int64_t b = *p_inputs[1];
				int64_t c = *p_inputs[2];
				*r_return=CLAMP(a,b,c);
			} else {
				VALIDATE_ARG_NUM(0);
				VALIDATE_ARG_NUM(1);
				VALIDATE_ARG_NUM(2);

				real_t a = *p_inputs[0];
				real_t b = *p_inputs[1];
				real_t c = *p_inputs[2];

				*r_return=CLAMP(a,b,c);
			}
		} break;
		case VisualScriptBuiltinFunc::LOGIC_NEAREST_PO2: {

			VALIDATE_ARG_NUM(0);
			int64_t num = *p_inputs[0];
			*r_return = nearest_power_of_2(num);
		} break;
		case VisualScriptBuiltinFunc::OBJ_WEAKREF: {

			if (p_inputs[0]->get_type()!=Variant::OBJECT) {

				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::OBJECT;

				return;

			}

			if (p_inputs[0]->is_ref()) {

				REF r = *p_inputs[0];
				if (!r.is_valid()) {

					return;
				}

				Ref<WeakRef> wref = memnew( WeakRef );
				wref->set_ref(r);
				*r_return=wref;
			} else {
				Object *obj = *p_inputs[0];
				if (!obj) {

					return;
				}
				Ref<WeakRef> wref = memnew( WeakRef );
				wref->set_obj(obj);
				*r_return=wref;
			}

		} break;
		case VisualScriptBuiltinFunc::FUNC_FUNCREF: {

			if (p_inputs[0]->get_type()!=Variant::OBJECT) {

				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::OBJECT;

				return;

			}
			if (p_inputs[1]->get_type()!=Variant::STRING && p_inputs[1]->get_type()!=Variant::NODE_PATH) {

				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=1;
				r_error.expected=Variant::STRING;

				return;

			}

			Ref<FuncRef> fr = memnew( FuncRef);

			fr->set_instance(*p_inputs[0]);
			fr->set_function(*p_inputs[1]);

			*r_return=fr;

		} break;
		case VisualScriptBuiltinFunc::TYPE_CONVERT: {

			VALIDATE_ARG_NUM(1);
			int type=*p_inputs[1];
			if (type<0 || type>=Variant::VARIANT_MAX) {

				r_error_str=RTR("Invalid type argument to convert(), use TYPE_* constants.");
				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::INT;
				return;

			} else {

				*r_return=Variant::construct(Variant::Type(type),p_inputs,1,r_error);
			}
		} break;
		case VisualScriptBuiltinFunc::TYPE_OF: {

			*r_return = p_inputs[0]->get_type();

		} break;
		case VisualScriptBuiltinFunc::TYPE_EXISTS: {

			*r_return = ObjectTypeDB::type_exists(*p_inputs[0]);

		} break;
		case VisualScriptBuiltinFunc::TEXT_STR: {

			String str = *p_inputs[0];

			*r_return=str;

		} break;
		case VisualScriptBuiltinFunc::TEXT_PRINT: {

			String str = *p_inputs[0];
			print_line(str);

		} break;

		case VisualScriptBuiltinFunc::TEXT_PRINTERR: {

			String str = *p_inputs[0];

			//str+="\n";
			OS::get_singleton()->printerr("%s\n",str.utf8().get_data());

		} break;
		case VisualScriptBuiltinFunc::TEXT_PRINTRAW: {
			String str = *p_inputs[0];

			//str+="\n";
			OS::get_singleton()->print("%s",str.utf8().get_data());

		} break;
		case VisualScriptBuiltinFunc::VAR_TO_STR: {

			String vars;
			VariantWriter::write_to_string(*p_inputs[0],vars);
			*r_return=vars;
		} break;
		case VisualScriptBuiltinFunc::STR_TO_VAR: {

			if (p_inputs[0]->get_type()!=Variant::STRING) {
				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::STRING;

				return;
			}

			VariantParser::StreamString ss;
			ss.s=*p_inputs[0];

			String errs;
			int line;
			Error err = VariantParser::parse(&ss,*r_return,errs,line);

			if (err!=OK) {
				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::STRING;
				*r_return="Parse error at line "+itos(line)+": "+errs;
				return;
			}

		} break;
		case VisualScriptBuiltinFunc::VAR_TO_BYTES: {

			ByteArray barr;
			int len;
			Error err = encode_variant(*p_inputs[0],NULL,len);
			if (err) {
				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::NIL;
				r_error_str="Unexpected error encoding variable to bytes, likely unserializable type found (Object or RID).";
				return;
			}

			barr.resize(len);
			{
				ByteArray::Write w = barr.write();
				encode_variant(*p_inputs[0],w.ptr(),len);

			}
			*r_return=barr;
		} break;
		case VisualScriptBuiltinFunc::BYTES_TO_VAR: {

			if (p_inputs[0]->get_type()!=Variant::RAW_ARRAY) {
				r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
				r_error.argument=0;
				r_error.expected=Variant::RAW_ARRAY;

				return;
			}

			ByteArray varr=*p_inputs[0];
			Variant ret;
			{
				ByteArray::Read r=varr.read();
				Error err = decode_variant(ret,r.ptr(),varr.size(),NULL);
				if (err!=OK) {
					r_error_str=RTR("Not enough bytes for decoding bytes, or invalid format.");
					r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
					r_error.argument=0;
					r_error.expected=Variant::RAW_ARRAY;
					return;
				}

			}

			*r_return=ret;

		} break;
		default: {}
	}

}

class VisualScriptNodeInstanceBuiltinFunc : public VisualScriptNodeInstance {
public:

	VisualScriptBuiltinFunc *node;
	VisualScriptInstance *instance;

	VisualScriptBuiltinFunc::BuiltinFunc func;

	//virtual int get_working_memory_size() const { return 0; }
	//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
	//virtual bool get_output_port_unsequenced(int p_idx,Variant* r_value,Variant* p_working_mem,String &r_error) const { return true; }

	virtual int step(const Variant** p_inputs,Variant** p_outputs,StartMode p_start_mode,Variant* p_working_mem,Variant::CallError& r_error,String& r_error_str) {

		VisualScriptBuiltinFunc::exec_func(func,p_inputs,p_outputs[0],r_error,r_error_str);
		return 0;
	}

};

VisualScriptNodeInstance* VisualScriptBuiltinFunc::instance(VisualScriptInstance* p_instance) {

	VisualScriptNodeInstanceBuiltinFunc * instance = memnew(VisualScriptNodeInstanceBuiltinFunc );
	instance->node=this;
	instance->instance=p_instance;
	instance->func=func;
	return instance;
}

void VisualScriptBuiltinFunc::_bind_methods() {

	ObjectTypeDB::bind_method(_MD("set_func","which"),&VisualScriptBuiltinFunc::set_func);
	ObjectTypeDB::bind_method(_MD("get_func"),&VisualScriptBuiltinFunc::get_func);

	String cc;

	for(int i=0;i<FUNC_MAX;i++) {

		if (i>0)
			cc+=",";
		cc+=func_name[i];
	}
	ADD_PROPERTY(PropertyInfo(Variant::INT,"function",PROPERTY_HINT_ENUM,cc),_SCS("set_func"),_SCS("get_func"));
}

VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {

	func=MATH_SIN;
}

template<VisualScriptBuiltinFunc::BuiltinFunc func>
static Ref<VisualScriptNode> create_builtin_func_node(const String& p_name) {

	Ref<VisualScriptBuiltinFunc> node;
	node.instance();
	node->set_func(func);
	return node;
}

void register_visual_script_builtin_func_node() {

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/sin",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_SIN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/cos",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_COS>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/tan",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_TAN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/sinh",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_SINH>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/cosh",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_COSH>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/tanh",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_TANH>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/asin",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ASIN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/acos",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ACOS>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/atan",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ATAN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/atan2",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ATAN2>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/sqrt",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_SQRT>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/fmod",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_FMOD>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/fposmod",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_FPOSMOD>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/floor",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_FLOOR>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/ceil",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_CEIL>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/round",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ROUND>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/abs",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ABS>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/sign",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_SIGN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/pow",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_POW>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/log",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_LOG>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/exp",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_EXP>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/isnan",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ISNAN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/isinf",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_ISINF>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/ease",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_EASE>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/decimals",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DECIMALS>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/stepify",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_STEPIFY>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/lerp",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_LERP>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/dectime",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DECTIME>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/randomize",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RANDOMIZE>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/rand",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RAND>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/randf",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RANDF>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/random",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RANDOM>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/seed",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_SEED>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/randseed",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RANDSEED>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/deg2rad",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DEG2RAD>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/rad2deg",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_RAD2DEG>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/linear2db",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_LINEAR2DB>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/db2linear",create_builtin_func_node<VisualScriptBuiltinFunc::MATH_DB2LINEAR>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/max",create_builtin_func_node<VisualScriptBuiltinFunc::LOGIC_MAX>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/min",create_builtin_func_node<VisualScriptBuiltinFunc::LOGIC_MIN>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/clamp",create_builtin_func_node<VisualScriptBuiltinFunc::LOGIC_CLAMP>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/nearest_po2",create_builtin_func_node<VisualScriptBuiltinFunc::LOGIC_NEAREST_PO2>);

	VisualScriptLanguage::singleton->add_register_func("functions/built_in/weakref",create_builtin_func_node<VisualScriptBuiltinFunc::OBJ_WEAKREF>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/funcref",create_builtin_func_node<VisualScriptBuiltinFunc::FUNC_FUNCREF>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/convert",create_builtin_func_node<VisualScriptBuiltinFunc::TYPE_CONVERT>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/typeof",create_builtin_func_node<VisualScriptBuiltinFunc::TYPE_OF>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/type_exists",create_builtin_func_node<VisualScriptBuiltinFunc::TYPE_EXISTS>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/str",create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_STR>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/print",create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINT>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/printerr",create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINTERR>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/printraw",create_builtin_func_node<VisualScriptBuiltinFunc::TEXT_PRINTRAW>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/var2str",create_builtin_func_node<VisualScriptBuiltinFunc::VAR_TO_STR>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/str2var",create_builtin_func_node<VisualScriptBuiltinFunc::STR_TO_VAR>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/var2bytes",create_builtin_func_node<VisualScriptBuiltinFunc::VAR_TO_BYTES>);
	VisualScriptLanguage::singleton->add_register_func("functions/built_in/bytes2var",create_builtin_func_node<VisualScriptBuiltinFunc::BYTES_TO_VAR>);

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html SYSTEM "about:legacy-compat">

    <title>phpDox - WatsonSdkPhp\Exceptions\WatsonGeneralException</title>
    <link rel="stylesheet" type="text/css" href="../css/style.css" media="screen"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

/**phpDox

          Overview

          Namespaces

          Interfaces

          Classes

          Source

            Overview

            Classes

            WatsonSdkPhp\Exceptions

WatsonGeneralException

            Introduction

            Synopsis

            Hierarchy

            Members

            Methods

            Source

WatsonSdkPhp\Exceptions\WatsonGeneralException

Synopsis

class WatsonGeneralException
                extends Exception
            {

// Inherited members from Exception

protected  $message;

protected  $code;

protected  $file;

protected  $line;

// methods

public void __construct()

public string __toString()

// Inherited methods from Exception

public void __construct()

public final string getMessage()

public final Throwable getPrevious()

public final mixed getCode()

public final string getFile()

public final int getLine()

public final array getTrace()

public final string getTraceAsString()

public string __toString()

            }

Hierarchy

Extends

              Exception

Members

protected

$code
                —
                int
The exception code

$file
                —
                string
The filename where the exception was created

$line
                —
                int
The line where the exception was created

$message
                —
                string
The exception message

Methods

public

__construct()
                — WatsonGeneralException constructor.

__toString()
                — Exception string representation

Inherited from Exception

public

__toString()
                — String representation of the exception

getCode()
                — Gets the Exception code

getFile()
                — Gets the file in which the exception was created

getLine()
                — Gets the line in which the exception was created

getMessage()
                — Gets the Exception message

getPrevious()
                — Returns previous Exception

getTrace()
                — Gets the stack trace

getTraceAsString()
                — Gets the stack trace as a string

      Generated using phpDox 0.10.0 - Copyright (C) 2010 - 2017 by Arne Blankerts

redpajama_set_name: RedPajamaGithub


text:
/*
 * NickGenerator.cpp
 *
 *  Created on: 21 Haz 2017
 *      Author: Guner
 */

#include "NickGenerator.h"

namespace menma {

NickGenerator::NickGenerator() {
    // TODO Auto-generated constructor stub
    srand (time(NULL));
}

std::string NickGenerator::getNick() {
    std::string ss;
    int number = (rand() % 5) + 1;
    int index;
    for (int i = 0; i < number; ++i) {
        index = (rand() % Alphabet::length);
        ss.append(Alphabet::str[index]);
    }
    return ss;
}

std::string NickGenerator::getNick(int number) {
    std::string ss;
    int index;
    for (int i = 0; i < number; ++i) {
        index = (rand() % Alphabet::length);
        ss.append(Alphabet::str[index]);
    }
    return ss;
}

} /* namespace gnr */


text: moved to https://github.com/slashquery/slashquery/


text:
#ifndef __XF_KEYBOARD_H
#define __XF_KEYBOARD_H

#include <freerdp/locale/keyboard.h>

#include "xf_client.h"
#include "xfreerdp.h"

#define XF_ACTION_SCRIPT "~/.config/freerdp/action.sh"

struct _XF_MODIFIER_KEYS
{
	BOOL Shift;
	BOOL LeftShift;
	BOOL RightShift;
	BOOL Alt;
	BOOL LeftAlt;
	BOOL RightAlt;
	BOOL Ctrl;
	BOOL LeftCtrl;
	BOOL RightCtrl;
	BOOL Super;
	BOOL LeftSuper;
	BOOL RightSuper;
};
typedef struct _XF_MODIFIER_KEYS XF_MODIFIER_KEYS;

BOOL xf_keyboard_init(xfContext* xfc);
void xf_keyboard_free(xfContext* xfc);
void xf_keyboard_clear(xfContext* xfc);
void xf_keyboard_key_press(xfContext* xfc, BYTE keycode, KeySym keysym);
void xf_keyboard_key_release(xfContext* xfc, BYTE keycode);
void xf_keyboard_release_all_keypress(xfContext* xfc);
BOOL xf_keyboard_key_pressed(xfContext* xfc, KeySym keysym);
void xf_keyboard_send_key(xfContext* xfc, BOOL down, BYTE keycode);
int xf_keyboard_read_keyboard_state(xfContext* xfc);
BOOL xf_keyboard_get_key_state(xfContext* xfc, int state, int keysym);
UINT32 xf_keyboard_get_toggle_keys_state(xfContext* xfc);
void xf_keyboard_focus_in(xfContext* xfc);
BOOL xf_keyboard_handle_special_keys(xfContext* xfc, KeySym keysym);
BOOL xf_keyboard_set_indicators(rdpContext* context, UINT16 led_flags);

#endif /* __XF_KEYBOARD_H */


text:
package spring.corp.framework.exceptions;

import spring.corp.framework.view.InputHolder;

public class UserLinkException extends UserException {

	private static final long serialVersionUID = 1L;

	private String campo;

	public UserLinkException(String campo, String message) {
		super(message);
		this.campo = campo;
	}

	public UserLinkException(String campo, String message, Throwable cause) {
		super(message, cause);
		this.campo = campo;
	}

	public UserLinkException(String campo, Throwable cause) {
		super(cause);
		this.campo = campo;
	}

	/**
	 * Utilize esse metodo para instanciar a excecao e ja coloca-la no InputHolder Thread Local para que seja apresentado para o usuario
	 * @param campo O campo da tela que gerou a excecao
	 * @param message A mensagem da excecao
	 * @return Instancia de UserLinkException
	 */
	public static UserLinkException newInstanceWithInputHolderHandled(String campo, String message) {
		campo = campo == null?"":campo;
		UserLinkException e = new UserLinkException(campo, message);
		InputHolder.get().add(e);
		return e;
	}

	public String getCampo() {
		return campo;
	}
}


text:
<!doctype html>

        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="apple-touch-icon" href="apple-touch-icon.png">

        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">
        <link rel="stylesheet" href="css/ttbDocStyle.css">
        <link rel=icon href=/favicon.png>

Privacy Policy

            Last updated: December 29, 2016

The Tucker Brothers LLC ("us", "we", or "our") operates http://www.nextstageapp.com and the Next Stage apps (the
            "Site"). This page informs you of our policies regarding the collection, use and disclosure of
            Personal Information we receive from users of the Site.

We use your Personal Information only for providing and improving the Site. By using the Site, you
            agree to the collection and use of information in accordance with this policy.

Information Collection And Use

While using our Site, we may ask you to provide us with certain personally identifiable information
            that can be used to contact or identify you. Personally identifiable information may include, but is not
            limited to your name ("Personal Information").

Log Data

Like many site operators, we collect information that your browser sends whenever you visit our Site
            ("Log Data").

This Log Data may include information such as your computer's Internet Protocol ("IP") address,
            browser type, browser version, the pages of our Site that you visit, the time and date of your visit,
            the time spent on those pages and other statistics.

In addition, we may use third party services such as Google Analytics that collect, monitor and
            analyze usage data.

The Log Data section is for businesses that use analytics or tracking services in websites or
            apps, like Google Analytics. For the full disclosure section, create your own Privacy Policy.

Communications

We may use your Personal Information to contact you with newsletters, marketing or promotional
            materials and other information, as well as to provide you with analytic data about your business.

Cookies

Cookies are files with small amount of data, which may include an anonymous unique identifier.
            Cookies are sent to your browser from a web site and stored on your computer's hard drive.

Like many sites, we use "cookies" to collect information. You can instruct your browser to refuse all
            cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may
            not be able to use some portions of our Site.

Security

The security of your Personal Information is important to us, but remember that no method of
            transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to
            use commercially acceptable means to protect your Personal Information, we cannot guarantee its
            absolute security.

Changes To This Privacy Policy

This Privacy Policy is effective as of December 26, 2016 and will remain in effect except with respect to any
            changes in its provisions in the future, which will be in effect immediately after being posted on this
            page.

We reserve the right to update or change our Privacy Policy at any time and you should check this
            Privacy Policy periodically. Your continued use of the Service after we post any modifications to the
            Privacy Policy on this page will constitute your acknowledgment of the modifications and your
            consent to abide and be bound by the modified Privacy Policy.

If we make any material changes to this Privacy Policy, we will notify you either through the email
            address you have provided us, or by placing a prominent notice on our website.

Contact Us

If you have any questions about this Privacy Policy, please contact us.


text:
<?php

namespace app\modules\core\models;

use Yii;

/**
 * This is the model class for table "product_operation".
 *
 * @property string $productID
 * @property string $operationTypeID
 * @property integer $sequenceNumber
 * @property integer $enable
 *
 * @property OperationType $operationType
 * @property Product $product
 */
class ProductOperation extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'product_operation';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['productID', 'operationTypeID', 'sequenceNumber'], 'required'],
            [['productID', 'operationTypeID', 'sequenceNumber', 'enable'], 'integer'],
            [['operationTypeID'], 'exist', 'skipOnError' => true, 'targetClass' => OperationType::className(), 'targetAttribute' => ['operationTypeID' => 'id']],
            [['productID'], 'exist', 'skipOnError' => true, 'targetClass' => Product::className(), 'targetAttribute' => ['productID' => 'id']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'productID' => Yii::t('app', 'productID'),
            'operationTypeID' => Yii::t('app', 'operationTypeID'),
            'sequenceNumber' => Yii::t('app', 'sequenceNumber'),
            'enable' => Yii::t('app', 'enable'),
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOperationType()
    {
        return $this->hasOne(OperationType::className(), ['id' => 'operationTypeID']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getProduct()
    {
        return $this->hasOne(Product::className(), ['id' => 'productID']);
    }
}


text:
function dateNr = datenum2(dateStr)
%DATENUM2  Return serial date number.
%		Note: This function is a workaround for a kind of bug in Matlab. In
%		certain versions, function DIR returns date strings not recognized by
%		function datenum.
%
%		DATENUM2(STR) returns the serial date number for the given date string
%		STR. Function DATENUM2 is a wrapper for DATENUM which replaces german
%		month abbreviations like "Okt" by the english versions like "Oct"
%		before forwarding the string to function DATENUM.
%
%		Function DATENUM2 first tries to build a date vector from the given
%		string for performance reasons. However, only date format 0
%		(dd-mmm-yyyy HH:MM:SS) is supported for this. If the given date string
%		is in a different format, the string is forwarded to function DATENUM.
%
%		Markus Buehren
%		Last modified 30.12.2008
%
%		See also DATENUM, TRANSLATEDATESTR.

% first try if Matlab recognizes the date string
try
	dateNr = datenum(dateStr);
	return
catch
	% do nothing
end

% now replace some strings and try again
try
	dateNr = datenum(translatedatestr(dateStr));
	return
catch
	% do nothing
end

% call of function datenum returned 2 errors, try to find the date number
dateNr = [];
tokenCell = regexp(dateStr, '(\d+)-(\w+)-(\d+) (\d+):(\d+):(\d+)', 'tokens');
if ~isempty(tokenCell)
	tokenCell = tokenCell{1};
end
if length(tokenCell) == 6
	% supported date format (at least it seems so)

	% get month
	month = [];
	switch lower(tokenCell{2})
		case 'jan'
			month = 1;
		case 'feb'
			month = 2;
		case {'mar', 'mär', 'mrz'}
			month = 3;
		case 'apr'
			month = 4;
		case {'may', 'mai'}
			month = 5;
		case 'jun'
			month = 6;
		case 'jul'
			month = 7;
		case 'aug'
			month = 8;
		case 'sep'
			month = 9;
		case {'oct', 'okt'}
			month = 10;
		case 'nov'
			month = 11;
		case {'dec', 'dez'}
			month = 12;
		otherwise
			% try to find the month for some chinese Matlab versions
			try
				monthCell = regexp(tokenCell{2},'(\d+)','tokens');
				if ~isempty(monthCell)
					month = str2double(monthCell{1}{1});
				end
			catch
				% do nothing
			end
	end

	if ~isempty(month) && month >= 1 && month <= 12
		dateVec = [...
			str2double(tokenCell{3}), ... % year
			month, ...                    % month
			str2double(tokenCell{1}), ... % day
			str2double(tokenCell{4}), ... % hours
			str2double(tokenCell{5}), ... % minutes
			str2double(tokenCell{6}), ... % seconds
			];
		dateNr = datenum(dateVec);
	end

end

if isempty(dateNr)
	% unknown date format
	error('The string "%s" is not recognized as a date in Matlab.', dateStr);
end


text:
#ifndef __ActionFRAME_H__
#define __ActionFRAME_H__

#include "math/CCGeometry.h"
#include "2d/CCActionInterval.h"
#include "cocostudio/CocosStudioExport.h"

namespace cocostudio {

enum FrameType
{
    kKeyframeMove = 0,
    kKeyframeScale,
    kKeyframeRotate,
    kKeyframeTint,
    kKeyframeFade,
    kKeyframeMax
};

enum class FrameEaseType
{
    Custom = -1,

    LINERAR = 0,

    SINE_EASEIN,
    SINE_EASEOUT,
    SINE_EASEINOUT,

    QUAD_EASEIN,
    QUAD_EASEOUT,
    QUAD_EASEINOUT,

    CUBIC_EASEIN,
    CUBIC_EASEOUT,
    CUBIC_EASEINOUT,

    QUART_EASEIN,
    QUART_EASEOUT,
    QUART_EASEINOUT,

    QUINT_EASEIN,
    QUINT_EASEOUT,
    QUINT_EASEINOUT,

    EXPO_EASEIN,
    EXPO_EASEOUT,
    EXPO_EASEINOUT,

    CIRC_EASEIN,
    CIRC_EASEOUT,
    CIRC_EASEINOUT,

    ELASTIC_EASEIN,
    ELASTIC_EASEOUT,
    ELASTIC_EASEINOUT,

    BACK_EASEIN,
    BACK_EASEOUT,
    BACK_EASEINOUT,

    BOUNCE_EASEIN,
    BOUNCE_EASEOUT,
    BOUNCE_EASEINOUT,

    TWEEN_EASING_MAX = 10000
};
/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionFrame: public cocos2d::Ref
{

public:

    /**
    * Default constructor
    */
    ActionFrame();

    /**
    * Default destructor
    */
    virtual ~ActionFrame();

    /**
    * Changes the index of action frame
    *
    * @param index   the index of action frame
    */
    void setFrameIndex(int index);

    /**
    * Gets the index of action frame
    *
    * @return the index of action frame
    */
    int getFrameIndex();

    /**
    * Changes the time of action frame
    *
    * @param fTime  the time of action frame
    */
    void setFrameTime(float fTime);

    /**
    * Gets the time of action frame
    *
    * @return fTime  the time of action frame
    */
    float getFrameTime();

    /**
    * Changes the type of action frame
    *
    * @param frameType   the type of action frame
    */
    void setFrameType(int frameType);

    /**
    * Gets the type of action frame
    *
    * @return the type of action frame
    */
    int getFrameType();

    /**
    * Changes the easing type.
    *
    * @param easingType the easing type.
    */
    void setEasingType(int easingType);

    /**
    * Gets the easing type.
    *
    * @return the easing type.
    */
    int getEasingType();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @parame duration   the source ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);

    /**
    *Set the ActionInterval easing parameter.
    *
    *@parame parameter   the parameter for frame ease
    *
    */
    virtual void setEasingParameter(std::vector<float>& parameter);
protected:
    /**
    * Gets the Easing Action of ActionFrame.
    *
    * @parame action   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getEasingAction(cocos2d::ActionInterval* action);
protected:
    int _frameType;
    int _frameIndex;
    float _fTime;
    FrameEaseType _easingType;
    std::vector<float> _Parameter;
};

/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionMoveFrame:public ActionFrame
{
public:

    /**
    * Default constructor
    */
    ActionMoveFrame();

    /**
    * Default destructor
    */
    virtual ~ActionMoveFrame();

    /**
    * Changes the move action position.
    *
    * @param the move action position.
    */
    void setPosition(cocos2d::Vec2 pos);

    /**
    * Gets the move action position.
    *
    * @return the move action position.
    */
    cocos2d::Vec2 getPosition();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
protected:
    cocos2d::Vec2 _position;
};

/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionScaleFrame:public ActionFrame
{
public:

    /**
    * Default constructor
    */
    ActionScaleFrame();

    /**
    * Default destructor
    */
    virtual ~ActionScaleFrame();

    /**
    * Changes the scale action scaleX.
    *
    * @param the scale action scaleX.
    */
    void setScaleX(float scaleX);

    /**
    * Gets the scale action scaleX.
    *
    * @return the scale action scaleX.
    */
    float getScaleX();

    /**
    * Changes the scale action scaleY.
    *
    * @param rotation the scale action scaleY.
    */
    void setScaleY(float scaleY);

    /**
    * Gets the scale action scaleY.
    *
    * @return the scale action scaleY.
    */
    float getScaleY();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
protected:
    float _scaleX;
    float _scaleY;
};
/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionRotationFrame:public ActionFrame
{
public:

    /**
    * Default constructor
    */
    ActionRotationFrame();

    /**
    * Default destructor
    */
    virtual ~ActionRotationFrame();

    /**
    * Changes rotate action rotation.
    *
    * @param rotation rotate action rotation.
    */
    void setRotation(float rotation);

    /**
    * Gets the rotate action rotation.
    *
    * @return the rotate action rotation.
    */
    float getRotation();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @parame duration   the source ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration,ActionFrame* srcFrame);
public:
    float _rotation;
};
/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionFadeFrame:public ActionFrame
{
public:

    /**
    * Default constructor
    */
    ActionFadeFrame();

    /**
    * Default destructor
    */
    virtual ~ActionFadeFrame();

    /**
    * Changes the fade action opacity.
    *
    * @param opacity the fade action opacity
    */
    void setOpacity(int opacity);

    /**
    * Gets the fade action opacity.
    *
    * @return the fade action opacity.
    */
    int getOpacity();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
protected:
    float _opacity;
};
/**
*  @js NA
*  @lua NA
*/
class CC_STUDIO_DLL ActionTintFrame:public ActionFrame
{

public:

    /**
    * Default constructor
    */
    ActionTintFrame();

    /**
    * Default destructor
    */
    virtual ~ActionTintFrame();

    /**
    * Changes the tint action color.
    *
    * @param ccolor the tint action color
    */
    void setColor(cocos2d::Color3B ccolor);

    /**
    * Gets the tint action color.
    *
    * @return the tint action color.
    */
    cocos2d::Color3B getColor();

    /**
    * Gets the ActionInterval of ActionFrame.
    *
    * @parame duration   the duration time of ActionFrame
    *
    * @return ActionInterval
    */
    virtual cocos2d::ActionInterval* getAction(float duration);
protected:
    cocos2d::Color3B _color;
};

}

#endif


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Ann. R. bot. Gdns Peradeniya 7: 299 (1922)

#### Original name
Physalospora cyperi Petch

### Remarks
null


text:
package com.example.admin.schoolhelper;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import java.util.ArrayList;

public class Science extends ActionBarActivity {
    private Button addTeacher,addContact,viewTeacher,viewContact;
    private EditText editTeacherName,editContactName,editContactPhone;
    public static ArrayList<Teacher> teacherObjectList = new ArrayList<Teacher>();
    public static ArrayList<String> contacts = new ArrayList<String>();
    public static ArrayList<Contact> contactsObjectList = new ArrayList<Contact>();
    public static ArrayList<String>  contactPhoneNumbers = new ArrayList<String>();
    public static ArrayList<String>  teachers = new ArrayList<String>();

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

        addTeacher = (Button) findViewById(R.id.addTeacherScienceButton);
        addContact = (Button) findViewById(R.id.addScienceContactButton);
        viewContact = (Button) findViewById(R.id.scienceContactsButton);
        viewTeacher = (Button) findViewById(R.id.scienceTeachersButton);
        editTeacherName = (EditText) findViewById(R.id.inputScienceTeacherName);
        editContactName = (EditText) findViewById(R.id.inputScienceContactName);
        editContactPhone = (EditText) findViewById(R.id.inputSciencePhoneNumber);
    }

    public static void addTeacher(String teacherName)
    {
        Science.teachers.add(new String(teacherName));
        Log.w("ADDED TEACHER STRING", "YEP");
    }
    public static void addContact(String contact)
    {
        Science.contacts.add(contact);
    }

    public void onClickViewTeachers(View view)
    {
        Intent i = new Intent(this, ScienceTeachers.class);
        startActivity(i);
    }

    public void onCLickViewContacts(View view)
    {
        Intent i = new Intent(this, ScienceContacts.class);
        startActivity(i);
    }

    public void onClickAddContact(View view)
    {
        Science.addContact(editContactName.getText().toString());
        Science.contactPhoneNumbers.add(editContactPhone.getText().toString());
        Log.w("ADDED","PHONENUMBER");
        Science.contactsObjectList.add(new Contact(editContactName.getText().toString(), editContactPhone.getText().toString()));
        Log.w("ADDED CONTACT", "yep");
    }

    public void onClickAddTeacher(View view)
    {
        Science.addTeacher(editTeacherName.getText().toString());
        Science.teacherObjectList.add(new Teacher(editTeacherName.getText().toString()));
        Log.w("ADDED TEACER", "yep");
    }
}


text:
#ifndef soapImagingBindingService_H
#define soapImagingBindingService_H
#include "soapH.h"
class SOAP_CMAC ImagingBindingService
{ public:
	struct soap *soap;
	bool own;
	/// Constructor
	ImagingBindingService();
	/// Constructor to use/share an engine state
	ImagingBindingService(struct soap*);
	/// Constructor with engine input+output mode control
	ImagingBindingService(soap_mode iomode);
	/// Constructor with engine input and output mode control
	ImagingBindingService(soap_mode imode, soap_mode omode);
	/// Destructor, also frees all deserialized data
	virtual ~ImagingBindingService();
	/// Delete all deserialized data (with soap_destroy and soap_end)
	virtual	void destroy();
	/// Delete all deserialized data and reset to defaults
	virtual	void reset();
	/// Initializer used by constructor
	virtual	void ImagingBindingService_init(soap_mode imode, soap_mode omode);
	/// Create a copy
	virtual	ImagingBindingService *copy() SOAP_PURE_VIRTUAL;
	/// Close connection (normally automatic)
	virtual	int soap_close_socket();
	/// Force close connection (can kill a thread blocked on IO)
	virtual	int soap_force_close_socket();
	/// Return sender-related fault to sender
	virtual	int soap_senderfault(const char *string, const char *detailXML);
	/// Return sender-related fault with SOAP 1.2 subcode to sender
	virtual	int soap_senderfault(const char *subcodeQName, const char *string, const char *detailXML);
	/// Return receiver-related fault to sender
	virtual	int soap_receiverfault(const char *string, const char *detailXML);
	/// Return receiver-related fault with SOAP 1.2 subcode to sender
	virtual	int soap_receiverfault(const char *subcodeQName, const char *string, const char *detailXML);
	/// Print fault
	virtual	void soap_print_fault(FILE*);
#ifndef WITH_LEAN
	/// Print fault to stream
#ifndef WITH_COMPAT
	virtual	void soap_stream_fault(std::ostream&);
#endif
	/// Put fault into buffer
	virtual	char *soap_sprint_fault(char *buf, size_t len);
#endif
	/// Disables and removes SOAP Header from message
	virtual	void soap_noheader();
	/// Put SOAP Header in message
	virtual	void soap_header(char *wsa__MessageID, struct wsa__Relationship *wsa__RelatesTo, struct wsa__EndpointReferenceType *wsa__From, struct wsa__EndpointReferenceType *wsa__ReplyTo, struct wsa__EndpointReferenceType *wsa__FaultTo, char *wsa__To, char *wsa__Action, struct wsdd__AppSequenceType *wsdd__AppSequence, char *wsa5__MessageID, struct wsa5__RelatesToType *wsa5__RelatesTo, struct wsa5__EndpointReferenceType *wsa5__From, struct wsa5__EndpointReferenceType *wsa5__ReplyTo, struct wsa5__EndpointReferenceType *wsa5__FaultTo, char *wsa5__To, char *wsa5__Action, struct chan__ChannelInstanceType *chan__ChannelInstance, struct wsrm__SequenceType *wsrm__Sequence, int __sizeAckRequested, struct wsrm__AckRequestedType *wsrm__AckRequested, int __sizeSequenceAcknowledgement, struct _wsrm__SequenceAcknowledgement *wsrm__SequenceAcknowledgement, struct wsrm__SequenceFaultType *wsrm__SequenceFault, struct _wsse__Security *wsse__Security);
	/// Get SOAP Header structure (NULL when absent)
	virtual	const SOAP_ENV__Header *soap_header();
	/// Run simple single-thread iterative service on port until a connection error occurs (returns error code or SOAP_OK), use this->bind_flag = SO_REUSEADDR to rebind for a rerun
	virtual	int run(int port);
	/// Bind service to port (returns master socket or SOAP_INVALID_SOCKET)
	virtual	SOAP_SOCKET bind(const char *host, int port, int backlog);
	/// Accept next request (returns socket or SOAP_INVALID_SOCKET)
	virtual	SOAP_SOCKET accept();
#if defined(WITH_OPENSSL) || defined(WITH_GNUTLS)
	/// Then accept SSL handshake, when SSL is used
	virtual	int ssl_accept();
#endif
	/// Serve this request (returns error code or SOAP_OK)
	virtual	int serve();
	/// Used by serve() to dispatch a request (returns error code or SOAP_OK)
	virtual	int dispatch();

	///
	/// Service operations (you should define these):
	/// Note: compile with -DWITH_PURE_VIRTUAL for pure virtual methods
	///

	/// Web service operation 'GetServiceCapabilities' (returns error code or SOAP_OK)
	virtual	int GetServiceCapabilities(_timg__GetServiceCapabilities *timg__GetServiceCapabilities, _timg__GetServiceCapabilitiesResponse *timg__GetServiceCapabilitiesResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'GetImagingSettings' (returns error code or SOAP_OK)
	virtual	int GetImagingSettings(_timg__GetImagingSettings *timg__GetImagingSettings, _timg__GetImagingSettingsResponse *timg__GetImagingSettingsResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'SetImagingSettings' (returns error code or SOAP_OK)
	virtual	int SetImagingSettings(_timg__SetImagingSettings *timg__SetImagingSettings, _timg__SetImagingSettingsResponse *timg__SetImagingSettingsResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'GetOptions' (returns error code or SOAP_OK)
	virtual	int GetOptions(_timg__GetOptions *timg__GetOptions, _timg__GetOptionsResponse *timg__GetOptionsResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'Move' (returns error code or SOAP_OK)
	virtual	int Move(_timg__Move *timg__Move, _timg__MoveResponse *timg__MoveResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'Stop' (returns error code or SOAP_OK)
	virtual	int Stop(_timg__Stop *timg__Stop, _timg__StopResponse *timg__StopResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'GetStatus' (returns error code or SOAP_OK)
	virtual	int GetStatus(_timg__GetStatus *timg__GetStatus, _timg__GetStatusResponse *timg__GetStatusResponse) SOAP_PURE_VIRTUAL;

	/// Web service operation 'GetMoveOptions' (returns error code or SOAP_OK)
	virtual	int GetMoveOptions(_timg__GetMoveOptions *timg__GetMoveOptions, _timg__GetMoveOptionsResponse *timg__GetMoveOptionsResponse) SOAP_PURE_VIRTUAL;
};
#endif


text:
A browser-based debug console for the [LÖVE](http://love2d.org) framework.

![screenshot from 2014-06-28 14 52 34](https://cloud.githubusercontent.com/assets/3920290/3420901/c15975ce-fecb-11e3-9517-970c919815b4.png)

## Usage
Drop the [lovebird.lua](lovebird.lua?raw=1) file into an existing project and
place the following line at the top of your `love.update()` function:
```lua
require("lovebird").update()
```
The console can then be accessed by opening the following URL in a web browser:
```
http://localhost:8000
```
If you want to access lovebird from another computer on the same network then
`localhost` should be replaced with the IP address of the computer which LÖVE
is running on.

## Additional Functionality
To make use of additional functionality, the module can be assigned to a
variable when it is required:
```lua
lovebird = require "lovebird"
```
Any configuration variables should be set before `lovebird.update()` is called.

### lovebird.port
The port which lovebird listens for connections on. By default this is `8000`

### lovebird.whitelist
A table of hosts which lovebird will accept connections from. Any connection
made from a host which is not on the whitelist is logged and closed
immediately. If `lovebird.whitelist` is set to nil then all connections are
accepted. The default is `{ "127.0.0.1", "192.168.*.*" }`.

### lovebird.wrapprint
Whether lovebird should wrap the `print()` function or not. If this is true
then all the calls to print will also be output to lovebird's console. This is
`true` by default.

### lovebird.echoinput
Whether lovebird should display inputted commands in the console's output
buffer; `true` by default.

### lovebird.maxlines
The maximum number of lines lovebird should store in its console's output
buffer. By default this is `200`.

### lovebird.updateinterval
The interval in seconds that the page's information is updated; this is `0.5`
by default.

### lovebird.allowhtml
Whether prints should allow HTML. If this is true then any HTML which is
printed will be rendered as HTML; if it false then all HTML is rendered as
text. This is `false` by default.

### lovebird.print(...)
Prints its arguments to lovebird's console. If `lovebird.wrapprint` is set to
true this function is automatically called when print() is called.

### lovebird.clear()
Clears the contents of the console, returning it to an empty state.


text:
<?php

namespace effectspro;

use pocketmine\event\Listener;

class EffectsProListener implements Listener{

}


text:
package org.gradle.buildinit.plugins.internal;

import org.gradle.util.TextUtil;

public class TemplateValue {
    private final String value;

    public TemplateValue(String value) {
        this.value = value;
    }

    public String getGroovyComment() {
        return value.replace("\\", "\\\\");
    }

    public String getGroovyString() {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i < value.length(); i++) {
            char ch = value.charAt(i);
            switch (ch) {
                case '\\':
                    result.append('\\').append('\\');
                    break;
                case '\'':
                    result.append('\\').append('\'');
                    break;
                case '\n':
                    result.append('\\').append('n');
                    break;
                case '\r':
                    result.append('\\').append('r');
                    break;
                case '\t':
                    result.append('\\').append('t');
                    break;
                case '\f':
                    result.append('\\').append('f');
                    break;
                case '\b':
                    result.append('\\').append('b');
                    break;
                default:
                    result.append(ch);
            }
        }
        return result.toString();
    }

    public String getStatement() {
        if (value.isEmpty()) {
            return "";
        } else {
            return value + TextUtil.getPlatformLineSeparator();
        }
    }

    public String getJavaStatement() {
        if (value.isEmpty()) {
            return "";
        } else {
            return value + ";" + TextUtil.getPlatformLineSeparator();
        }
    }

    @Override
    public String toString() {
        return ">>>" + value + "<<<";
    }
}


text:
/**
 * @file
 * Audio FIFO
 */

#include "avutil.h"
#include "audio_fifo.h"
#include "common.h"
#include "fifo.h"
#include "mem.h"
#include "samplefmt.h"

struct AVAudioFifo {
    AVFifoBuffer **buf;             /**< single buffer for interleaved, per-channel buffers for planar */
    int nb_buffers;                 /**< number of buffers */
    int nb_samples;                 /**< number of samples currently in the FIFO */
    int allocated_samples;          /**< current allocated size, in samples */

    int channels;                   /**< number of channels */
    enum AVSampleFormat sample_fmt; /**< sample format */
    int sample_size;                /**< size, in bytes, of one sample in a buffer */
};

void av_audio_fifo_free(AVAudioFifo *af)
{
    if (af) {
        if (af->buf) {
            int i;
            for (i = 0; i < af->nb_buffers; i++) {
                if (af->buf[i])
                    av_fifo_free(af->buf[i]);
            }
            av_freep(&af->buf);
        }
        av_free(af);
    }
}

AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
                                 int nb_samples)
{
    AVAudioFifo *af;
    int buf_size, i;

    /* get channel buffer size (also validates parameters) */
    if (av_samples_get_buffer_size(&buf_size, channels, nb_samples, sample_fmt, 1) < 0)
        return NULL;

    af = av_mallocz(sizeof(*af));
    if (!af)
        return NULL;

    af->channels    = channels;
    af->sample_fmt  = sample_fmt;
    af->sample_size = buf_size / nb_samples;
    af->nb_buffers  = av_sample_fmt_is_planar(sample_fmt) ? channels : 1;

    af->buf = av_mallocz_array(af->nb_buffers, sizeof(*af->buf));
    if (!af->buf)
        goto error;

    for (i = 0; i < af->nb_buffers; i++) {
        af->buf[i] = av_fifo_alloc(buf_size);
        if (!af->buf[i])
            goto error;
    }
    af->allocated_samples = nb_samples;

    return af;

error:
    av_audio_fifo_free(af);
    return NULL;
}

int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples)
{
    int i, ret, buf_size;

    if ((ret = av_samples_get_buffer_size(&buf_size, af->channels, nb_samples,
                                          af->sample_fmt, 1)) < 0)
        return ret;

    for (i = 0; i < af->nb_buffers; i++) {
        if ((ret = av_fifo_realloc2(af->buf[i], buf_size)) < 0)
            return ret;
    }
    af->allocated_samples = nb_samples;
    return 0;
}

int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
{
    int i, ret, size;

    /* automatically reallocate buffers if needed */
    if (av_audio_fifo_space(af) < nb_samples) {
        int current_size = av_audio_fifo_size(af);
        /* check for integer overflow in new size calculation */
        if (INT_MAX / 2 - current_size < nb_samples)
            return AVERROR(EINVAL);
        /* reallocate buffers */
        if ((ret = av_audio_fifo_realloc(af, 2 * (current_size + nb_samples))) < 0)
            return ret;
    }

    size = nb_samples * af->sample_size;
    for (i = 0; i < af->nb_buffers; i++) {
        ret = av_fifo_generic_write(af->buf[i], data[i], size, NULL);
        if (ret != size)
            return AVERROR_BUG;
    }
    af->nb_samples += nb_samples;

    return nb_samples;
}

int av_audio_fifo_peek(AVAudioFifo *af, void **data, int nb_samples)
{
    int i, ret, size;

    if (nb_samples < 0)
        return AVERROR(EINVAL);
    nb_samples = FFMIN(nb_samples, af->nb_samples);
    if (!nb_samples)
        return 0;

    size = nb_samples * af->sample_size;
    for (i = 0; i < af->nb_buffers; i++) {
        if ((ret = av_fifo_generic_peek(af->buf[i], data[i], size, NULL)) < 0)
            return AVERROR_BUG;
    }

    return nb_samples;
}

int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
{
    int i, ret, size;

    if (nb_samples < 0)
        return AVERROR(EINVAL);
    nb_samples = FFMIN(nb_samples, af->nb_samples);
    if (!nb_samples)
        return 0;

    size = nb_samples * af->sample_size;
    for (i = 0; i < af->nb_buffers; i++) {
        if ((ret = av_fifo_generic_read(af->buf[i], data[i], size, NULL)) < 0)
            return AVERROR_BUG;
    }
    af->nb_samples -= nb_samples;

    return nb_samples;
}

int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples)
{
    int i, size;

    if (nb_samples < 0)
        return AVERROR(EINVAL);
    nb_samples = FFMIN(nb_samples, af->nb_samples);

    if (nb_samples) {
        size = nb_samples * af->sample_size;
        for (i = 0; i < af->nb_buffers; i++)
            av_fifo_drain(af->buf[i], size);
        af->nb_samples -= nb_samples;
    }
    return 0;
}

void av_audio_fifo_reset(AVAudioFifo *af)
{
    int i;

    for (i = 0; i < af->nb_buffers; i++)
        av_fifo_reset(af->buf[i]);

    af->nb_samples = 0;
}

int av_audio_fifo_size(AVAudioFifo *af)
{
    return af->nb_samples;
}

int av_audio_fifo_space(AVAudioFifo *af)
{
    return af->allocated_samples - af->nb_samples;
}


text:
package cli

// AppHelpTemplate is the text template for the Default help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var AppHelpTemplate = `NAME:
   {{.Name}}{{if .Usage}} - {{.Usage}}{{end}}

USAGE:
   {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}

VERSION:
   {{.Version}}{{end}}{{end}}{{if .Description}}

DESCRIPTION:
   {{.Description}}{{end}}{{if len .Authors}}

AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
   {{range $index, $author := .Authors}}{{if $index}}
   {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}

COMMANDS:{{range .VisibleCategories}}{{if .Name}}
   {{.Name}}:{{range .VisibleCommands}}
     {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
   {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}

GLOBAL OPTIONS:
   {{range $index, $option := .VisibleFlags}}{{if $index}}
   {{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}

COPYRIGHT:
   {{.Copyright}}{{end}}
`

// CommandHelpTemplate is the text template for the command help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var CommandHelpTemplate = `NAME:
   {{.HelpName}} - {{.Usage}}

USAGE:
   {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}

CATEGORY:
   {{.Category}}{{end}}{{if .Description}}

DESCRIPTION:
   {{.Description}}{{end}}{{if .VisibleFlags}}

OPTIONS:
   {{range .VisibleFlags}}{{.}}
   {{end}}{{end}}
`

// SubcommandHelpTemplate is the text template for the subcommand help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var SubcommandHelpTemplate = `NAME:
   {{.HelpName}} - {{.Usage}}

USAGE:
   {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}

DESCRIPTION:
   {{.Description}}{{end}}

COMMANDS:{{range .VisibleCategories}}{{if .Name}}
   {{.Name}}:{{range .VisibleCommands}}
     {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
   {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}

OPTIONS:
   {{range .VisibleFlags}}{{.}}
   {{end}}{{end}}
`

var MarkdownDocTemplate = `% {{ .App.Name }} 8

# NAME

{{ .App.Name }}{{ if .App.Usage }} - {{ .App.Usage }}{{ end }}

# SYNOPSIS

{{ .App.Name }}
{{ if .SynopsisArgs }}
` + "```" + `
{{ range $v := .SynopsisArgs }}{{ $v }}{{ end }}` + "```" + `
{{ end }}{{ if .App.UsageText }}
# DESCRIPTION

{{ .App.UsageText }}
{{ end }}
**Usage**:

` + "```" + `
{{ .App.Name }} [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]
` + "```" + `
{{ if .GlobalArgs }}
# GLOBAL OPTIONS
{{ range $v := .GlobalArgs }}
{{ $v }}{{ end }}
{{ end }}{{ if .Commands }}
# COMMANDS
{{ range $v := .Commands }}
{{ $v }}{{ end }}{{ end }}`

var FishCompletionTemplate = `# {{ .App.Name }} fish shell completion

function __fish_{{ .App.Name }}_no_subcommand --description 'Test if there has been any subcommand yet'
    for i in (commandline -opc)
        if contains -- $i{{ range $v := .AllCommands }} {{ $v }}{{ end }}
            return 1
        end
    end
    return 0
end

{{ range $v := .Completions }}{{ $v }}
{{ end }}`


text:
var PIXI = require("pixi.js");
var smoothstep = require("smoothstep");
var BezierEasing = require("bezier-easing");
var tilePIXI = require("./tilePIXI");
var loadTexture = require("./loadTexture");

var attackEasing = BezierEasing(0.0, 1.33, 0, 1);
var lifeIndicatorIncreaseEasing = BezierEasing(1, 0, 1, 1);
var lifeIndicatorDecreaseEasing = BezierEasing(0, 1, 1, 1);

function step (min, max, value) {
  var x = Math.max(0, Math.min(1, (value-min)/(max-min)));
  return x;
}

function mix (a, b, p) {
  return a + (b-a) * p;
}

var tilePIXI32 = tilePIXI(32);

var heroesTexture = loadTexture("heroes.png");

var blastTexture = loadTexture("blast.png");

var orientations = [3, 2, 0, 1]; // N E S W

var heroTextures = [3, 2, 1, 0].map(function (p) {
  return orientations.map(function (o) {
    return tilePIXI32(heroesTexture, o, p);
  });
});
var heroCrownTextures = [3, 2, 1, 0].map(function (p) {
  return orientations.map(function (o) {
    return tilePIXI32(heroesTexture, o+5, p);
  });
});

var blinkTextures = orientations.map(function (o) {
  return tilePIXI32(heroesTexture, o, 4);
});

/*
function manhattan (a, b) {
  return Math.abs(a.x - b.x) + Math.abs(a.y - b.y);
}
*/

function interpolatePosition (a, b, p) {
  return {
    x: mix(a.x, b.x, p),
    y: mix(a.y, b.y, p)
  };
}

function rgb (r, g, b) {
  /*jshint bitwise: false */
  return ~~(r) << 16 | ~~(g) << 8 | ~~(b);
}

function createHeroSprite (texture) {
  var heroSprite = new PIXI.Sprite(texture);
  heroSprite.position.x = -4;
  heroSprite.position.y = -8;
  return heroSprite;
}

function Hero (id, obj, tileSize, effectsContainer, triggerBloodParticle) {
  this.id = id;
  this.tileSize = tileSize;
  PIXI.DisplayObjectContainer.call(this);
  this.lifeIndicator = new PIXI.Graphics();
  this.lifeIndicator.position.x = -5;
  this.lifeIndicator.position.y = 0;
  this.addChild(this.lifeIndicator);

  this.heroTextures = heroTextures;
  this.heroSprite = createHeroSprite(this.heroTextures[id - 1][0]);
  this.blinkSprite = createHeroSprite(blinkTextures[0]);
  this.blinkSprite.alpha = 0;

  this.blastSprite = new PIXI.Sprite(blastTexture);
  this.blastSprite.alpha = 0;
  this.blastSprite.position.x = 12;
  this.blastSprite.position.y = 10;
  this.blastSprite.pivot.x = 25;
  this.blastSprite.pivot.y = 25;

  this.effectsGroup = new PIXI.DisplayObjectContainer();
  this.effectsGroup.position = this.position;
  this.effectsGroup.addChild(this.blastSprite);
  effectsContainer.addChild(this.effectsGroup);

  this.addChild(this.heroSprite);
  this.addChild(this.blinkSprite);

  this.triggerBloodParticle = triggerBloodParticle;

  this.interpolationEndTime = 0;

  this._offsetRotation = 0.0;
  this.updateHero(obj, 0, false);
}

Hero.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
Hero.prototype.constructor = Hero;

Hero.prototype.refreshHeroSprite = function (orientation) {
  if (this._currentOrientation === orientation && this._currentHeroTextures === this.heroTextures) return;
  this._currentHeroTextures = this.heroesTexture;
  this._currentOrientation = orientation;
  this.heroSprite.setTexture(this.heroTextures[this.id - 1][orientation]);
  this.blinkSprite.setTexture(blinkTextures[orientation]);
};

Hero.prototype.drawLifeIndicator = function (life) {
  var lpx = Math.round(this.tileSize * life / 100);
  var color = rgb(255 * smoothstep(60, 30, life), 255 * smoothstep(0, 90, life), 50);
  this.lifeIndicator.clear();
  var graphics = this.lifeIndicator;
  graphics.beginFill(color);
  graphics.drawRect(0, this.tileSize - lpx, 3, lpx);
};

Hero.prototype.setPosition = function (pos) {
  this.position.x = pos.x * this.tileSize;
  this.position.y = pos.y * this.tileSize;
};

Hero.prototype.updateHero = function (meta, interpolationTime, consecutiveTurn) {
  this.meta = meta;
  this.heroTextures = meta.winning ? heroCrownTextures : heroTextures;
  this.updatedTime = Date.now();
  this.consecutiveTurn = consecutiveTurn;
  this.interpolationTime = interpolationTime;

  this.blastSprite.alpha = 0;
  this._offsetRotation = (Math.random()-0.5) * Math.PI / 4;

  if (meta.attack && consecutiveTurn) {
    meta.attack.forEach(function (p) {
      this.triggerBloodParticle(this.id, p, meta.kill, interpolationTime);
    }, this);
  }
};

Hero.prototype.render = function () {
  var meta = this.meta;
  var t = Date.now() - this.updatedTime;

  // Some animations only make sense for consecutiveTurn
  if (meta.from && this.consecutiveTurn && this.interpolationTime) {
    var p = step(0, this.interpolationTime, t);
    var lifeIndicatorEasing = meta.from.life < meta.to.life ? lifeIndicatorIncreaseEasing : lifeIndicatorDecreaseEasing;
    this.drawLifeIndicator(mix(meta.from.life, meta.to.life, lifeIndicatorEasing(p)));
    var moveProgress = meta.attack ? attackEasing(p) : p;
    this.setPosition(meta.killed || meta.move ? interpolatePosition(meta.from.pos, meta.to.pos, moveProgress) : meta.to.pos);

    var orientationDividers = this.updatedTime / meta.orientation.length;
    var orientationIndex = Math.min(meta.orientation.length-1, Math.floor(p * meta.orientation.length));
    var tRelativeToOrientation = t - orientationIndex * orientationDividers;
    var or = meta.orientation[orientationIndex];

    this.refreshHeroSprite(or);
    if (meta.attackOrientations.indexOf(or)!==-1) {
      this.blastSprite.rotation = this._offsetRotation + (or-1) * Math.PI / 2;
      this.blastSprite.alpha = ((meta.attack || meta.takeMine) && tRelativeToOrientation < 50) ? 1 : 0;
    }
    else {
      this.blastSprite.alpha = 0;
      /*
      this.blastSprite.alpha = 1;
      this.blastSprite.rotation = 10 * Math.random();
      */
    }
  }
  else {
    this.drawLifeIndicator(meta.to.life);
    this.setPosition(meta.to.pos);
    this.refreshHeroSprite(meta.orientation[meta.orientation.length - 1]);
  }

  // Some animations can be done absolutely
  this.blinkSprite.alpha = (meta.killed || (meta.takeMine || meta.attacked) && t < 80) ? 1 : 0;

};

Hero.prototype.getTexture = function () {
  return this.heroTextures[this.id - 1][2];
};

Hero.prototype.logMeta = function (meta) {
  var logs = "Hero"+this.id+": ";
  var ignored = ["from", "to"];
  for (var k in meta) {
    if (ignored.indexOf(k) === -1) {
      if (meta[k] !== null) {
        var value = meta[k];
        var typ = typeof meta[k];
        var isArray = meta[k] instanceof Array;
        if (typ === "object" && !isArray)
          value = JSON.stringify(value);
        if (typ === "boolean")
          logs += (value ? k+" " : "");
        else if (!isArray || value.length)
          logs += k+"="+value+" ";
      }
    }
  }
  return logs;
};

Hero.blinkTextures = blinkTextures;

module.exports = Hero;


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
  Class Home extends CI_Controller{
    public function index(){
      $this->load->helper('url');
      $this->load->database();

      $this->load->model('Model_manufaktur');
      $data['query'] = $this->Model_manufaktur->get_peru_home();

      $this->load->model('Model_bahan_baku');
      $data['kueri'] = $this->Model_bahan_baku->select_data_kat_home();
      $this->load->view('header');
      $this->load->view('rumah', $data);
      $this->load->view('footer');
    }

    public function bahan_baku(){
      $this->load->helper('url');
      $this->load->view('header');
      $this->load->view('rumah-manufaktur-user');
      $this->load->view('footer');
    }

    public function manufaktur(){
      $this->load->helper('url');
      $this->load->view('header');
      $this->load->view('rumah-bahan-baku-user');
      $this->load->view('footer');
    }
  }
?>


text:
mkdir /home/myUser/my-remote-dir/
# Mount as user myUser with group myUser into dir /home/myUser/my-remote-dir/
sudo mount -t davfs https://cloud.example.org/remote.php/webdav/my-dir/ /home/myUser/my-remote-dir/ -o uid=myUser -o gid=myUser
sudo mount -t davfs "https://cloud.rockdapus.org/remote.php/webdav/Berliner Volkszeitung 1890-1930/" /home/select/Dev/berliner-schlagzeilen/data/remote-data/ -o uid=select -o gid=select
# To unmount the directrory run.
sudo umount /home/myUser/my-remote-dir/
# if the mount is hanging and does not unmount
lsof | grep 'my-remote-dir'
# this will output the process that blocks the umount