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
void Main() | |
{ | |
string[] dirNames = { @"C:\WINDOWS\Microsoft.NET\assembly", @"C:\WINDOWS\assembly" }; | |
SearchMemberNames(dirNames, t => t.Name.Length > 100); | |
} | |
void SearchMemberNames(string[] dirNames, System.Func<MemberInfo, bool> judge) | |
{ | |
foreach (var dir in dirNames) | |
System.Threading.Tasks.Parallel.ForEach(Directory.EnumerateFiles(dir, "*.dll", SearchOption.AllDirectories), f => |
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
// LINQ | |
var items = htmlDoc.DocumentNode.Descendants("div") | |
.Where(e => e.GetAttributeValue("class", "") == "resultItem"); | |
SearchResults = items.Select(r => { | |
string kind=r.Descendants("div").Where(e=>e.GetAttributeValue("class", "")=="resultKind") | |
.FirstOrDefault()?.InnerText; | |
string name=r.Descendants("div").Where(e=>e.GetAttributeValue("class","")=="resultName") | |
.FirstOrDefault()?.InnerText; | |
// XPath |
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
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ | |
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.construc |
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
chrome.bookmarks.getRecent(1,function(x){ | |
if(x.length == 0) | |
alert("No bookmark"); | |
else | |
alert(x[0].title); | |
}); |
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
@font-face { | |
font-family: 'Capital-A'; | |
src: url('http://your-website?A'); | |
unicode-range: U+0041; | |
} | |
@font-face{ | |
font-family:'Capital-B'; | |
src:url('http://your-website?CB'); | |
unicode-range:U+0042; | |
} |
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
/* Chocolatey Fix*/ | |
body{ | |
font-family:sans-serif; | |
} | |
.message{ | |
font-size:inherit; | |
color:black; | |
} |
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
rect.day[fill="#c6e48b"]{ | |
fill:#ffbb00 !important; | |
} | |
rect.day[fill="#7bc96f"]{ | |
fill:#7cbb00 !important; | |
} | |
rect.day[fill="#239a3b"]{ | |
fill:#00a1f1 !important; | |
} | |
rect.day[fill="#196127"]{ |
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 csv | |
def writeLi(x,ind): | |
print("<li>") | |
print("<div>%s [%s] %s %s %s</div>" % (" " * ind , x["id"],x["title"],x["name"],x["time"],)) | |
print(x["body"]) | |
print("<ul>") | |
if "children" in x: | |
for c in x["children"]: | |
writeLi(c,ind+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
package main | |
import ( | |
"bytes" | |
"log" | |
"net/http" | |
"strconv" | |
"time" | |
"github.com/gin-gonic/gin/render" |
OlderNewer