Team Collaboration and Career Development

Career decision making cycle Know the elements Communication, Analysis, Synthesis, Valuing, Execution Know the definition Communication: Identifying the gap Analysis: Thinking about alternatives Synthesis: Creating likely alternatives Valuing: Prioritizing alternatives Execution: Taking action to narrow the gap Be able to elaborate the elements Communication: • Become aware of the gap • Discomfort, not so much fear of change • Seek assistance if needed • Emotions Analysis: • Clarify your knowledge • Clarify gap • Understand how you make decisions • Understand what influences you • What do you want? • What have you learned? • What are your values, interests and skills? • Do you want to take responsibility? • Self-awareness Synthesis: • Solve the gap • Avoid missing alternatives • Reduce to a manageable amount of options. • Brainstorm and reduce. Valuing: • Judge the benefit (and cost) • Rank • What´s the best choice? • Select an option Execution: • Convert decisions into action • Formulate a goal and a plan • Execute the plan • Plan, try, evaluate ...

January 19, 2019 · 21 min

Team Collaboration and Career Development for Exam

During the lectures we defined three different areas important for every individual: Values, Interests and Skills. These should be described regarding your internal focus in a resume. a. Describe, explain, these three areas, including at least two examples from each area. (15) Values are what is important for you, what you really care about, and which give you a sense of purpose. Example: High Income, Helping others. Interests are what is fun for you, what enjoys you, and those work activities which hold your attention and fire your enthusiasm. Example: Technical, Scientific. Skills are things you can do well, things you have learned, special talent and special abilities. Example: Technical skills, Leadership. b. What is a GAP? Give at least one example of a possible GAP relating to your own experiences, one example from each area. (6) A GAP is where you are and where you want to be. The GAP for me: I hope that I can enter a big company like Alibaba to work as a Java developer. The GAP for me is that my understanding of the Java virtual machine is not deep enough, I don’t have enough knowledge of multithreading, don’t know enough about the principle and implementation of the database, and don’t know much about the distributed architecture. 2. Name the 5 elements of the Career Development Cycle. Draw the model of the cycle. Describe shortly, 1-2 sentences, every action in the cycle. (12) Communication, Analysis, Synthesis, Valuing, Execution Communication: Become aware of the gap and feel discomfort about the gap. Seek assistance if needed. Analysis: Clarify your knowledge, what do you want, what are your values, interests and skills and so on. Synthesis: Solve the gap, avoid missing alternatives and reduce to a manageable amount of options. Valuing: Judge the benefit (and cost) and rank them to find the best choice. Select an option. Execution: Convert decisions into action, formulate a goal and a plan, and execute the plan. Communication: Review the state and think has the gap been closed. It is an on-going process. 3. Brown talks about four general role categories of people in teams. Name these roles and describe them shortly? (12) Designers: People responsible for generating and documenting ideas about how the product works, looks, or behaves. Managers: People responsible for ensuring the project team delivers on its obligations, creates plans to do so, and successfully executes against those plans. Subject Matter Experts: People responsible for contributing information to the design process. Stakeholders: People ultimately accountable for the success of the project. 4. Consider the following questions among individuals where we have different characteristics. Select three of them. Describe how people (individuals), can have different characteristics. Describe pros and cons, and possible consequences to a characteristic. Comments if the characteristics you choose are good characteristics or not. a. Can I interrupt you? b. Do you attend agreed meetings? c. Are you late to meetings? d. Are you focusing on details or the big-picture? e. Which tasks do you prefer to commit to? f. How quickly do you respond to e-mail? g. Do you treat others how you would like to be treated yourself? h. Can she/he say no? Can you say no? i. Does she/he usually say no/yes? (12) ...

January 19, 2019 · 4 min

The Design and Analysis of Algorithms for Exam

This question tests your knowledge on algorithms and algorithm construction: (a) A function that is defined in terms of itself is called a recursive function. Describe the purpose of a base case in a recursive function.(3p) A base case is an (input) value for which the function can be calculated without recursion. There needs to be at least one base case, which can be solved without recursion. For the cases that are solved using recursion, the recursive calls must progress towards a base case. ...

January 19, 2019 · 4 min

CentOS 7 Tomcat开机自启动配置

