- 博客(26)
- 收藏
- 关注
原创 anaconda配置R详细记录
下载anaconda程序https://www.anaconda.com/products/individual下载MACOS版本安装之后界面如下下一步配置新的运行环境然后在新配置的环境中用MAC的terminal打开终端打开终端后倒入包安装R packages命令如下conda install -c r r-dplyr然后用Jupyter打开即新建一个R的编辑文件使用R了注意:一定不要忘记配置R,以及建立新环境后的安装R到这个新的环境中,打开终端操作比较方便一行命令搞定co
2020-09-19 23:17:47
1803
原创 The life circle of Activity in andrid
package com.codecademy.myactivity;import androidx.appcompat.app.AppCompatActivity;import android.app.Activity;import android.os.Bundle;import android.widget.Toast;public class MainActivity extends AppCompatActivity { @Override // Bundle savedI
2020-09-17 00:40:04
168
原创 7. Basic data structure and algorithms in java - Merge sort
Merge sortMerge Sort is a Divide and Conquer algorithm. It divides input array in two halves, calls itself for the two halves and then merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is key proces
2020-09-07 03:02:04
166
原创 6. Basic data structure and algorithms in java - Shell sort
Shell sortShell sort is based on the Insertion sorting algorithm, and it belongs to the group of very efficient algorithms. In general, the algorithm breaks an original set into smaller subsets and then each of those is sorted using Insertion sort.But, h
2020-09-07 03:01:13
154
1
原创 2. Basic data structure and algorithms in java - Bubble sort
Bubble sort is very easy to understand, use two for loop to sort the array, and the time complexity is O(n2).Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.public class Stu
2020-09-07 03:00:15
122
原创 3. Basic data structure and algorithms in java -Stability in sorting algorithms
What is stable sorting algorithm?A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in the sorted output as they appear in the unsorted input.Whereas a sorting algorithm is said to be unstable if there are tw
2020-09-06 16:50:28
151
原创 4. Basic data structure and algorithms in java -Selection sort
Selection sortThe selection sort algorithm sorts an array by repeatedly finding the maximum element (considering ascending order) from unsorted part and putting it at the end. The algorithm maintains two subarrays in a given array.The subarray which is
2020-09-06 16:49:24
140
原创 5. Basic data structure and algorithms in java -Insertion sort
Insertion sortInsertion sort is a simple sorting algorithm that works similar to the way you sort playing cards in your hands. The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the corr
2020-09-06 16:47:43
135
原创 1. Basic data structure and algorithms in java - Big O Notation
public class Study { // what is the kinds of algorithm // O(1) : Constant // O(logn) : Logarithmic // O(n) : Linear // O(nlogn) : nlog-star n // O(n2) : Quadratic}
2020-09-06 16:46:31
117
原创 Basic knowledge of session and cookies and the differences between session and cookies
Introduction of cookie and sessionSessions and cookies are two very common web concepts, and are also very easy to misunderstand. However, they are extremely important for the authorization of pages, as well as for gathering page statistics. Let’s take a
2020-09-06 11:16:53
192
原创 An easy application by using jsp and servlet to control user login and logout
The whole program layout in the eclipseThe front end including index.jsp, login.jsp, memberArea.jsp and the back end including two servlet to handle login and logout functionindex.jspThis page will has one Login button, click it will direct user to the
2020-09-06 06:53:06
160
原创 Using session attribute to handle logout from a page
IF we only need to handle login and logout, cookie is not a good idea, we can handle login and logout by using session attributeFor example when we click the logout button, the servlet to handle the logout function will get the action is destroy and then
2020-09-06 06:23:05
174
原创 How to use cookie to log out from website
1. login.jsp to get the username and password from user<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><!DOCTYPE html><html><head><meta charset="UTF-8"><title>Insert title
2020-09-06 06:22:25
219
原创 Basic knowledge about cookies in client - server interaction
What is a cookie?Cookies are usually small text files, given ID tags that are stored on your computer’s browser directory or program data subfolders. Cookies are created when you use your browser to visit a website that uses cookies to keep track of your
2020-09-06 06:20:28
127
原创 Basic Introduction of Session
Session introductionsession称为“会话控制”,Session 对象存储特定用户会话所需的属性及配置信息。当程序需要为某个客户端的请求创建一个session时,服务器首先检查这个客户端是否包含一个session标识(即JSESSIONID)。 如果是第一次请求服务器,服务器会创建session,并创建Cookie,在Cookie中保存Session的id,发送给客户端,这样客户端就有了自己的session的id了。但这个Cookie只在浏览器内存中存在,也就是说,在关闭浏览器
2020-09-06 03:37:27
194
原创 JavaBean class in Java
JavaBeans are classes that encapsulate many objects into a single object (the bean). It is a java class that should follow following conventions:Must implement Serializable.It should have a public no-arg constructor.All properties in java bean must be
2020-09-05 22:20:12
225
原创 Basic form validations
By adding required to the Full name: , means that this text box must be filled before submit<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transiti
2020-09-04 19:19:45
186
原创 JSP - Form - Servlet 的doGet()和doPost()方法简单交互
jsp form代码记得form的action应该是servlet的地址URL,method为get或者post```html<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>Form demo Full name: Gender: Male Female Lan
2020-09-04 19:07:02
624
原创 Form elements for HTML
Defines an input control for the form Defines a multiline(text area) input control for the form Defines a label for an element for the form Groups related elements in a form for the form Defines a caption for a element for the form Defines a drop-d.
2020-09-04 18:34:42
126
原创 Java Web jsp && servlet 实现简单的MVC控制
1. What is MVC?MVC Pattern stands for Model-View-Controller Pattern. This pattern is used to separate application’s concerns.Model: Handles data and business logic.View: Presents the data to the user whenever asked for.Controller: Entertains user reque
2020-09-04 11:24:27
238
1
原创 Life Cycle of Servlet && Corresponding Java Methods
Life Cycle of Servlet1) Loading of Servlet2) Creating instance of Servlet3) Invoke init() once4) Invoke service() repeatedly for each client request5) Invoke destroy()Step 1: Loading of ServletWhen the web server (e.g. Apache Tomcat) starts up, the
2020-09-04 07:42:02
173
原创 常见的实现servlet的三种形式
常见的实现servlet的三种形式package com.xxxx.servlet;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRespon
2020-09-04 07:18:36
300
原创 Servlet Servlet的工作流程
如何理解路径如下例子http://localhost:8080/s01/ser01localhost代表主机8080为端口号/s01为项目路径/ser001为项目下的资源路径
2020-09-04 07:06:13
199
原创 Servlet的WebServlet注解详解
1. 如何实现Servlet,代码如下package com.xxxx.servlet;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResp
2020-09-04 06:57:49
1020
原创 IntelliJ says ‘cannot run program ‘/path/to/tomcat/bin/catalina.sh‘ error=13 permission denied
今天我在IntelliJ Idea中新建了一个Java EE的project之后发现Edit Configuration我选择Tomcat的local之后run不了,显示错误如下:IntelliJ says 'cannot run program ‘/path/to/tomcat/bin/catalina.sh’ error=13 permission denied。后来在网上查了下,发现有可能是我的Tomcat的包下错了,我的PC是MAC,好像应该用tar.gz (pgp, sha512)。应该下tar
2020-09-04 06:20:30
572
原创 MAC & Tomcat & Startup & ShutDown
如何从Terminals启动Tomcat服务器我的Tomcat安装包路径为/Library/ApacheTomcat进入到目录的bin目录下,路径为/Library/ApacheTomcat/bin输入 cd /Library/ApacheTomcat/bin 进到 Tomcat 的 bin 目录下输入 sudo chmod 755 *.sh 设置权限输入 sudo sh startup.sh 启动 Tomcat。在浏览器中输入 localhost:8080 看到 Tomcat 主页即为成功。
2020-09-04 05:12:13
143
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人