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 baseHeight = 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
$(function() { | |
$('#top-menu>ul') | |
.append('<li><a href="/projects/project1">Project1</a></li>'); | |
})(); |
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(){ | |
var userUrl = $("div#loggedas a").attr("href"); | |
$("a[href='" + userUrl + "']").css({ | |
"font-size": "150%", | |
}); | |
}); |
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
#top-menu { | |
background-color: #006400; /* dark green */ | |
} | |
#header { | |
background-color: #008000; /* green */ | |
} |
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 = Cc["@mozilla.org/widget/clipboard;1"].createInstance(Ci.nsIClipboard); | |
var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable); | |
trans.addDataFlavor("text/unicode"); | |
clipboard.getData(trans, clipboard.kGlobalClipboard); | |
var str = {}; | |
var strLength = {}; |
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"); |
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
[CoverUpException] | |
public class Target : ContextBoundObject | |
{ |