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
4−3−23. Use of Aircraft Lights | |
a. Aircraft position lights are required to be lighted on aircraft operated on the surface and in flight from sunset to sunrise. In addition, aircraft equipped with an anti−collision light system are required to operate that light system during all types of operations (day and night). However, during any adverse meteorological conditions, the pilot−in−command may determine that the anti−collision lights should be turned off when their light output would constitute a hazard to safety (14 CFR Section 91.209). Supplementary strobe lights should be turned off on the ground when they adversely affect ground personnel or other pilots, and in flight when there are adverse reflection from clouds. | |
b. An aircraft anti−collision light system can use one or more rotating beacons and/or strobe lights, be colored either red or white, and have different (higher than minimum) intensities when compared to other aircraft. Many aircraft have both a rotating beacon and a strobe light system. | |
c. T |
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
#!/bin/sh | |
function get_stream_url { | |
local intermediate_url=`curl -s $1 | awk -F '=' '/File1/ { print \$2 }'` | |
local stream_url=`curl -L -I -o /dev/null -s -w %{url_effective} $intermediate_url` | |
echo "$stream_url" | |
} | |
read -p "Left channel URL [KSTL App]: " left; | |
read -p "Right channel URL [KSTL Tower]: " right; | |
left_stream=$(get_stream_url ${left:-http://www.liveatc.net/play/kstl_app.pls}); |
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
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-90.15458106994629,38.57038097962376]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-90.50700187683105,38.72784024988615]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-90.428466796875,38.92870117926206]}}]} |
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
(defn search-weather [qparams remote-addr] | |
; three search methods are supported: | |
; zipcode=XXXXX return airports within proximity to zipcode | |
; geo=lat,lon return airports within proximity of coords | |
; ip=XXX.XXX.XXX.XXX airports within geolocation of IP address | |
; ip=@detect airports within geolocation of client IP | |
(when (= (get qparams :ip) "@detect") (assoc qparams :ip remote-addr)) | |
(let? [geoloc (get-location qparams) :is-not nil? :else (error-response "could not find location") | |
stations (db/find-stations (qparams :type) geoloc) :is-not nil? :else (error-response "no stations found for location") | |
reports (if |
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
(let [qparams {"cat" "meow"} | |
parammap {"cat" #(println "feline says" %), "dog" #(println "canine says" %)} | |
foundparam (into {} (filter #(contains? parammap (key %)) qparams))] | |
((get parammap (key (first foundparam))) (val (first foundparam)))) | |
;> feline says meow | |
; Cleaner? | |
(let [queryparams {:cat "meow", :cheese "nonsense"} | |
functionmap {:cat #(println "feline says" %), :dog #(println "canine says" %)} | |
selectedkey (first (select-keys functionmap (keys queryparams)))] |
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
; Thanks to http://stackoverflow.com/questions/18202661/casting-values-of-a-map-to-their-proper-types-in-clojure | |
; for the basis for this, I needed to also support cases where a value in `input` was empty when the cast occured. | |
(def input {:a "1" :b "2.5" :c "more" :d "string" :e "keys" :f ""}) | |
(def typetrans {:a #(Long/parseLong %) :b #(Double/parseDouble %) :f #(Integer/parseInt %)}) | |
(defn cast-fields [csvmap] | |
(reduce-kv | |
(fn [acc k v] |
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
; Given a map where the values are numeric types contained in a string | |
; Convert the values to the type defined in a map of field types. | |
(mapv #(case ({"one" :int, "point-two" :float} (key %)) | |
:int {(key %) (Integer/parseInt (val %))} | |
:float {(key %) (Float/parseFloat (val %))} | |
{(key %) (val %)}) ; For strings, just return the original values if there was no type defined | |
{"one" "1", "point-two" ".2", "three" "three"}) |
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
db.searches.remove() | |
db.searches.save( | |
{_id: 1, | |
"searches-size" : 3, | |
"searches" : [ | |
{"site" : "google", "q": "restaurants"}, | |
{"site" : "yahoo", "q" : "shoes"}, | |
{"site" : "bing", "q" : "cheap flights"} | |
] | |
} |
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
db.searches.update( | |
{ _id : 1 }, | |
{ $push : { "searches" : { "site" : "blekko.com", "q" : "mongodb" } } } | |
); | |
db.searches.update( | |
{ _id : 1 }, | |
{ $pop : { "searches" : -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
> db.searches.save( | |
{_id: 1, | |
"searches" : [ | |
{"site" : "google", "q": "restaurants"}, | |
{"site" : "yahoo", "q" : "shoes"}, | |
{"site" : "bing", "q" : "cheap flights"} | |
] | |
} | |
) | |
> db.searches.update( |