1 需求分析(需求分析师)

功能分析:

1)添加联系人

2)修改联系人

3)删除联系人

4)查询所有联系人

2 需求设计(系统分析师/架构师/资深开发人员)

2.1设计实体(抽象实体)

联系人实体:

  1. class Contact{
  2. private String id;
  3. private String name;
  4. private String gender;
  5. private int age;
  6. private String phone;
  7. private String email;
  8. private String qq;
  9.   public String getId() {
  10. return id;
  11. }
  12. public void setId(String id) {
  13. this.id = id;
  14. }
  15. public String getName() {
  16. return name;
  17. }
  18. public void setName(String name) {
  19. this.name = name;
  20. }
  21. public String getGender() {
  22. return gender;
  23. }
  24. public void setGender(String gender) {
  25. this.gender = gender;
  26. }
  27. public int getAge() {
  28. return age;
  29. }
  30. public void setAge(int age) {
  31. this.age = age;
  32. }
  33. public String getPhone() {
  34. return phone;
  35. }
  36. public void setPhone(String phone) {
  37. this.phone = phone;
  38. }
  39. public String getEmail() {
  40. return email;
  41. }
  42. public void setEmail(String email) {
  43. this.email = email;
  44. }
  45. public String getQq() {
  46. return qq;
  47. }
  48. public void setQq(String qq) {
  49. this.qq = qq;
  50. }
  51. @Override
  52. public String toString() {
  53. return "Contact [age=" + age + ", email=" + email + ", gender="
  54. + gender + ", id=" + id + ", name=" + name + ", phone=" + phone
  55. + ", qq=" + qq + "]";
  56. }
  57. }

2.2设计“数据库”,(xml代替"数据库")

XML格式

  1. contact.xml
  2. <contactList>
  3. <contact id="1">
  4. <name>张三</name>
  5. <gender>男</gender>
  6. <age>20</age>
  7. <phone>13433334444</phone>
  8. <email>zs@qq.com</email>
  9. <qq>43222222<qq>
  10. </contact>
  11. </contactList>

XML工具类

  1. public class XMLUtil {
  2.  
  3. /**
  4. * 读取xml文档方法
  5. * @return
  6. */
  7. public static Document getDocument(){
  8. try {
  9. Document doc = new SAXReader().read(new File("e:/contact.xml"));
  10. return doc;
  11. } catch (DocumentException e) {
  12. e.printStackTrace();
  13. throw new RuntimeException(e);
  14. }
  15. }
  16.  
  17. /**
  18. * 写出到xml文档中
  19. */
  20. public static void write2xml(Document doc){
  21. try {
  22. FileOutputStream out = new FileOutputStream("e:/contact.xml");
  23. OutputFormat format = OutputFormat.createPrettyPrint();
  24. format.setEncoding("utf-8");
  25. XMLWriter writer = new XMLWriter(out,format);
  26. writer.write(doc);
  27. writer.close();
  28. } catch (Exception e) {
  29. e.printStackTrace();
  30. throw new RuntimeException(e);
  31. }
  32. }
  33. }

2.3设计涉及的接口

DAO接口(数据访问对象):实体对象的CRUD方法。

项目原则: 通常一个实体对象就会对应一个DAO接口和一个DAO实现类

DAO接口

  1. interface ContactDao{
  2. public void addContact(Contact contact);//添加联系人
  3. public void updateContact(Contact contact);//修改联系人
  4. public void deleteContact(String id);//删除联系人
  5. public List<Contact> findAll(); //查询所有联系人
  6. public Contact findById(String id);//根据编号查询联系人
  7. }

