Skip to content

Instantly share code, notes, and snippets.

<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@narcotics726
narcotics726 / VBS Send(ShortCut)To
Created March 22, 2013 17:48
Right click and "Send(ShortCut)To:DestPath" 发送快捷方式到:
Set unNamedArguments = WScript.Arguments.UnNamed
Set WshShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strFolder="X:/Path" 'your dest path
for count=0 to wscript.arguments.count-1 Step 1
filename = unNamedArguments.Item(count)
Set objFile = objFSO.GetFile(filename)
Set oShellLink = WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=filename
oShellLink.WindowStyle=1
@narcotics726
narcotics726 / gist:5045718
Created February 27, 2013 06:40
Nested lmbda expression to find or remove repeated collection item within a few lines 利用嵌套lambda表达式快速查找或移除重复集合项
List<string> listA = new List<string>(){"1","2","3","4"};
List<string> listB = new List<string>(){"1","3","5"};
List<string> listAWithoutRepeatedItemsInListB = listA.RemoveAll(objA=>(listB.Exist(objB=>objB==objA)));
//result: "2","4"
List<string> listAllDiffItems = new List<string>();
listAllDiffItems.AddRange(ListA.FindAll(objA=>(!listB.Exist(objB=>objB==objA))));
listAllDiffItems.AddRange(ListB.FindAll(objB=>(!listA.Exist(objA=>objA==objB))));
//result: "2","4","5"