liferay 这个框架是一个开源的项目,大家可以修改源代码,来实现自己的需求。但是关于liferay的开发资料中文的很少关于liferay的基础知识,大家可以百度学习一下,再来看下边的例子

首先需要搭建环境,搭建环境百度一大堆,在这里不废话,直接上代码,

开发的步骤1:首先配置需要的配置的文件

<?xml version="1.0"?>
<!DOCTYPE display PUBLIC "-//Liferay//DTD Display 6.1.0//EN" "http://www.liferay.com/dtd/liferay-display_6_1_0.dtd">

<display>
<category name="category.ebizwindow.book">//在这个地方大家需要修改一下名字,不然的话在liferay的界面上不会显示出来你写的项目
<portlet id="BookSystem" />
</category>
</display>

2个配置的文件是

<?xml version="1.0"?>

<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>BookSystem</portlet-name>
<display-name>BookSystem</display-name>
<portlet-class>com.ebizwindow.exceed.portlet.BookPortlet</portlet-class>//在这地方修改你要写的portlet的名字,默认生成的是JSPPortlet
<init-param>
<name>view-jsp</name>
<value>/jsp/book/mybook-list.jsp</value>//这个页面是你要访问的第一个页面,在这个页面是通过doView方法找到的页面。
</init-param>
<init-param>
<name>edit-jsp</name>
<value>/jsp/edit.jsp</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-mode>EDIT</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<supported-locale>zh_CN</supported-locale>
<resource-bundle>content.Language-ext</resource-bundle>
<portlet-info>
<title>BookSystem</title>
<short-title>BookSystem</short-title>
<keywords>BookSystem</keywords>
</portlet-info>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
</portlet-app>

3.是service.xml的配置文件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 5.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_5_2_0.dtd">

<service-builder package-path="com.ebizwindow.exceed">
<namespace>BookSystem</namespace>

<entity name="Book" local-service="true" remote-service="false">//remote-service="false"这个设置为false的就是自动生成的时候不是生成一些方法, local-service="true"这个设置为true就会在项目中生成一些程序员要调用的方法。

<!-- company 公司的id -->
<column name="companyId" type="long" />//这个companyId就是自动有的这个不需要修改,就是公司的id

<!-- PK fields -->
<column name="bookId" type="long" primary="true" />//这个就是你的实体的id

<!-- Other fields 实体的属性-->
<column name="bookName" type="String" />
<column name="bookAuthor" type="String" />
<column name="bookAddress" type="String" />
<column name="bookPrice" type="double" />
<column name="bookDate" type="Date" />

<!-- Order 检索出来的数据按照name排序-->
<order by="asc">
<order-column name="bookName" />
</order>

<!-- Finder methods -->
<finder name="companyId" return-type="Collection">//对应自动生成的方法是getCompanyId(long companyId)。顾名思义就是按照公司的id检索所有的数据
<finder-column name="companyId" />
</finder>
<!-- 这个是根据用户的名字返回图书 -->
<finder return-type="Collection" name="bookName">//对应生成的方法是getBookName(String bookName)

<finder-column name="bookName" />

</finder>

<!-- 根据作者来查看图书 -->
<finder return-type="Collection" name="bookAuthor">//对应生成的方法是getBookAuthor(String bookAuthor)

<finder-column name="bookAuthor" />

</finder>

</entity>

</service-builder>

需要注意:根据实体的主键来检索一条数据,这个方法是不需要配置,默认会生成.

好吧,罗嗦了一大会,配置文件就搞定了,点击builder.xml,点击builder-service就会自动生成方法和实体,程序员只需要写自己的逻辑的代码就行了。

下面开始写portlet,这个portlet跟大家学的servlet有很大相似,但是也有不同,自己百度查查就知道。

package com.ebizwindow.exceed.portlet;