DAO实现类

  1. public class ContactDaoImpl implements ContactDao {
  2.  
  3. /**
  4. * 添加联系人
  5. */
  6. public void addContact(Contact contact) {
  7. try {
  8. File file = new File("e:/contact.xml");
  9. Document doc = null;
  10. Element rootElem = null;
  11. if(!file.exists()){
  12. /**
  13. * 需求: 把contact对象保存到xml文件中
  14. */
  15. //如果没有xml文件,则创建xml文件
  16. doc = DocumentHelper.createDocument();
  17. //创建根标签
  18. rootElem = doc.addElement("contactList");
  19. }else{
  20. //如果有xml文件,则读取xml文件
  21. doc = XMLUtil.getDocument();
  22. //如果有xml文件,读取根标签
  23. rootElem = doc.getRootElement();
  24. }
  25.  
  26. //添加contact标签
  27. /**
  28. * <contact id="1">
  29. <name>eric</name>
  30. <gender>男</gender>
  31. <age>20</age>
  32. <phone>1343333</phone>
  33. <email>eric@qq.com</email>
  34. <qq>554444</qq>
  35. </contact>
  36. */
  37. Element contactElem = rootElem.addElement("contact");
  38.  
  39. /**
  40. * 由系统自动生成随机且唯一的ID值,赋值给联系人
  41. */
  42. String uuid = UUID.randomUUID().toString().replace("-","");
  43.  
  44. contactElem.addAttribute("id", uuid);
  45. contactElem.addElement("name").setText(contact.getName());
  46. contactElem.addElement("gender").setText(contact.getGender());
  47. contactElem.addElement("age").setText(contact.getAge()+"");
  48. contactElem.addElement("phone").setText(contact.getPhone());
  49. contactElem.addElement("email").setText(contact.getEmail());
  50. contactElem.addElement("qq").setText(contact.getQq());
  51. //把Document写出到xml文件
  52. XMLUtil.write2xml(doc);
  53. } catch (Exception e) {
  54. e.printStackTrace();
  55. throw new RuntimeException(e);
  56. }
  57. }
  58.  
  59. /**
  60. * 删除联系人
  61. */
  62. public void deleteContact(String id) {
  63. try {
  64. //1.读取xml文件
  65. Document doc = XMLUtil.getDocument();
  66. //2.查询需要删除id的contact
  67. Element contactElem = (Element)doc.selectSingleNode("//contact[@id='"+id+"']");
  68. //删除标签
  69. if(contactElem!=null){
  70. contactElem.detach();
  71. }
  72.  
  73. //3.把Document写出到xml文件
  74. XMLUtil.write2xml(doc);
  75. } catch (Exception e) {
  76. e.printStackTrace();
  77. throw new RuntimeException(e);
  78. }
  79. }
  80.  
  81. /**
  82. * 查询所有联系人
  83. */
  84. public List<Contact> findAll() {
  85. //1.读取xml文件
  86. Document doc = XMLUtil.getDocument();
  87.  
  88. //2.创建List对象
  89. List<Contact> list = new ArrayList<Contact>();
  90. //3.读取contact标签
  91. List<Element> conList = (List<Element>)doc.selectNodes("//contact");
  92. for(Element e:conList){
  93. //创建COntact对象
  94. Contact c = new Contact();
  95. c.setId(e.attributeValue("id"));
  96. c.setName(e.elementText("name"));
  97. c.setGender(e.elementText("gender"));
  98. c.setAge(Integer.parseInt(e.elementText("age")));
  99. c.setPhone(e.elementText("phone"));
  100. c.setEmail(e.elementText("email"));
  101. c.setQq(e.elementText("qq"));
  102. //把Contact放入list中
  103. list.add(c);
  104. }
  105. return list;
  106. }
  107.  
  108. /**
  109. * 根据编号查询联系人
  110. */
  111. public Contact findById(String id) {
  112. Document doc = XMLUtil.getDocument();
  113. Element e = (Element)doc.selectSingleNode("//contact[@id='"+id+"']");
  114.  
  115. Contact c = null;
  116. if(e!=null){
  117. //创建COntact对象
  118. c = new Contact();
  119. c.setId(e.attributeValue("id"));
  120. c.setName(e.elementText("name"));
  121. c.setGender(e.elementText("gender"));
  122. c.setAge(Integer.parseInt(e.elementText("age")));
  123. c.setPhone(e.elementText("phone"));
  124. c.setEmail(e.elementText("email"));
  125. c.setQq(e.elementText("qq"));
  126. }
  127. return c;
  128. }
  129.  
  130. /**
  131. * 修改联系人
  132. */
  133. public void updateContact(Contact contact) {
  134. /**
  135. * 需求: 修改id值为2的联系人
  136. * 1)查询id值为2的contact标签
  137. * 2)修改contact标签的内容
  138. */
  139. try {
  140. //1.读取xml文件
  141. Document doc = XMLUtil.getDocument();
  142.  
  143. Element contactElem = (Element)doc.selectSingleNode("//contact[@id='"+contact.getId()+"']");
  144.  
  145. //2.修改contact标签内容 contactElem.element("name").setText(contact.getName());
  146. contactElem.element("gender").setText(contact.getGender());
  147. contactElem.element("age").setText(contact.getAge()+"");
  148. contactElem.element("phone").setText(contact.getPhone());
  149. contactElem.element("email").setText(contact.getEmail());
  150. contactElem.element("qq").setText(contact.getQq());
  151. //3.把Document写出到xml文件
  152. XMLUtil.write2xml(doc);
  153. } catch (Exception e) {
  154. e.printStackTrace();
  155. throw new RuntimeException(e);
  156. }
  157. }
  158. public static void main(String[] args) {
  159. //测试UUID
  160. String uuid = UUID.randomUUID().toString().replace("-","");
  161. System.out.println(uuid);
  162. }
  163.  
  164. }

