Python服务端工程师学什么,面试问什么,你该准备什么?别苦恼,别害怕,别纠结,这门课程带你系统梳理面试知识,增加面试成功几率,提升后端开发技能,在面试之前解决你的各种问题,让你技术实力和面试技巧得到双重提升。
适合人群
Python服务端工程师(后端工程师)
初/中级 web 开发者和全栈开发者
使用 Python 语言的开发者
(运维工程师,爬虫工程师,数据分析师等)
技术储备要求
掌握Python编程语言
会使用Python进行网站开发,了解网站工作原理
有一定的网站后端基础知识
public Book() {
}
public Book(String ID, String name, String price, String auth, String publish, String description) { super(); this.ID = ID; this.name = name; this.price = price; this.auth = auth; this.publish = publish; this.description = description;}public String getDescription() { return description;}public voID setDescription(String description) { this.description = description;}public String getID() { return ID;}public voID setID(String ID) { this.ID = ID;}public String getname() { return name;}public voID setname(String name) { this.name = name;}public String getPrice() { return price;}public voID setPrice(String price) { this.price = price;}public String getAuth() { return auth;}public voID setAuth(String auth) { this.auth = auth;}public String getPublish() { return publish;}public voID setPublish(String publish) { this.publish = publish;}
}
import java.util.linkedHashMap;
import java.util.Map;
import cn.huiyu.ben.Book;
public class BookDao {
private static Map<String,Book> bookMap = new linkedHashMap<String, Book>();
private BookDao() {
}
static{
bookMap.put("1", new Book("1","1111","11.0","zqwang","111出版社","111111111"));
bookMap.put("2", new Book("2","2222","22.0","zqwang","222出版社","222222222"));
bookMap.put("3", new Book("3","3333","33.0","zqwang","333出版社","333333333"));
}
public static Map<String,Book> getBooks(){ return bookMap;}public static Book getBook(String ID){ return bookMap.get(ID);}
}
public voID doGet(httpServletRequest request, httpServletResponse response)
throws servletexception, IOException {
response.setContentType("text/HTML;charset=utf-8");
//1.查询数据库中一切的书展现
Map<String,Book> map = BookDao.getBooks();
for(Map.Entry<String , Book> entry : map.entrySet()){
Book book = entry.getValue();
response.getWriter().write("<a href='"+request.getcontextpath()+"/servlet/BookInfoServlet?ID="+book.getID()+"'>"+book.getname()+"
");
}
response.getWriter().write("
");
//2.显现之前看过的书 cookie [] cs = request.getcookies(); cookie findC = null; if(cs!=null){ for(cookie c : cs){ if("last".equals(c.getname())){ findC = c; } } } if(findC == null){ response.getWriter().write("没有看过任何书!"); }else{ response.getWriter().write("您曾经阅读过的书:
");
String[] IDs = findC.getValue().split(",");
for(String ID : IDs){
Book book = BookDao.getBook(ID);
response.getWriter().write(book.getname()+"
");
}
}
}
public voID doGet(httpServletRequest request, httpServletResponse response)
throws servletexception, IOException {
response.setContentType("text/HTML;charset=utf-8");
//1.获取要看的书的ID,查询数据库找出书,输出书的细致信息
String ID = request.getParameter("ID");
Book book = BookDao.getBook(ID);
if(book==null){
response.getWriter().write("找不到这本书!");
return;
}else{
response.getWriter().write("
书名:"
+book.getname()+"");
response.getWriter().write("
作者:"
+book.getAuth()+"");
response.getWriter().write("
售价:"
+book.getPrice()+"");
response.getWriter().write("
出版社:"
+book.getPublish()+"");
response.getWriter().write("
描画信息:"
+book.getDescription()+"");
}
//2.发送cookie保管最后看过的书 // --- 1 --> 1 // 1 --2,1 --> 2,1 // 2,1--3,2,1 --> 3,2,1 // 3,2,1 -- 4,3,2 --> 4,3,2 // 4,3,2 --3,4,2 --> 3,4,2 String IDs = ""; cookie [] cs = request.getcookies(); cookie findC = null; if(cs!=null){ for(cookie c : cs){ if("last".equals(c.getname())){ findC = c; } } } if(findC == null){ //阐明之前没有看过书的记载 IDs += book.getID(); }else{ //阐明之前有历史看过的书的记载,需求依据历史记载算一个新的记载出来 String [] olds = findC.getValue().split(","); StringBuffer buffer = new StringBuffer(); buffer.append(book.getID()+","); for(int i = 0;i<olds.length && buffer.toString().split(",").length<3 ;i++){ String old = olds[i]; if(!old.equals(book.getID())){ buffer.append(old+","); } } IDs = buffer.substring(0, buffer.length()-1); } cookie lastC = new cookie("last",IDs); lastC.setMaxAge(3600*24*30); lastC.setPath(request.getcontextpath()); response.addcookie(lastC);}
总结 以上是内存溢出为你收集整理的Python工程师面试宝典一线大厂资深面试官亲授全部内容,希望文章能够帮你解决Python工程师面试宝典一线大厂资深面试官亲授所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)