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
#PYP | |
ls -l | pyp "pp[5:11:2] | whitespace[2], w[-1] | p.replace('hello','goodbye') | p.title(),'is splendid'" | |
#AWK/SED | |
ls -l | awk 'NR>=5 && NR<11 {print $3,$9}' | sed 'n;d' | sed -e 's/hello/goodbye/g' -re 's/(^| )([a-z])/\1\u\2/g' -e 's/$/ is splendid/' | |
#Also using Record stream | |
ls -l |awk 'NR>=5 && NR<11' | sed 'n;d'|sed -r 's/\s+/,/g'| sed 's/hello/goodbye/g' | recs-fromcsv | recs-eval 'ucfirst({{2}})." ".ucfirst({{8}})." is splendid"' |
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
(defn insert [l k] | |
"Function to do insert in sorted order" | |
(concat (filter #(< % k) l) [k] (filter #(> % k) l))) | |
(defn isort [l] | |
"Insertion sort" | |
(loop [r [] | |
l l] | |
(if (empty? l) | |
r |
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
;; jaskirat's solution to The Big Divide | |
;; https://4clojure.com/problem/148 | |
(fn [n a b] | |
(let [e #(quot (- n 1) %) | |
f #(* % (/ (* (e %) (inc (e %))) 2)) | |
x (f a) | |
y (f b) | |
z (f (* a b))] | |
(- (+ x y) z))) |
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
$.editable.addInputType( 'datepicker', { | |
/* create input element */ | |
element: function( settings, original ) { | |
var form = $( this ), | |
input = $( '<input />' ); | |
input.attr( 'autocomplete','off' ); | |
form.append( input ); | |
form.append('<input id=jedate_ type=hidden value=false>') | |
return input; |
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
>>> ping hsejiv.blogspot.com | |
Pinging blogspot.l.google.com [209.85.153.132] with 32 bytes of data: | |
Request timed out. | |
Ping statistics for 209.85.153.132: | |
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), | |
>> tracert 209.85.153.132 |
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
@echo off | |
rem This script was automatically generated by Leiningen. | |
setLocal | |
if "x%JVM_OPTS%" == "x" set JVM_OPTS=%JAVA_OPTS% | |
set CLASSPATH="%USERPROFILE%\.m2\repository\swank-clojure\swank-clojure\1.3.0-SNAPSHOT\swank-clojure-1.3.0-SNAPSHOT.jar;%USERPROFILE%\.m2\repository\org\clojure\clojure\1.2.0\clojure-1.2.0.jar" | |
set VERSION="swank.swank" |
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
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) | |
Dim m As Variant | |
Dim strBody As String | |
Dim intIn As Long | |
Dim intAttachCount As Integer, intStandardAttachCount As Integer | |
On Error GoTo handleError | |
'Edit the following line if you have a signature on your email that includes images or other files. Make intStandardAttachCount equal the number of files in your signature. |