This file contains hidden or 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
<%@page import="com.blogspot.chingovan.database.service.StudentLocalServiceUtil"%> | |
<%@page import="com.blogspot.chingovan.database.model.Student"%> | |
<%@ include file="./init.jsp" %> | |
<% | |
final DateFormat DD_MM_YYYYY = new SimpleDateFormat("dd/MM/yyyy"); | |
final String DATE_EMPTY_FORMAT = "--/--/----"; | |
final String FEMALE = LanguageUtil.get(request, "database-portlet.student-list.gender.female"); | |
final String MALE = LanguageUtil.get(request, "database-portlet.student-list.gender.male"); | |
List<Student> students = StudentLocalServiceUtil.getStudents(QueryUtil.ALL_POS, QueryUtil.ALL_POS); |
This file contains hidden or 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.firstreport; | |
import java.io.FileNotFoundException; | |
import java.util.HashMap; | |
import net.sf.jasperreports.engine.JRException; | |
import net.sf.jasperreports.engine.JasperCompileManager; | |
import net.sf.jasperreports.engine.JasperExportManager; | |
import net.sf.jasperreports.engine.JasperFillManager; | |
import net.sf.jasperreports.engine.JasperPrint; |
This file contains hidden or 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.chingovan.liferay7.test.portlet; | |
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet; | |
import javax.portlet.Portlet; | |
import org.osgi.service.component.annotations.Component; | |
/** | |
* @author ChiNV |
This file contains hidden or 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
jdbc.default.driverClassName=org.postgresql.Driver | |
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal7 | |
jdbc.default.username=postgres | |
jdbc.default.password=123456 | |
jdbc.default.maxPoolSize=100 | |
jdbc.default.minPoolSize=10 | |
jdbc.default.numHelperThreads=10 |
This file contains hidden or 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
public class Point { | |
private int x; | |
public Point() { | |
} | |
public int getX() { | |
return x; | |
} | |
This file contains hidden or 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
public class ThreeRef { | |
public static void main(String[] argv) { | |
Point a = new Point(); | |
a.setX(10); | |
Point b = a; | |
Point c = b; | |
System.out.println("a: " + a.getX() + ", b: " + b.getX() + ", c: " + c.getX()); | |
b.setX(100); | |
System.out.println("a: " + a.getX() + ", b: " + b.getX() + ", c: " + c.getX()); |
This file contains hidden or 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
//SwapInt | |
public static void swap(int a, int b) { | |
int temp = a; | |
a = b; | |
b = temp; | |
} | |
//SwapPoint | |
public static void swap(Point a, Point b) { |
This file contains hidden or 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
public class SwapPointRef { | |
public static void swap(Point a, Point b) { | |
int temp = a.getX(); | |
a.setX(b.getX()); | |
b.setX(temp); | |
} | |
public static void main(String[] argv) { |
This file contains hidden or 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
/** | |
* Created by ChiNV on 3/2/2017. | |
*/ | |
public class SwapPoint { | |
public static void swap(Point a, Point b) { | |
Point temp = a; | |
a = b; | |
b = temp; |
This file contains hidden or 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
public class SwapInt { | |
public static void swap(int a, int b) { | |
int temp = a; | |
a = b; | |
b = temp; | |
} | |
public static void main(String[] argv) { | |
int c = 1; |
NewerOlder