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 React, {React.useState} from 'react'; | |
// import logo from './logo.svg'; | |
// import './App.css'; | |
function PollWidgetForm(props){ | |
let [ans, setAns] = React.useState(-1) | |
// console.log(props.variants) | |
let handleSubmit = (event) => { | |
event.preventDefault(); |
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
{ | |
"canv":{ | |
"w":64272, | |
"h":65011 | |
}, | |
"real":{ | |
"w":29980, | |
"h":29980 | |
}, | |
"photos":[ |
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
location /external/api/copter/telemetry.php { | |
rewrite ^/external/api/copter/telemetry.php?(.+)$ /mcollection/$1 last; | |
} |
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
<?php | |
use Symfony\Component\PropertyAccess\PropertyAccessor; | |
use Symfony\Component\PropertyAccess\PropertyPath; | |
/** | |
* A property accessor that allows you to rewrite a property path for setters and getters. | |
*/ | |
class CustomPropertyAccessor extends PropertyAccessor | |
{ | |
/** |
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
(ns clj-spec-playground | |
(:require [clojure.string :as str] | |
[clojure.spec :as s] | |
[clojure.test.check.generators :as gen])) | |
;;; examples of clojure.spec being used like a gradual/dependently typed system. | |
(defn make-user | |
"Create a map of inputs after splitting name." | |
([name email] |
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
(ns com.redhat.qe.handler | |
(:import [javax.naming NamingException])) | |
(def *handlers* []) | |
(def *error* nil) | |
(defn- e-to-map [e] | |
{:msg (.getMessage e) :type (class e) :exception e}) | |
(defn- wrapped? [e] |
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
MCollection.connect( | |
'https://ss.lesohranitel.ru/mcollections/', | |
{ | |
token: '', | |
wsSync: true, | |
system: 'ss.lesohranitel.ru', | |
} | |
) | |
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
:dependencies [[org.clojure/clojure "1.8.0"] | |
[org.jxls/jxls "2.4.2"] | |
[org.jxls/jxls-poi "1.0.13" :exclusions [org.jxls/jxls]]]) | |
(import [org.jxls.util JxlsHelper]) | |
(import [org.jxls.common Context]) | |
(require '(clojure.java [io :as io])) | |
;; http://jxls.sourceforge.net/xls/object_collection_template.xls |
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
(use '[clojure.contrib.shell-out :only [sh]]) | |
(defn sh-timeout [timeout-in-seconds & args] | |
(.get | |
(future-call #(apply sh args)) | |
timeout-in-seconds | |
(java.util.concurrent.TimeUnit/SECONDS))) |
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
(ns eventsample.core | |
(:require [robert.hooke :refer [add-hook]])) | |
(def ^:dynamic id nil) | |
(def ^:dynamic parent-id nil) | |
(def db (atom {})) | |
(defn save [id state] | |
(swap! db update-in [(str id)] #(merge % state))) |