- Tomcat
add Environment variable CATALINA_HOME
port: <tomcat>/conf/server.xml
user: <tomcat>/conf/tomcat-users.xml
<user username=”arvifox” password=”arvifox” roles=”manager-gui,manager-script,manager-status,manager-jmx”/> - GlassFish
port: GlassFish\glassfish\domains\domain1\config\domain.xml
user: go to admin to change the password
Category: IT
Connected component (graph theory)
Connected component (graph theory)
InputFilter
{ final InputFilter filter = new InputFilter() { @Override public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i < end; i++) { if (Character.isDigit(source.charAt(i))||Character.isLetter(source.charAt(i))) { return ""; } } return null; } }; answerTXT.setFilters(new InputFilter[]{filter});
ContextWrapper ContextImpl getBaseContext
ActivityThread casts Application.getBaseContext() to ContextImpl
static ContextImpl getImpl(Context context) { Context nextContext; while ((context instanceof ContextWrapper) && (nextContext=((ContextWrapper)context).getBaseContext()) != null) { context = nextContext; } return (ContextImpl)context; }
Potential crash when !(context instanceof Activity)
public static Activity unwrap(Context context) { while (!(context instanceof Activity)) { ContextWrapper wrapper = (ContextWrapper) context; context = wrapper.getBaseContext(); } return context; }