2.4设计项目的目录结构

项目名称: contactSys_web

目录结构:

|- contactSys_web

  |-src

    |-gz.itcast.contactSys_web.entity : 存放实体对象

    |-gz.itcast.contactSys_web.dao : 存放dao的接口

    |-gz.itcast.contactSys_web.dao.impl: 存放dao的实现类

    |-gz.itcast.contactSys_web.servlet: 存放servlet的类

    |-gz.itcast.contactSys_web.test: 存放单元测试类

    |-gz.itcast.contactSys_web.util: 存放工具类

    |-gz.itcast.contactSys_web.exception: 存放自定义异常类

  |-WebRoot

    |-html文件

    |-images:目录。存放图片资源

    |-css:目录。存放css资源

    |-js:目录。存放js资源

3 编码实现(软件开发工程师/攻城狮)

开发顺序:

设计数据库-> 实体 -> DAO接口,DAO实现-> Servlet+html页面

3.1显示所有人的逻辑

  1. public class ListContactServlet extends HttpServlet {
  2.  
  3. public void doGet(HttpServletRequest request, HttpServletResponse response)
  4. throws ServletException, IOException {
  5. //1.从xml中读取出联系人数据
  6. ContactDao dao = new ContactDaoImpl();
  7. List<Contact> list = dao.findAll();
  8.  
  9. //2.显示到浏览器
  10. response.setContentType("text/html;charset=utf-8");
  11. PrintWriter writer = response.getWriter();
  12.  
  13. String html = "";
  14.  
  15. //shift+alt+A ^(.*)$ \1";
  16. html += "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
  17. html += "<html xmlns='http://www.w3.org/1999/xhtml'>";
  18. html += "<head>";
  19. html += "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />";
  20. html += "<title>查询所有联系人</title>";
  21. html += "<style type='text/css'>";
  22. html += " table td{";
  23. html += " /*文字居中*/";
  24. html += " text-align:center;";
  25. html += " }";
  26. html += " ";
  27. html += " /*合并表格的边框*/";
  28. html += " table{";
  29. html += " border-collapse:collapse;";
  30. html += " }";
  31. html += "</style>";
  32. html += "</head>";
  33. html += "";
  34. html += "<body>";
  35. html += "<center><h3>查询所有联系人</h3></center>";
  36. html += "<table align='center' border='1' width='800px'>";
  37. html += " <tr>";
  38. html += " <th>编号</th>";
  39. html += " <th>姓名</th>";
  40. html += " <th>性别</th>";
  41. html += " <th>年龄</th>";
  42. html += " <th>电话</th>";
  43. html += " <th>邮箱</th>";
  44. html += " <th>QQ</th>";
  45. html += " <th>操作</th>";
  46. html += " </tr>";
  47. if(list!=null){
  48. for (Contact contact : list) {
  49. html += " <tr>";
  50. html += " <td>"+contact.getId()+"</td>";
  51. html += " <td>"+contact.getName()+"</td>";
  52. html += " <td>"+contact.getGender()+"</td>";
  53. html += " <td>"+contact.getAge()+"</td>";
  54. html += " <td>"+contact.getPhone()+"</td>";
  55. html += " <td>"+contact.getEmail()+"</td>";
  56. html += " <td>"+contact.getQq()+"</td>";
  57. html += " <td><a href='"+request.getContextPath()+"/QueryContactServlet?id="+contact.getId()+"'>修改</a>&nbsp;<a href='"+request.getContextPath()+"/DeleteContactServlet?id="+contact.getId()+"'>删除</a></td>";
  58. html += " </tr>";
  59. }
  60. }
  61. html += " <tr>";
  62. html += " <td colspan='8' align='center'><a href='"+request.getContextPath()+"/addContact.html'>[添加联系人]</a></td>";
  63. html += " </tr>";
  64. html += "</table>";
  65. html += "</body>";
  66. html += "</html>";
  67.  
  68. writer.write(html);
  69.  
  70. }
  71.  
  72. public void doPost(HttpServletRequest request, HttpServletResponse response)
  73. throws ServletException, IOException {
  74. doGet(request, response);
  75. }
  76.  
  77. }

