This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2015 Chi Ngo ([email protected], chingovan.blogspot.com) | |
*/ | |
package com.blogspot.chingovan.tutorial.model; | |
import java.util.Date; | |
/** | |
* @author chinv | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2015 Chi Ngo ([email protected], chingovan.blogspot.com) | |
*/ | |
package com.blogspot.chingovan.tutorial.search; | |
import javax.portlet.PortletRequest; | |
import com.blogspot.chingovan.tutorial.model.Student; | |
import com.liferay.portal.kernel.dao.search.DisplayTerms; | |
import com.liferay.portal.kernel.util.ParamUtil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2015 Chi Ngo ([email protected], chingovan.blogspot.com) | |
*/ | |
package com.blogspot.chingovan.tutorial.search; | |
import javax.portlet.PortletRequest; | |
import com.liferay.portal.kernel.util.ParamUtil; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2015 Chi Ngo ([email protected], chingovan.blogspot.com) | |
*/ | |
package com.blogspot.chingovan.tutorial.search; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@include file="/html/searchtutorial/init.jsp"%> | |
<% | |
PortletURL portletURL = renderResponse.createRenderURL(); | |
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL); | |
%> | |
<liferay-ui:search-container searchContainer="<%= studentSearchContainer %>"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@include file="/html/searchtutorial/init.jsp"%> | |
<% | |
PortletURL portletURL = renderResponse.createRenderURL(); | |
String portletURLString = portletURL.toString(); | |
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL); | |
%> | |
<aui:form action="<%= portletURLString %>" method="post" name="fm"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@include file="/html/searchtutorial/init.jsp"%> | |
<% | |
String redirect = ParamUtil.getString(request, "redirect"); | |
StudentSearchContainer searchContainer = (StudentSearchContainer)request.getAttribute("liferay-ui:search:searchContainer"); | |
StudentDisplayTerms displayTerms = (StudentDisplayTerms)searchContainer.getDisplayTerms(); | |
%> | |
<aui:row> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = int(input("Nhap so vong lap :")) | |
s = 1; | |
t = 1; | |
for i in range(1, n + 1): | |
t = t / i | |
s = s + t | |
print("e = ", s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eps = float(input("Nhap so sai so :")) | |
s = 1 | |
t = 1 | |
i = 1 | |
while t > eps: | |
t = t / i | |
i = i + 1 | |
s = s + t | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = float(input("Nhap vao x: ")); | |
n = int(input("Nhap vao so vong lap: ")) | |
s = 1 | |
t = 1 | |
for i in range(1, n + 1): | |
t = t*x/i | |
s = s + t | |
print("e^%f = %f"%(x, s)) |
OlderNewer