CentOS 7 Tomcat开机自启动配置 配置开机运行 Tomcat增加启动参数 Tomcat需要增加一个pid文件,在 $CATALINA_HOME/bin 目录下面,增加 setenv.sh 配置,catalina.sh启动的时候会调用,同时配置Java内存参数。添加如下命令: [root@vps bin]# vim setenv.sh #Tomcat startup pid #set Java runtime environment variable export JAVA_HOME=/usr/java/jdk1.8.0_191-amd64 export PATH=$PATH:$JAVA_HOME/bin export CATALINA_HOME=/developer/apache-tomcat-7.0.91 export CATALINA_BASE=/developer/apache-tomcat-7.0.91 #add Tomcat pid CATALINA_PID="$CATALINA_BASE/tomcat.pid" #add Java opts JAVA_OPTS="-server -XX:PermSize=256M -XX:MaxPermSize=1024m -Xms512M -Xmx1024M -XX:MaxNewSize=256m" 注意: 配置开机运行时,需要再次添加 JAVA_HOME 增加 tomcat.service 在/usr/lib/systemd/system目录下增加tomcat.service,目录必须是绝对目录,添加如下命令: [root@vps bin]# vim /usr/lib/systemd/system/tomcat.service # conf service desc ,set do this after network started [Unit] Description=tomcat After=syslog.target network.target remote-fs.target nss-lookup.target # conf service pid, start,stop and restart [Service] Type=forking PIDFile=/developer/apache-tomcat-7.0.91/tomcat.pid ExecStart=/developer/apache-tomcat-7.0.91/bin/startup.sh ExecStop=/bin/kill -s QUIT $MAINPID ExecReload=/bin/kill -s HUP $MAINPID PrivateTmp=true # conf user [Install] WantedBy=multi-user.target [unit]: 配置了服务的描述,规定了在network启动之后执行, ...

January 13, 2019 · 1 min

J2EE基础知识

Servlet总结 在Java Web程序中,Servlet主要负责接收用户请求HttpServletRequest,在doGet(),doPost()中做相应的处理,并将回应HttpServletResponse反馈给用户。Servlet可以设置初始化参数,供Servlet内部使用。一个Servlet类只会有一个实例,在它初始化时调用init()方法,销毁时调用destroy()方法。Servlet需要在web.xml中配置(MyEclipse中创建Servlet会自动配置),一个Servlet可以设置多个URL访问。Servlet不是线程安全,因此要谨慎使用类变量。 阐述Servlet和CGI的区别? CGI的不足之处: 1,需要为每个请求启动一个操作CGI程序的系统进程。如果请求频繁,这将会带来很大的开销。 2,需要为每个请求加载和运行一个CGI程序,这将带来很大的开销 3,需要重复编写处理网络协议的代码以及编码,这些工作都是非常耗时的。 Servlet的优点: 1,只需要启动一个操作系统进程以及加载一个JVM,大大降低了系统的开销 2,如果多个请求需要做同样处理的时候,这时候只需要加载一个类,这也大大降低了开销 3,所有动态加载的类可以实现对网络协议以及请求解码的共享,大大降低了工作量。 4,Servlet能直接和Web服务器交互,而普通的CGI程序不能。Servlet还能在各个程序之间共享数据,使数据库连接池之类的功能很容易实现。 补充:Sun Microsystems公司在1996年发布Servlet技术就是为了和CGI进行竞争,Servlet是一个特殊的Java程序,一个基于Java的Web应用通常包含一个或多个Servlet类。Servlet不能够自行创建并执行,它是在Servlet容器中运行的,容器将用户的请求传递给Servlet程序,并将Servlet的响应回传给用户。通常一个Servlet会关联一个或多个JSP页面。以前CGI经常因为性能开销上的问题被诟病,然而Fast CGI早就已经解决了CGI效率上的问题,所以面试的时候大可不必信口开河的诟病CGI,事实上有很多你熟悉的网站都使用了CGI技术。 参考:《javaweb整合开发王者归来》P7 Servlet接口中有哪些方法及Servlet生命周期探秘 Servlet接口定义了5个方法,其中前三个方法与Servlet生命周期相关: void init(ServletConfig config) throws ServletException void service(ServletRequest req, ServletResponse resp) throws ServletException, java.io.IOException void destory() java.lang.String getServletInfo() ServletConfig getServletConfig() 生命周期: Web容器加载Servlet并将其实例化后,Servlet生命周期开始,容器运行其init()方法进行Servlet的初始化;请求到达时调用Servlet的service()方法,service()方法会根据需要调用与请求对应的doGet或doPost等方法;当服务器关闭或项目被卸载时服务器会将Servlet实例销毁,此时会调用Servlet的destroy()方法。init方法和destory方法只会执行一次,service方法客户端每次请求Servlet都会执行。Servlet中有时会用到一些需要初始化与销毁的资源,因此可以把初始化资源的代码放入init方法中,销毁资源的代码放入destroy方法中,这样就不需要每次处理客户端的请求都要初始化与销毁资源。 参考:《javaweb整合开发王者归来》P81 get和post请求的区别 网上也有文章说:get和post请求实际上是没有区别,大家可以自行查询相关文章!我下面给出的只是一种常见的答案。 ①get请求用来从服务器上获得资源,而post是用来向服务器提交数据; ②get将表单中数据按照name=value的形式,添加到action 所指向的URL 后面,并且两者使用"?“连接,而各个变量之间使用”&“连接;post是将表单中的数据放在HTTP协议的请求头或消息体中,传递到action所指向URL; ③get传输的数据要受到URL长度限制(1024字节即256个字符);而post可以传输大量的数据,上传文件通常要使用post方式; ④使用get时参数会显示在地址栏上,如果这些数据不是敏感数据,那么可以使用get;对于敏感数据还是应用使用post; ⑤get使用MIME类型application/x-www-form-urlencoded的URL编码(也叫百分号编码)文本的格式传递参数,保证被传送的参数由遵循规范的文本组成,例如一个空格的编码是”%20"。 补充:GET方式提交表单的典型应用是搜索引擎。GET方式就是被设计为查询用的。 还有另外一种回答。推荐大家看一下: https://www.zhihu.com/question/28586791 https://mp.weixin.qq.com/s?__biz=MzI3NzIzMzg3Mw==&mid=100000054&idx=1&sn=71f6c214f3833d9ca20b9f7dcd9d33e4#rd 什么情况下调用doGet()和doPost() Form标签里的method的属性为get时调用doGet(),为post时调用doPost()。 转发(Forward)和重定向(Redirect)的区别 转发是服务器行为,重定向是客户端行为。 转发(Forword) 通过RequestDispatcher对象的forward(HttpServletRequest request,HttpServletResponse response)方法实现的。RequestDispatcher可以通过HttpServletRequest 的getRequestDispatcher()方法获得。例如下面的代码就是跳转到login_success.jsp页面。 request.getRequestDispatcher("login_success.jsp").forward(request, response); 重定向(Redirect) 是利用服务器返回的状态吗来实现的。客户端浏览器请求服务器的时候,服务器会返回一个状态码。服务器通过HttpServletRequestResponse的setStatus(int status)方法设置状态码。如果服务器返回301或者302,则浏览器会到新的网址重新请求该资源。 从地址栏显示来说 forward是服务器请求资源,服务器直接访问目标地址的URL,把那个URL的响应内容读取过来,然后把这些内容再发给浏览器.浏览器根本不知道服务器发送的内容从哪里来的,所以它的地址栏还是原来的地址. redirect是服务端根据逻辑,发送一个状态码,告诉浏览器重新去请求那个地址.所以地址栏显示的是新的URL. ...

