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 copyUrl = (e) => { | |
e.clipboardData.setData('text/plain', document.title + ' ' + location.href); | |
e.preventDefault(); | |
document.removeEventListener('copy', copyUrl); | |
} | |
document.addEventListener('copy', copyUrl); | |
document.execCommand('copy'); |
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.example; | |
import java.util.Comparator; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class MeatMenu { | |
private final List<Menu> allMenus; |
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
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.ArrayList; | |
import java.util.List; |
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
$(function() { | |
$('#content') | |
.css({ | |
'width': 'auto', | |
'padding-right': '20px' | |
}); | |
var sidebar = $('#sidebar'); | |
var sidebarBaseHeight = sidebar.height(); |
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
// Path pattern: /issues/ | |
// Type : JavaScript | |
$(function() { | |
$('.check_box_group') | |
.each(function() { | |
var checkBoxGroup = $(this); | |
checkBoxGroup.hide(); | |
var checkedValueLine = |
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 static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { | |
if (source == null) throw Error.ArgumentNull("source"); | |
if (predicate == null) throw Error.ArgumentNull("predicate"); | |
foreach (TSource element in source) { | |
if (predicate(element)) return true; | |
} | |
return false; | |
} | |
public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) { |
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
int[] empty = new int[0]; | |
Console.WriteLine( | |
empty.Any(x => x % 2 == 0)); // => False | |
Console.WriteLine( | |
empty.All(x => x % 2 == 0)); // => True | |
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 clipboard = require("sdk/clipboard"); | |
// 設定 | |
clipboard.set("xxxx"); | |
// 取得 | |
var contents = clipboard.get(); |
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
const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"] | |
.getService(Components.interfaces.nsIClipboardHelper); | |
// 設定 | |
gClipboardHelper.copyString("xxxx"); |
NewerOlder