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
function Larry(date, summ, currency) { | |
try { | |
var formattedDate = Utilities.formatDate(date, Session.getScriptTimeZone(), "yyyy-MM-dd"); | |
var apiUrl = "https://nbg.gov.ge/gw/api/ct/monetarypolicy/currencies/en/json/?currencies=" + currency + "&date=" + formattedDate; | |
var response = UrlFetchApp.fetch(apiUrl); | |
var data = JSON.parse(response.getContentText()); | |
var rate = data[0].currencies[0].rate; | |
var summ = parseFloat(summ.toString().replace(",", ".")); | |
var result = summ * rate; | |
return result; |
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
'use client' | |
import { FunctionComponent } from 'react' | |
import { useSelectedLayoutSegments } from 'next/navigation' | |
import clsx from 'clsx' | |
import '../styles/globals.css' | |
type Props = { | |
children: JSX.Element |
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
// Validator will pass a form to schema creator | |
export default form => ({ | |
type: 'object', | |
properties: { | |
text: { | |
type: 'string', | |
messages: { | |
type: 'Should be a string', | |
required: 'Please enter a text', | |
}, |
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
class HTML5Uploader | |
constructor:(obj, options) -> | |
@method = options['method'] ||= "POST" | |
@url = options['url'] ||= "/" | |
@params = options['params'] | |
@obj = $(obj) | |
@files = [] | |
@alerted = false |
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
location / { | |
rewrite ^([^.]+)$ /index.cfm?vars=$1 last; | |
} | |
location ~ \.(cfm|cfc)$ { | |
proxy_pass http://127.0.0.1:8600; | |
proxy_redirect off; | |
proxy_intercept_errors on; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
public function formapply(struct e){ | |
try { | |
form.ip = e.t.getIP(); | |
e.t.getBean("item").create(form, "stripHTML"); | |
e.t.abort(); | |
} | |
catch (any error) { | |
e.t.getService("log").exception(error); | |
e.t.setHttpCode( | |
Val(error.code) ? error.code : 500 |
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
var j = jQuery.noConflict(); | |
j(function(){ | |
j("#applyForm").submit(function(e){ | |
e.preventDefault(); | |
var form = j(this); | |
var success = j("#applyFormSuccess"); | |
var submit = form.find("input:submit"); | |
var error = form.find(".error").hide(); | |
if(!submit.is(".busy")){ | |
submit.addClass("busy"); |
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
<form id="applyForm" action="/form/apply" method="post"> | |
<div class="row"> | |
<label for="name">Ваше имя</label> | |
<input type="text" id="name" name="name" class="name" placeholder="Марк Цукерберг" /> | |
<div class="clear"></div> | |
</div> | |
<div class="messageWrapper"> | |
<div class="error hide"></div> | |
</div> | |
<div class="clear"></div> |