This file contains hidden or 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 javax.xml.transform.stream.StreamSource | |
| import javax.xml.validation.Schema | |
| import javax.xml.validation.SchemaFactory | |
| import javax.xml.validation.{Validator=>JValidator} | |
| import org.xml.sax.SAXException | |
| object Validator { | |
| def main(args: Array[String]) { | |
| require(args.size >= 2, "Params: xmlFile, xsdFile") | |
| val result = |
This file contains hidden or 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
| ;; uniq-lines | |
| ;; ---------- | |
| ;; This is something of a companion to the built-in sort-lines function. | |
| ;; Like the uniq utility, this removes duplicate lines from the region. It | |
| ;; is best used after sorting a region. | |
| ;; | |
| (defun uniq-lines (start end) | |
| "Removes duplicate lines from the selected region." | |
| (interactive "*r") | |
| (goto-char start) |
This file contains hidden or 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
| /* | |
| CHANGELOG | |
| - add annotation for param names | |
| */ | |
| import javax.jws.{WebService, WebParam} | |
| import javax.jws.soap.SOAPBinding | |
| import SOAPBinding.Style | |
| import javax.xml.ws.Endpoint |
This file contains hidden or 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
| javascript:(function(){f='http://www.delicious.com/save?url='+encodeURIComponent(window.location.href.replace(/utm_source=[^&]+&?|utm_medium=[^&]+&?|utm_campaign=[^&]+&?|utm_content=[^&]+&?/g, "").replace(/[?&]+$/, ""))+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=6&';a=function(){if(!window.open(f+'noui=1&jump=doclose'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})() |
This file contains hidden or 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
| javascript:(function(){f='http://www.delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'¬es='+encodeURIComponent(''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text))+'&v=6&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv6','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})() |
This file contains hidden or 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
| val feed = xml.XML.load(new java.net.URL("http://feeds.delicious.com/v2/rss/some_user/some_tag")) | |
| for (item <- feed \\ "item") { | |
| println(item \\ "title" text) | |
| println(item \\ "link" text) | |
| } |
This file contains hidden or 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
| object ShutDown { | |
| def main(args: Array[String]) { | |
| sys.ShutdownHookThread { | |
| println("exiting") | |
| } | |
| println("begin sleep") | |
| Thread.sleep(5000L) | |
| println("done sleeping") |
This file contains hidden or 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
| val varPattern = """\$\{([^}]*)}""".r | |
| def template(text: String, vars: Map[String, String]) = | |
| varPattern replaceSomeIn (text, m => vars get (m group 1)) |
This file contains hidden or 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
| javascript:(function(){q=location.href.replace(/utm_source=[^&]+&?|utm_medium=[^&]+&?|utm_campaign=[^&]+&?|utm_content=[^&]+&?/g, "").replace(/[?&]+$/, "");if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;full_url='https://pinboard.in/add?url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p); a=function(){if(!window.open(full_url))location.href=full_url};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(); |
This file contains hidden or 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
| if [ -z $1 ] || [ -z $2 ] | |
| then | |
| echo "Usage: autocompile <compiler-command> <pattern>" | |
| echo "Examaple: autocompile fsc *.scala" | |
| exit | |
| fi | |
| while true | |
| do | |
| inotifywait -q -e modify,attrib --format='%w' --fromfile <( find . -iname "$2") | while read FILE |
OlderNewer