3.2添加联系人的逻辑

  1. public class AddContactServlet extends HttpServlet {
  2.  
  3. public void doGet(HttpServletRequest request, HttpServletResponse response)
  4. throws ServletException, IOException {
  5. request.setCharacterEncoding("utf-8");
  6. //1.接收参数
  7. String name = request.getParameter("name");
  8. String gender = request.getParameter("gender");
  9. String age = request.getParameter("age");
  10. String phone = request.getParameter("phone");
  11. String email = request.getParameter("email");
  12. String qq = request.getParameter("qq");
  13.  
  14. //封装成Contact对象
  15. Contact contact = new Contact();
  16. contact.setName(name);
  17. contact.setGender(gender);
  18. contact.setAge(Integer.parseInt(age));
  19. contact.setPhone(phone);
  20. contact.setEmail(email);
  21. contact.setQq(qq);
  22.  
  23. //2.调用dao类的添加联系人的方法
  24. ContactDao dao = new ContactDaoImpl();
  25. dao.addContact(contact);
  26.  
  27. //3.跳转到查询联系人的页面
  28. response.sendRedirect(request.getContextPath()+"/ListContactServlet");
  29. }
  30.  
  31. public void doPost(HttpServletRequest request, HttpServletResponse response)
  32. throws ServletException, IOException {
  33. doGet(request, response);
  34. }
  35.  
  36. }

3.3修改前查询联系人的逻辑

  1. public class QueryContactServlet extends HttpServlet {
  2.  
  3. public void doGet(HttpServletRequest request, HttpServletResponse response)
  4. throws ServletException, IOException {
  5. //1.接收id
  6. String id = request.getParameter("id");
  7.  
  8. //2.调用dao根据id查询联系人的方法
  9. ContactDao dao = new ContactDaoImpl();
  10. Contact contact = dao.findById(id);
  11.  
  12. //3.把联系人显示到浏览器中
  13. response.setContentType("text/html;charset=utf-8");
  14. PrintWriter writer = response.getWriter();
  15.  
  16. String html = "";
  17.  
  18. html += "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
  19. html += "<html xmlns='http://www.w3.org/1999/xhtml'>";
  20. html += "<head>";
  21. html += "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />";
  22. html += "<title>修改联系人</title>";
  23. html += "</head>";
  24. html += "";
  25. html += "<body>";
  26. html += "<center><h3>修改联系人</h3></center>";
  27. html += "<form action='"+request.getContextPath()+"/UpdateContactServlet' method='post'>";
  28. //注意:添加id的隐藏域
  29. html += "<input type='hidden' name='id' value='"+contact.getId()+"'/>";
  30. html += "<table align='center' border='1' width='300px'>";
  31. html += " <tr>";
  32. html += " <th>姓名</th>";
  33. html += " <td><input type='text' name='name' value='"+contact.getName()+"'/></td>";
  34. html += " </tr>";
  35. html += " <tr>";
  36. html += " <th>性别</th>";
  37. html += " <td>";
  38.  
  39. if(contact.getGender().equals("男")){
  40. html += " <input type='radio' name='gender' value='男' checked='checked'/>男";
  41. html += " <input type='radio' name='gender' value='女'/>女";
  42. }else if(contact.getGender().equals("女")){
  43. html += " <input type='radio' name='gender' value='男'/>男";
  44. html += " <input type='radio' name='gender' value='女' checked='checked'/>女";
  45. }else{
  46. html += " <input type='radio' name='gender' value='男' checked='checked'/>男";
  47. html += " <input type='radio' name='gender' value='女'/>女";
  48. }
  49.  
  50. html += " </td>";
  51. html += " </tr>";
  52. html += " <tr>";
  53. html += " <th>年龄</th>";
  54. html += " <td><input type='text' name='age' value='"+contact.getAge()+"'/></td>";
  55. html += " </tr>";
  56. html += " <tr>";
  57. html += " <th>电话</th>";
  58. html += " <td><input type='text' name='phone' value='"+contact.getPhone()+"'/></td>";
  59. html += " </tr>";
  60. html += " <tr>";
  61. html += " <th>邮箱</th>";
  62. html += " <td><input type='text' name='email' value='"+contact.getEmail()+"'/></td>";
  63. html += " </tr>";
  64. html += " <tr>";
  65. html += " <th>QQ</th>";
  66. html += " <td><input type='text' name='qq' value='"+contact.getQq()+"'/></td>";
  67. html += " </tr>";
  68. html += " <tr>";
  69. html += " <td colspan='2' align='center'>";
  70. html += " <input type='submit' value='保存'/>&nbsp;";
  71. html += " <input type='reset' value='重置'/></td>";
  72. html += " </tr>";
  73. html += "</table>";
  74. html += "</form>";
  75. html += "</body>";
  76. html += "</html>";
  77.  
  78. writer.write(html);
  79. }
  80.  
  81. public void doPost(HttpServletRequest request, HttpServletResponse response)
  82. throws ServletException, IOException {
  83. doGet(request, response);
  84. }
  85.  
  86. }

