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
public void testUpdateLayout() { | |
PageData page = createPage(createSite(SiteType.PORTAL, "test_layout_page"), "page", new PageState.Builder().build()); | |
createElements(page, FOO_PORTLET, BAR_PORTLET); | |
String layoutId = page.layoutId; | |
NodeContext<Element, ElementState> pageContext = layoutService.loadLayout(Element.MODEL, layoutId, null); | |
assertEquals(2, pageContext.getNodeSize()); | |
Element foo = pageContext.getNode(0); | |
Element bar = pageContext.getNode(1); | |
testInfo(foo, bar); |
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
#!/bin/bash | |
ENV_DIR=~/.environments | |
ENV_HOME=$ENV_DIR | |
#Process JAVA with JDK | |
DEFAULT_JDK_VERSION=7 | |
DEFAULT_JDK_HOME=$ENV_DIR/jdk | |
function setup_jdk() { | |
#Process old version of jdk |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<!--Load the AJAX API--> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
// Load the Visualization API and the piechart package. | |
google.load('visualization', '1.0', {'packages':['corechart']}); |
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
config: { | |
title: "Biểu đồ về cái gì đó", | |
width: 900, // Độ rộng biểu đồ | |
height: 400, // Chiều cao biểu đồ | |
groupWidth: 0, // Dộ rộng cột của biểu đồ | |
isStacked: false | |
}, | |
columns: ['Cột 1', 'Cột 2'], | |
data: [ | |
['2014', 10, 12], |
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
{ | |
gists: [ | |
'https://api.github.com/gists/b346dd60a98a3c686c80', | |
'https://api.github.com/gists/90c293c95139061d06f2' | |
], | |
charts:[ | |
] | |
} |
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
{ | |
config: { | |
title: "Bội chi ngân sách Nhà nước 2014", | |
width: 1000, // Độ rộng biểu đồ | |
height: 300, // Chiều cao biểu đồ | |
groupWidth: 0, // Dộ rộng cột của biểu đồ | |
isStacked: false | |
}, | |
columns: ['Bội chi ngân sách'], | |
data: [ |
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
<?php | |
/** | |
* PDO Session Handler | |
* @author Daniel15 <dan.cx> | |
* | |
* modificata da carlo@chierotti.net | |
* per gestire la scadenza della sessione | |
* | |
* testata in PHP53, se si passa a PHP54 si potrebbe utilizzare |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
#!/bin/bash | |
#nttuyen | |
USER_ID=47054 | |
cache_file=/tmp/key_cache | |
function dl_keys { | |
curl -m 10 -sf https://gitlab.com/api/v4/users/$1/keys | jq -r '.[].key' | |
} |
OlderNewer