import com.ebizwindow.exceed.model.Book;
import com.ebizwindow.exceed.service.BookLocalServiceUtil;
import com.liferay.compat.portal.util.PortalUtil;
import com.liferay.counter.service.CounterLocalServiceUtil;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portlet.PortletURLFactoryUtil; import java.io.IOException; import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
import javax.portlet.PortletModeException;
import javax.portlet.PortletRequest;
import javax.portlet.PortletRequestDispatcher;
import javax.portlet.PortletResponse;
import javax.portlet.PortletURL;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.WindowStateException; public class BookPortlet extends GenericPortlet { private final static String FORWARD = "forward"; private final static String OPERATION = "operation"; public void init() throws PortletException {
editJSP = getInitParameter("edit-jsp");
helpJSP = getInitParameter("help-jsp");
viewJSP = getInitParameter("view-jsp");
} public void doList(PortletRequest portletRequest){ long companyId = PortalUtil.getCompanyId(portletRequest); _log.info(companyId+"ggggggggg$$$$$$$$$$$$$$$$$$$$");
try {
//得到数据库中所有的书籍
List<Book> books = BookLocalServiceUtil.searchByCompanyId(companyId); _log.info(StringUtil.merge(books)+"abcdef============================="); //然后把书发送给jsp.首先把图书存到响应中
portletRequest.setAttribute("books", books); } catch (SystemException e) {
e.printStackTrace();
} } public void doView(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { String jspPage = renderRequest.getParameter(FORWARD);
if (jspPage == null) {
this.doList(renderRequest);
}
jspPage = jspPage == null ? this.viewJSP : jspPage;
include(jspPage, renderRequest, renderResponse); } public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { if (renderRequest.getPreferences() == null) {
super.doEdit(renderRequest, renderResponse);
} else {
include(editJSP, renderRequest, renderResponse);
}
} public void doHelp(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { include(helpJSP, renderRequest, renderResponse);
} public static PortletURL getPortletURL(ActionRequest actionRequest) throws PortalException, SystemException {
long groupId = PortalUtil.getScopeGroupId(actionRequest);
String portletId = PortalUtil.getPortletId(actionRequest);
long plid = PortalUtil.getPlidFromPortletId(groupId, portletId);
PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest),
portletId, plid, PortletRequest.ACTION_PHASE);
try {
redirectURL.setPortletMode(actionRequest.getPortletMode());
redirectURL.setWindowState(actionRequest.getWindowState());
} catch (PortletModeException e) {
_log.error(e);
} catch (WindowStateException e) {
_log.error(e);
}
return redirectURL;
} public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
throws IOException, PortletException { //得到操作的名称
String actionName = ParamUtil.getString(actionRequest, OPERATION); if (actionName != null) {
String forward = null;
_log.info(ActionRequest.ACTION_NAME + " = " + actionName); if (actionName.equals("list")) {
//首先执行这个请求的时候,就找到数据要去的页面
//1:首先从数据库中选出来所有的数据,根据公司的id就行了
//首先获取id
this.doList(actionRequest); forward = "/jsp/book/mybook-list.jsp";
} else if(actionName.equals("details")) {
// 查看书的详细的信息1:首先获得前台界面传过来的id
long bookId = ParamUtil.getLong(actionRequest, "bookId",0L); //在调用本地方法的实现的类
Book book = null;
try {
book = BookLocalServiceUtil.getBook(bookId);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //把这本书发送给界面就可以
actionRequest.setAttribute("book", book); forward = "/jsp/book/mybook-details.jsp";
} else if (actionName.equals("load")) {
//如果的到的参数load的话就是要跳转的页面 _log.info("----------------------------------------------"+actionName+"-------success");
forward = "/jsp/book/mybook-add.jsp"; } else if(actionName.equals("add")) {
_log.info("@@@@@@@@@@@@@@@@@@@@@@@");
//首先获取信息页面传过来的信息
String bookName = ParamUtil.getString(actionRequest, "bookName",StringPool.BLANK);
String bookAuthor =ParamUtil.getString(actionRequest, "bookAuthor",StringPool.BLANK);
String bookAddress = ParamUtil.getString(actionRequest, "bookAddress",StringPool.BLANK);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date bookDate = (Date) ParamUtil.getDate(actionRequest, "bookDate", dateFormat);
double bookPrice = ParamUtil.getDouble(actionRequest, "bookPrice",0.0); long companyId = PortalUtil.getCompanyId(actionRequest);
_log.info(bookName+"--"+bookAuthor+"--"+bookAddress+"--"+bookPrice+"--"+bookDate);
//添加图书,添加图书的时候你需要考虑id
long bookId = 0L;
try {
bookId = CounterLocalServiceUtil.increment(Book.class.getName());
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //创建一个book的引用
Book book = BookLocalServiceUtil.createBook(bookId); book.setBookAddress(bookAddress);
book.setBookAuthor(bookAuthor);
book.setBookDate(bookDate);
book.setBookName(bookName);
book.setBookPrice(bookPrice);
book.setCompanyId(companyId);
//调用添加的方法添加到数据库
try {
BookLocalServiceUtil.addBook(book);
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} this.doList(actionRequest);
//数据添加到数据库中之后就到list的界面上 //重定向
PortletURL redirect = null;
try {
redirect = getPortletURL(actionRequest);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
redirect.setPortletMode(PortletMode.VIEW);
actionResponse.sendRedirect(redirect.toString()); }else if (actionName.equals("edit")){
//首先获取用户要修改的id,然后根据id找到信息
long bookId = ParamUtil.getLong(actionRequest, "bookId",0L); Book book = null;
try {
book = BookLocalServiceUtil.getBook(bookId);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //把这本书发送给界面就可以
actionRequest.setAttribute("book", book); forward = "/jsp/book/mybook-edit.jsp";
} else if(actionName.equals("editTrue")) {//得到的方法是修改
//首先获得要编辑图书的id
long bookId = ParamUtil.getLong(actionRequest, "bookId",0L);
//根据id找到图书
Book book = null;
try {
book= BookLocalServiceUtil.getBook(bookId);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} //获得提交修改后的数据的参数
String bookName = ParamUtil.getString(actionRequest, "bookName",StringPool.BLANK);
String bookAuthor =ParamUtil.getString(actionRequest, "bookAuthor",StringPool.BLANK);
String bookAddress = ParamUtil.getString(actionRequest, "bookAddress",StringPool.BLANK);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date bookDate = (Date) ParamUtil.getDate(actionRequest, "bookDate", dateFormat);
double bookPrice = ParamUtil.getDouble(actionRequest, "bookPrice",0.0);
book.setBookAddress(bookAddress);
book.setBookAuthor(bookAuthor);
book.setBookDate(bookDate);
book.setBookName(bookName);
book.setBookPrice(bookPrice);
//调用数据库中修改的方法
try {
BookLocalServiceUtil.updateBook(book);
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} PortletURL redirect = null;
try {
redirect = getPortletURL(actionRequest);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
redirect.setPortletMode(PortletMode.VIEW);
actionResponse.sendRedirect(redirect.toString()); } else if (actionName.equals("delete")){
//删除的方法.首先获得要删除的数据的id
long bookId = ParamUtil.getLong(actionRequest, "bookId",0L);
//调用数据库删除的方法
try {
BookLocalServiceUtil.deleteBook(bookId);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} PortletURL redirect = null;
try {
redirect = getPortletURL(actionRequest);
} catch (PortalException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
redirect.setPortletMode(PortletMode.VIEW);
actionResponse.sendRedirect(redirect.toString()); }else{
forward = this.helpJSP;
} _log.info(FORWARD + " = " + forward); if(forward != null){
actionResponse.setRenderParameter(FORWARD, forward);
} }
} public void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { String jspPage = renderRequest.getParameter(FORWARD); if (jspPage != null) {
include(jspPage, renderRequest, renderResponse);
} else {
super.doDispatch(renderRequest, renderResponse);
}
} protected void include(String path, RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { PortletRequestDispatcher portletRequestDispatcher =
getPortletContext().getRequestDispatcher(path); if (portletRequestDispatcher == null) {
_log.error(path + " is not a valid include");
} else {
portletRequestDispatcher.include(renderRequest, renderResponse);
}
} protected String editJSP;
protected String helpJSP;
protected String viewJSP; private static Log _log = LogFactoryUtil.getLog(BookPortlet.class); }

  界面代码:

mybook-list.jsp界面

<%@ page language="java" import="java.util.*" pageEncoding="Utf-8"%>
<%@page import="javax.portlet.PortletPreferences"%>
<!-- 引入init.jsp -->
<%@ include file="/init.jsp"%>
<!-- 使用portlet标签 来设计页面-->
<!-- 首先定义portlet提交的路径
<portlet:actionURL var="searchURL">
<portlet:param name="operation" value="example.list" />
</portlet:actionURL>
-->
<portlet:actionURL var="listURL"> <portlet:param name="operation" value="list" /> </portlet:actionURL> <!-- form表单的内容 -->
<form action="<%=listURL %>" method="post"> <fieldset> <table>
<tr>
<legend>图书列表</legend>
<th>图书名称</th>
<th>图书作者</th>
<th>图书出版社</th>
<th>图书出版日期</th>
<th>图书价格</th>
</tr> <%
//首先获取后台发过来的数据List<Orenge> results = (List<Orenge>)renderRequest.getAttribute("results");
List<Book> books = (List<Book>)renderRequest.getAttribute("books"); if (books.size()>0 || books != null) {
for (Book book:books) {%> <td>
<portlet:actionURL var="detailBookURL" windowState="<%=LiferayWindowState.EXCLUSIVE.toString() %>">
<portlet:param name="operation" value="details" />
<portlet:param name="bookId" value='<%=String.valueOf(book.getBookId())%>' />
</portlet:actionURL>
<a href="javascript:showOrenge('<%=detailBookURL %>', 'book')"><%=book.getBookName() %></a>
</td> <td>
<%=book.getBookAuthor() %> </td> <td>
<%=book.getBookAddress() %> </td> <td>
<%=book.getBookDate() %> </td> <td>
<%=book.getBookPrice() %> </td> <td>
<liferay-ui:icon-menu>
<portlet:actionURL var="editBookURL">
<portlet:param name="operation" value="edit" />
<portlet:param name="bookId" value='<%=String.valueOf(book.getBookId())%>' />
</portlet:actionURL>
<liferay-ui:icon image="edit" url="<%=editBookURL %>" message="edit"/> <portlet:actionURL var="deleteBookURL">
<portlet:param name="operation" value="delete"/>
<portlet:param name="action" value="delete"/>
<portlet:param name="bookId" value='<%=String.valueOf(book.getBookId())%>' />
</portlet:actionURL>
<liferay-ui:icon-delete url="<%=deleteBookURL %>" />
</liferay-ui:icon-menu>
</td> <% } } %> </table> </fieldset> <div>
<portlet:actionURL var="addBookURL">
<!-- 找到添加的页面 -->
<portlet:param name="operation" value="load" /> </portlet:actionURL>
<input type="button" value="添加" onclick="javascript:location.href='<%=addBookURL %>'"> </div> </form>

  2.mybook-add.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/init.jsp" %>
<portlet:actionURL var="addBookURL">
<!-- 执行add的操作 -->
<portlet:param name="operation" value="add" /> </portlet:actionURL> <form action="<%=addBookURL %>" method="post">
图书名称:<input type="text" name="bookName" /></br>
图书作者:<input type="text" name="bookAuthor"/></br>
出版社:<input type="text" name="bookAddress"/></br>
出版日期:<input type="text" name="bookDate"/></br>
图书价格:<input type="text" name="bookPrice"/></br> <input type="submit" value="提交"/>
<input type="reset" value="重置"/>
</form>

  3.mybook-edit.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/init.jsp" %> <%
//得到要修改的图书
Book book = (Book)renderRequest.getAttribute("book"); %> <portlet:actionURL var="editBookURL">
<portlet:param name="operation" value="editTrue" />
<portlet:param name="bookId" value='<%=book != null ? String.valueOf(book.getBookId()) : "0" %>' />
</portlet:actionURL> <form action="<%=editBookURL %>" method="post">
图书名称:<input type="text" name="bookName" value='<%=book != null ? String.valueOf(book.getBookName()):"" %>'/></br>
图书作者:<input type="text" name="bookAuthor" value='<%=book != null ? String.valueOf(book.getBookAuthor()) :"" %>'/></br>
出版社:<input type="text" name="bookAddress" value='<%=book != null ? String.valueOf(book.getBookAddress()):"" %>'/></br>
出版日期:<input type="text" name="bookDate" value='<%=book != null ? String.valueOf(book.getBookDate()):"" %>'/></br>
图书价格:<input type="text" name="bookPrice" value='<%=book != null ? String.valueOf(book.getBookPrice()):"" %>'/></br> <input type="submit" value="提交"/>
<input type="reset" value="重置"/>
</form>

  4.mybook-detail.jsp

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!-- 引入init.jsp -->
<%@ include file="/init.jsp"%>
<%
Book book = (Book)renderRequest.getAttribute("book");
%> <style>
#bookcontent{ } </style> <div id = "bookcontent">
<table>
<tr>
<td>图书名称</td>
<td>图书作者</td>
<td>出版地址</td>
<td>出版日期</td>
<td>图书价格</td>
</tr> <tr>
<td>
<%=book.getBookName() %>
</td> <td>
<%=book.getBookAuthor() %>
</td> <td>
<%=book.getBookAddress() %>
</td> <td>
<%=book.getBookDate() %>
</td> <td>
<%=book.getBookPrice() %>
</td> </tr> </table>
</div>

  终于结束了点击运行服务器,就可以实现了,下面动手试试吧!

用liferay实现的增删改查例子-book管理系统的更多相关文章

  1. spring boot2+jpa+thymeleaf增删改查例子

    参考这遍文章做了一个例子,稍微不同之处,原文是spring boot.mysql,这里改成了spring boot 2.Oracle. 一.pom.xml引入相关模块web.jpa.thymeleaf ...

  2. 初次尝试PHP——一个简单的对数据库操作的增删改查例子

    第一次学习PHP,很多人说PHP是最好的语言,学习了一点点,还不敢说这样的话,不过确实蛮好用的. 做了一个简单的对数据库的增删改查的操作,主要是将四种操作写成了独立的函数,之后直接调用函数.以下是代码 ...

  3. Java 实现一个 能够 进行简单的增删改查的 超市管理系统

    1. 首先编写一个 Fruitltem 的商品类, 描述 商品的基本信息. 代码如下: 保证详细, 运行的起来, 有什么 问题也可以评论留言. /* * 自定义类, 描述商品信息 * * 商品的属性: ...

  4. DBUtils 增删改查例子

    sql CREATE TABLE [dbo].[Person] ( , ) NOT NULL , ) COLLATE Chinese_PRC_CI_AS NULL , [age] [int] NULL ...

  5. JSP的一个增删改查例子和总结

    总结的几点: 1.在jsp中注意<%! %>声明代码块中的变量只会在项目开始的时候第一次运行jsp的时候执行一遍,有点类似于java类中的static代码块,所以如果是会改变的值不应该声明 ...

  6. MVC增删改查例子

    一.显示用户列表1.新建UserInfoController控制器 public ActionResult Index() { DataTable table = SQLHelper.ExecuteR ...

  7. Redis:五种数据类型的简单增删改查

    Redis简单增删改查例子 例一:字符串的增删改查 #增加一个key为ay_key的值 127.0.0.1:6379> set ay_key "ay" OK #查询ay_ke ...

  8. 一个在ASP.NET中利用服务器控件GridView实现数据增删改查的例子

    备注:这是我辅导的一个项目开发组的一个例子,用文章的方式分享出来,给更多的朋友参考.其实我们这几年的项目中,都不怎么使用服务器控件的形式了,而是更多的采用MVC这种开发模式.但是,如果项目的历史背景是 ...

  9. 前端的CRUD增删改查的小例子

    前端的CRUD增删改查的小例子 1.效果演示 2.相关代码: <!DOCTYPE html> <html lang="en"> <head> & ...

随机推荐

  1. sencha touch list 批量选择扩展(2013-7-29)

    扩展js代码 /* *list多选扩展 */ Ext.define('ux.SimpleList', { alternateClassName: 'simpleList', extend: 'Ext. ...

  2. nginx(一)----ubuntu14.04下安装nginx

    /** * lihaibo * 文章内容都是根据自己工作情况实践得出. *如有错误,请指正 *转载请注明出处 */ 此文章中用到的软件下载地址: 链接: http://pan.baidu.com/s/ ...

  3. C程序设计语言习题(1-12)

    统计行数.单词数,字符数的程序: #include<stdio.h> #define IN 1 /*在单词内*/ #define OUT 0 /*在单词外*/ int main() { i ...

  4. [工具] CintaNotes

    CintaNotes是一款非常轻巧实用的笔记软件,可看作EverNote轻量级替代品.CintaNotes只需1个exe,体积仅1MB,却拥有 EverNote易于收集.实时搜索.条状排列.tag分类 ...

  5. 【Win】使用L2TP出现809错误

    1.环境:win7/10 2.解决: a.修改注册表(新建一个文本文件,复制以下内容,保存后文件扩展名改为.reg,双击运行文件.) Windows Registry Editor Version 5 ...

  6. python---使用md5加密

    python中使用md5进行加密字符串: __author__ = 'Administrator' #-*- coding: utf-8 -*- import hashlib aa = ' #需要加密 ...

  7. 关于htc m9w更新后手机无限重启的解决办法

    更新htc sense7.0后,手机无限重启.网上搜了一下,是和谷歌框架冲突的原因,但是机子本身没有root,删除不了gms.只能死马当活马医,把能看到google应用都给删了,就解决了. 步骤: 长 ...

  8. CodeForces 832B Petya and Exam

    B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  9. CH6101 最优贸易【最短路】

    6101 最优贸易 0x60「图论」例题 描述 C国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市.任意两个城市之间最多只有一条道路直接相连.这 m 条道路中有一部分为单向通 ...

  10. java基础解析系列(六)---注解原理及使用

    java基础解析系列(六)---注解原理及使用 java基础解析系列(一)---String.StringBuffer.StringBuilder java基础解析系列(二)---Integer缓存及 ...