3.4修改联系人的逻辑

  1. public class UpdateContactServlet extends HttpServlet {
  2.  
  3. public void doGet(HttpServletRequest request, HttpServletResponse response)
  4. throws ServletException, IOException {
  5. request.setCharacterEncoding("utf-8");
  6. //1.接收参数
  7. String id = request.getParameter("id");
  8. String name = request.getParameter("name");
  9. String gender = request.getParameter("gender");
  10. String age = request.getParameter("age");
  11. String phone = request.getParameter("phone");
  12. String email = request.getParameter("email");
  13. String qq = request.getParameter("qq");
  14.  
  15. //封装成Contact对象
  16. Contact contact = new Contact();
  17. contact.setId(id);
  18. contact.setName(name);
  19. contact.setGender(gender);
  20. contact.setAge(Integer.parseInt(age));
  21. contact.setPhone(phone);
  22. contact.setEmail(email);
  23. contact.setQq(qq);
  24.  
  25. //2.调用dao修改联系人的方法
  26. ContactDao dao = new ContactDaoImpl();
  27. dao.updateContact(contact);
  28.  
  29. //3.跳转到查询联系人的页面
  30. response.sendRedirect(request.getContextPath()+"/ListContactServlet");
  31.  
  32. }
  33.  
  34. public void doPost(HttpServletRequest request, HttpServletResponse response)
  35. throws ServletException, IOException {
  36. doGet(request, response);
  37. }
  38.  
  39. }

3.5删除联系人的逻辑

  1. public class DeleteContactServlet extends HttpServlet {
  2.  
  3. public void doGet(HttpServletRequest request, HttpServletResponse response)
  4. throws ServletException, IOException {
  5. //在火狐浏览器中以Get方式提交带参数的数据,会重复提交两次。
  6. System.out.println("删除联系人");
  7. //1.接收id
  8. String id = request.getParameter("id");
  9.  
  10. //2.调用dao删除联系人的方法
  11. ContactDao dao = new ContactDaoImpl();
  12. dao.deleteContact(id);
  13.  
  14. //3.跳转到查询联系人的页面
  15. response.sendRedirect(request.getContextPath()+"/ListContactServlet");
  16. }
  17.  
  18. public void doPost(HttpServletRequest request, HttpServletResponse response)
  19. throws ServletException, IOException {
  20. doGet(request, response);
  21. }
  22.  
  23. }

4 功能测试(测试攻城狮)

5 性能测试(测试攻城狮)

6 部署上线(实施攻城狮)

7 维护阶段(实施攻城狮)

