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
<c:if test="${not empty map[1]}"> | |
<c:if test="${map.containsKey(1)}"> | |
<c:if test="${ ! empty map[1]}"> | |
<c:if test="${not empty map.1}"> |
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
var getUrlParameters = function (name, url) { | |
if (!name) { | |
return undefined; | |
} | |
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); | |
url = url || location.search; | |
var regex = new RegExp('[\\?&#]' + name + '=?([^&#]*)', 'gi'), result, resultList = []; |
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
List<String> listOfStrings = new ArrayList<String>(); | |
listOfStrings.add("one"); | |
listOfStrings.add("two"); | |
Gson gson = new Gson(); | |
String json = gson.toJson(listOfStrings); | |
System.out.println(json); |
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
// allcolors.js | |
// https://github.com/bgrins/devtools-snippets | |
// Print out CSS colors used in elements on the page. | |
(function () { | |
var allColors = {}; | |
var props = ["background-color", "color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color"]; | |
var skipColors = { "rgb(0, 0, 0)": 1, "rgba(0, 0, 0, 0)": 1, "rgb(255, 255, 255)": 1 }; | |
[].forEach.call(document.querySelectorAll("*"), function (node) { |
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
.list-item:before { | |
display: inline-block; | |
content: ''; | |
vertical-align: middle; | |
background-color: red; | |
width: 5px; | |
height: 7px; | |
margin: 0 4px 0.125em 5px; | |
} |
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
map.values().toArray()[0] |
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
Unchecked | |
ArrayIndexOutOfBoundsException | |
ClassCastException | |
IllegalArgumentException | |
IllegalStateException | |
NullPointerException | |
NumberFormatException | |
AssertionError | |
ExceptionInInitializerError | |
StackOverflowError |
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
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>(); | |
ResultSetMetaData metaData = resultSet.getMetaData(); | |
int columnCount = metaData.getColumnCount(); | |
while (resultSet.next()) { | |
Map<String, Object> columns = new LinkedHashMap<String, Object>(); | |
for (int i = 1; i <= columnCount; i++) { | |
columns.put(metaData.getColumnLabel(i), resultSet.getObject(i)); | |
} |
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
<div class="image"> | |
<img src="xy.jpg" alt="" /> | |
<img class="hoverimage" src="xy_hover.jpg" alt="" /> | |
</div> | |
CSS: | |
.image { position: relative; width: 184px; height: 219px; } | |
.hoverimage { position: absolute; top: 0; left: 0; display: none; } | |
.image:hover .hoverimage { display: block; } |
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
Math.random().toString(36).slice(2,7); |
OlderNewer