Paste 77726
anonymous on April 19, 2014
1
2
3
4
5
(defn bfsfun [u uu]
  (if (empty? u) uu
    (let [item (first u)]
      (let [n (first item) m (last item)]   ; <- let   n and m
        (prn (list n m))                    ; <- print n and m
more...

Paste 77725
anonymous on April 19, 2014
1
2
3
4
5
(defn bfsff [u uu]
  (if (empty? u) uu
    (let [item (first u)]
      (let [n (first item) m (last item)]
        (prn (list n m))
more...

Paste 77724
anonymous on April 19, 2014
1
2
3
4
5
(println (let [v '(1 2 3)] (let [vv '()]
                            ((
                              fn [a uu]
                              (cond
                                (empty a) uu
more...

Paste 77723
anonymous on April 19, 2014
1
2
3
4
5
(println (let [v '(1 2 3)] (let [vv '()]  ( 
                                           (fn [a uu] 
                                             (cond 
                                              (empty a) uu 
                                              :else  
more...

Paste 77722
anonymous on April 19, 2014
1
2
3
4
(defn fun [a uu]
  (cond
    (empty? a) uu
    :else (recur (pop a) (conj uu (first a)))))
more...

Paste 77721
anonymous on April 19, 2014
1
2
3
4
5
<notostraca> (let [radix 10 mc (java.math.MathContext. 2000) sqrt (fn
[n] (loop [n n g (BigDecimal. 1 mc)] (let [next-guess (.divide (.add
(.divide n g mc) g mc) (BigDecimal. 2 mc) mc)] (if (.equals g
next-guess) g (recur n next-guess))))) results (map #(read-string (str
radix "r" %)) (.toString (.toBigInteger (.multiply (sqrt (BigDecimal.
more...

Paste 77720
anonymous on April 19, 2014
1
2
3
4
5
(defn is-even? [n]
  (if (= n 0)
    true
    (not (is-even? (dec n)))))

Paste 77719
anonymous on April 19, 2014
1
2
3
4
5
Restoring: 217441, done.
        Command being timed: "/home/pr/bin/bup/no-mem-fix/bin/bup -d bup-repos/.old/Fantom-UpTo201309/ restore -vC Fantom-UpTo201309 master"
        User time (seconds): 2596.44
        System time (seconds): 903.61
        Percent of CPU this job got: 4%
more...

Paste 77718
anonymous on April 19, 2014
1
2
3
4
5
#!/usr/bin/env python2

import argparse
import json
import os
more...

Paste 77715
anonymous on April 19, 2014
1
2
3
4
;; kaz_yos's solution to Find the odd numbers
;; https://4clojure.com/problem/25

filter odd?

Paste 77714
anonymous on April 19, 2014
1
2
3
4
5
diff --git a/configure.ac b/configure.ac
index e56a55a..098b300 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,7 +147,7 @@ AC_PROG_INSTALL
more...

Paste 77713
anonymous on April 19, 2014
1
2
3
127.0.0.1localhost¬
127.0.0.1http://myapp.com¬                                                                                                                                                  
127.0.0.1http://www.myapp.com

Paste 77712
anonymous on April 19, 2014
1
2
3
4
5
<notostraca> (let [radix 10 mc (java.math.MathContext. 2000) sqrt (fn
[n] (loop [n n g (BigDecimal. 1 mc)] (let [next-guess (.divide (.add
(.divide n g mc) g mc) (BigDecimal. 2 mc) mc)] (if (.equals g
next-guess) g (recur n next-guess)))))] (map #(read-string (str radix
"r" %)) (butlast (.toString (.toBigInteger (.multiply (sqrt
more...

Paste 77711
anonymous on April 19, 2014
1
2
3
4
5
(defn authorize [handler]
  (fn [req]
    (if-let [auth (friend/current-authentication req)]
      (handler req)
      (app/catchall req))))

Paste 77710
anonymous on April 19, 2014
1
2
3
4
5
user> (defn call-once [f]
         (let [uncalled (gensym "not called yet")
               called? (atom uncalled)]
           (fn [& args]
               (swap! called?
more...

Paste 77709
anonymous on April 19, 2014
1
2
3
4
5
<notostraca> (let [radix 10 mc (java.math.MathContext. 2000) sqrt (fn
[n] (loop [n n g (BigDecimal. 1 mc)] (let [next-guess (.divide (.add
(.divide n g mc) g mc) (BigDecimal. 2 mc) mc)] (if (.equals g
next-guess) g (recur n next-guess)))))] (map #(read-string (str radix
"r" %)) (butlast (.toString (.toBigInteger (.multiply (sqrt
more...

Paste 77708
anonymous on April 19, 2014
1
2
3
4
sudo iptables -L -t nat -n
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
more...

Paste 77707
anonymous on April 19, 2014
1
2
3
4
#!/usr/bin/env python2

def is_callable(f):
    return hasattr('__call__', f)
more...

Paste 77706
anonymous on April 19, 2014
1
2
3
4
#!/usr/bin/env python2

def is_callable(f):
    hasattr('__call__', f)
more...

Paste 77705
anonymous on April 19, 2014
1
2
3
4
#!/usr/bin/env python2

def is_callable(f):
    hasattr('__call__', f)
more...

Did you know? CLOSE

  • There are keyboard shortcuts!
    • When Creating A Paste
      • ALT+P Toggle Private
      • CTRL+Enter Create Paste
      • ALT+W Toggle word wrap
    • When Viewing A Paste
      • ALT+G Go to a line
      • ALT+CTRL+E Edit the paste
      • ALT+R Show the raw code
  • There are URL options!
    • When Creating A Paste
      • ?lang=Javascript to default to javascript
    • When Viewing A Paste
      • #L-N Jump to line number N
?