<项目><day12>通讯录(视频)的更多相关文章

  1. <项目><day12>通讯录(自己做的)

    设计一个通讯录主页面 <!DOCTYPE html> <html> <head> <title>电话本首页</title> <meta ...

  2. Asp.NET Core2.0 项目实战入门视频课程_完整版

    END OR START? 看到这个标题,你开不开心,激不激动呢? 没错,.net core的入门课程已经完毕了.52ABP.School项目从11月19日,第一章视频的试录制,到今天完整版出炉,离不 ...

  3. 给tomcat配置外部资源路径(应用场景:web项目访问图片视频等资源)

    对于一个web项目来说,除了文字之外,图片,视频等媒体元素也是其重要的组成部分.我们知道,web项目中如果用到大量的图片.视屏的资源,我们 通常的做法是只在数据库中存储图片.视频等资源的路径,web项 ...

  4. 0506-Scrum 项目 2.0视频

    一.团队项目要求 应用NABCD模型,分析你们初步选定的项目,充分说明你们选题的理由. 录制为演说视频,上传到视频网站,并把链接发到团队博客上. 二.NABCD模型 选题:约拍平台——家教平台 1) ...

  5. 优秀开源项目之一:视频监控系统iSpy

    iSpy是一个开源的视频监控软件,目前已经支持中文.自己用了一下,感觉还是很好用的.翻译了一下它的介绍. iSpy将PC变成一个完整的安全和监控系统 iSpy使用您的摄像头和麦克风来检测和记录声音或运 ...

  6. 【VIP视频网站项目】VIP视频网站项目v1.0.3版本发布啦(程序一键安装+电影后台自动抓取+代码结构调整)

    在线体验地址:http://vip.52tech.tech/ GIthub源码:https://github.com/xiugangzhang/vip.github.io 项目预览 主页面 登录页面 ...

  7. 实战项目:通讯录&nbsp;UI—第十一天

     1.推出视图的两种方式:  1.通过导航控制器push到下一个界面,使用pop返回到上一个界面 2.通过模态的形式推出视图,不需要依赖于导航控制器,通过使用present到下一个界面,通过dismi ...

  8. python项目开发视频

    精品Python项目开发学习视频 所属网站分类: 资源下载 > python视频教程 作者:乐天派 链接:http://www.pythonheidong.com/blog/article/44 ...

  9. 【原创】基于NodeJS Express框架开发的一个VIP视频网站项目及源码分享

    项目名称:视频网站项目 开发语言:HTML,CSS(前端),JavaScript,NODEJS(expres)(后台) 数据库:MySQL 开发环境:Win7,Webstorm 上线部署环境:Linu ...

随机推荐

  1. 第16周翻译:SQL Server中的事务日志管理,级别3:事务日志、备份和恢复

    源自: http://www.sqlservercentral.com/articles/Stairway+Series/73779/ 作者: Tony Davis, 2011/09/07 翻译:刘琼 ...

  2. learnpythonthehardway EX41 相关

    str.count() # str.count()方法用于统计字符串里某个字符出现的次数.可选参数为在字符串搜索的开始与结束位置. # str.count(sub, start= 0,end=len( ...

  3. (转)配置Spring管理的bean的作用域

    http://blog.csdn.net/yerenyuan_pku/article/details/52833477 Spring管理的bean的作用域有: singleton 在每个Spring ...

  4. 如何修改站点url

    1.config目录下的config_global.php 文件,修改:$_config['cookie']['cookiedomain'] = '.xxxxx.com';2.config目录下的co ...

  5. DROP SCHEMA - 删除一个模式

    SYNOPSIS DROP SCHEMA name [, ...] [ CASCADE | RESTRICT ] DESCRIPTION 描述 DROP SCHEMA 从数据库中删除模式. 模式只能被 ...

  6. QT+信号和槽函数_自定义槽函数_一个信号对应多个槽函数

    以下的代码里面有自定义槽函数的内容,同时也有信号实现的函数: #ifndef MAINWIDGET_H #define MAINWIDGET_H #include <QWidget> #i ...

  7. JavaScript 非常重要的几个概念

    JavaScript是一门比较复杂的语言.如果你是一名JavaScript开发人员,不管处于什么样的水平,都有必要了解JavaScript的基本概念.小编最近的工作涉及到JavaScript,于是本文 ...

  8. 【转载】WampServer图标显示红色后变成橙色怎么解决

    WampServer就是Windows Apache Mysql PHP集成安装环境,即在window下的apache.php和mysql的服务器软件. 工具/原料   WampServer 方法/步 ...

  9. 树莓派 - MQTT

    安装mosquitto 下载源代码包 wget http://mosquitto.org/files/source/mosquitto-1.5.tar.gz 解压 tar zxfv mosquitto ...

  10. CSS小知识点一

    1.   text-indent属性    缩进文本 通过使用 text-indent 属性,所有元素的第一行都可以缩进一个给定的长度,甚至该长度可以是负值.这个属性最常见的用途是将段落的首行缩进,一 ...