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(0, len(a)-1): | |
for j in range(i, len(a)): | |
if a[i] > a[j]: | |
t = a[i]; | |
a[i] = a[j]; | |
a[j] = 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
a=[3, 6, 9, 2, 6, 8, 9, 1, 7, 21, 7, 12] | |
for i in range(0, len(a)-1): | |
minValue = a[i]; | |
k = i; | |
for j in range(i, len(a)): | |
if minValue > a[j]: | |
minValue = a[j]; | |
k = 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
/* | |
* selection_sort_1.c | |
* | |
* Created on: Jul 9, 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
/* | |
* selection_sort_2.c | |
* | |
* Created on: Jul 9, 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
package com.blogspot.chingovan.tutorial.combine.portlet; | |
import com.liferay.util.bridges.mvc.MVCPortlet; | |
/** | |
* Portlet implementation class CombinePortlet | |
*/ | |
public class CombinePortlet extends MVCPortlet { | |
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 2015 Chi Ngo ([email protected], chingovan.blogspot.com) | |
*/ | |
package com.blogspot.chingovan.tutorial.combine.search; | |
import javax.portlet.PortletRequest; | |
import com.blogspot.chingovan.tutorial.combine.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.combine.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.combine.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
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> | |
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme"%> | |
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui"%> | |
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui"%> | |
<%@page import="javax.portlet.PortletURL"%> | |
<%@page import="com.liferay.portal.kernel.util.ParamUtil"%> | |
<%@page import="com.blogspot.chingovan.tutorial.combine.search.StudentDisplayTerms"%> | |
<%@page import="com.blogspot.chingovan.tutorial.combine.search.StudentSearchContainer"%> |