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/combine/init.jsp"%> | |
<% | |
PortletURL portletURL = renderResponse.createRenderURL(); | |
String portletURLString = portletURL.toString(); | |
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL); | |
%> |
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/combine/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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd"> | |
<service-builder package-path="com.blogspot.chingovan.tutorial.combine"> | |
<author>chinv</author> | |
<namespace>combine</namespace> | |
<entity name="Student" local-service="true" remote-service="true" | |
table="Student"> | |
<!-- PK fields --> |
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 (c) 2000-2013 Liferay, Inc. All rights reserved. | |
* | |
* This library is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation; either version 2.1 of the License, or (at your option) | |
* any later version. | |
* | |
* This library is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
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 (c) 2000-2013 Liferay, Inc. All rights reserved. | |
* | |
* This library is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation; either version 2.1 of the License, or (at your option) | |
* any later version. | |
* | |
* This library is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
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/combine/init.jsp"%> | |
<% | |
PortletURL portletURL = renderResponse.createRenderURL(); | |
String portletURLString = portletURL.toString(); | |
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL); | |
StudentDisplayTerms displayTerms = (StudentDisplayTerms)studentSearchContainer.getDisplayTerms(); | |
%> |
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
a = [3, 6, 9, 2, 6, 8, 9, 1, 7, 21, 7, 12] | |
for i in range(1, len(a)): | |
t = a[i]; | |
index = i; | |
for j in range(i -1, -1, -1): | |
if a[j] > t: | |
a[j + 1] = a[j] | |
index = j |
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
/* | |
* insertion_sort.c | |
* | |
* Created on: Jul 12, 2015 | |
* Author: chinv | |
*/ | |
#include "stdio.h" | |
void printArray(int a[], int n) { |
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.hook.events; | |
import java.util.List; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpSession; |
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
# Quick sort alogrithm | |
# Author: Chi Ngo ([email protected] - chingovan.blogspot.com) | |
def quicksort(mylist, sIndex, eIndex): | |
# Neu chi co mot phan tu hoac eIndex < sIndex | |
if eIndex <= sIndex: | |
return | |
else: | |
pivot = mylist[int((eIndex + sIndex) / 2)] |