January 4, 2019 · 2 min

Java基础知识

1. 面向对象和面向过程的区别 面向过程 优点: 性能比面向对象高,因为类调用时需要实例化,开销比较大,比较消耗资源;比如单片机、嵌入式开发、Linux/Unix等一般采用面向过程开发,性能是最重要的因素。 缺点: 没有面向对象易维护、易复用、易扩展 面向对象 优点: 易维护、易复用、易扩展,由于面向对象有封装、继承、多态性的特性,可以设计出低耦合的系统,使系统更加灵活、更加易于维护 缺点: 性能比面向过程低 2. Java 语言有哪些特点 简单易学; 面向对象(封装,继承,多态); 平台无关性( Java 虚拟机实现平台无关性); 可靠性; 安全性; 支持多线程( C++ 语言没有内置的多线程机制,因此必须调用操作系统的多线程功能来进行多线程程序设计,而 Java 语言却提供了多线程支持); 支持网络编程并且很方便( Java 语言诞生本身就是为简化网络编程设计的,因此 Java 语言不仅支持网络编程而且很方便); 编译与解释并存; 3. 什么是 JDK 什么是 JRE 什么是 JVM 三者之间的联系与区别 这几个是Java中很基本很基本的东西,但是我相信一定还有很多人搞不清楚!为什么呢?因为我们大多数时候在使用现成的编译工具以及环境的时候,并没有去考虑这些东西。 JDK: JDK(Java Development Kit)顾名思义它是给开发者提供的开发工具箱,是给程序开发者用的。它除了包括完整的JRE(Java Runtime Environment),Java运行环境,还包含了其他供开发者使用的工具包。 JRE: 普通用户而只需要安装 JRE(Java Runtime Environment)来运行 Java 程序。而程序开发者必须安装JDK来编译、调试程序。 JVM: 当我们运行一个程序时,JVM 负责将字节码转换为特定机器代码,JVM 提供了内存管理/垃圾回收和安全机制等。这种独立于硬件和操作系统,正是 java 程序可以一次编写多处执行的原因。 区别与联系: JDK 用于开发,JRE 用于运行java程序 ; JDK 和 JRE 中都包含 JVM ; JVM 是 java 编程语言的核心并且具有平台独立性。 4. 什么是字节码 采用字节码的最大好处是什么 先看下 java 中的编译器和解释器: Java 中引入了虚拟机的概念,即在机器和编译程序之间加入了一层抽象的虚拟的机器。这台虚拟的机器在任何平台上都提供给编译程序一个的共同的接口。 ...

January 3, 2019 · 4 min