Skip to content

Instantly share code, notes, and snippets.

View chingovan's full-sized avatar

Ngô Văn Chí chingovan

View GitHub Profile
<%@page import="com.liferay.portal.util.SessionClicks"%>
<%@include file="/html/init.jsp"%>
<%
String param = ParamUtil.getString(request, "param");
if( param != null && !param.isEmpty()) {
SessionClicks.put(request, "status", param);
}
<%@ 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="java.util.List"%>
<%@page import="java.util.ArrayList"%>
# type should be e-mail or screenname
type=e-mail
# This is the webId of the company (not of communities or organizations!), if you have 1 instance, it's webId most of the time
webId=liferay.com
# This is the virtualhost of the company (not of communities or organizations!), if you have 1 instance, it's localhost most of the time
virtualhost=localhost
# Read only if the type is e-mail
package com.blogspot.chingovan.passwordchanger;
import java.util.Date;
import java.util.Properties;
import com.liferay.portal.kernel.events.ActionException;
import com.liferay.portal.kernel.events.SimpleAction;
import com.liferay.portal.model.Company;
import com.liferay.portal.model.User;
import com.liferay.portal.service.UserLocalServiceUtil;
#include "stdio.h"
#include "stdlib.h"
#define ROW 6
#define COL 4
int STEP_X[4] = {-1, 1, 1, -1};
int STEP_Y[4] = {-1, -1, 1, 1};
int isOutOfRange(int x, int y) {
#include "stdio.h"
#include "stdlib.h"
#define ROW 6
#define COL 4
int isOutOfRange(int x, int y) {
if( x < 0 || ROW <= x) {
/**
* Copyright 2015 Chi Ngo (chingovan@gmail.com, chingovan.blogspot.com)
*/
package com.blogspot.chingovan.customquery.service.persistence;
import java.util.ArrayList;
import java.util.List;
import com.blogspot.chingovan.customquery.model.Post;
import com.blogspot.chingovan.customquery.model.impl.PostImpl;
package com.blogspot.chingovan.tutorial.ajax;
import java.io.IOException;
import java.io.PrintWriter;
import javax.portlet.PortletException;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
import com.blogspot.chingovan.tutorial.ajax.model.Student;
<%@include file="/html/ajax/init.jsp" %>
<input name="searchInput" id="searchInput" type="text" />
<button id="searchButton" onClick="javascript: onSearch();" type="button">Search</button>
<br />
<table width="100%">
<tr>
<%@ include file="/html/taglib/bs/book/init.jsp" %>
<table>
<tr>
<td rowspan="5">
<img src="<%= cover%>" alt="cover" width="210px" height="230px"/>
</td>
<td colspan="2" style="font-weight: bold;">
<%= title.toUpperCase() + "-" + edition%>
</td>