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
SELECT data.id | |
FROM (select j1.id as id, | |
j1.title, | |
case | |
when active_job.location isnull | |
then :radius | |
when j1.location isnull | |
then :radius | |
else st_distance(j1.location, active_job.location) end as dist, | |
similarity(j1.title, active_job.title) as close, |
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
create materialized view similar_mv as (select j.id, | |
j.title, | |
j.source, | |
j.created_at, | |
j.updated_at, | |
j.category_id, | |
b2bt.company, | |
lt.location | |
from job_tb j | |
join b2b_tb b2bt on j.b2b_id = b2bt.id |
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
SELECT data.id | |
FROM (select j1.id as id, | |
j1.title, | |
b1.company, | |
case | |
when active_job.location isnull | |
then :radius | |
when l1.location isnull | |
then :radius | |
else st_distance(l1.location, active_job.location) end as dist, |
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
Number.prototype.pad = function (size) { | |
var s = String(this); | |
while (s.length < (size || 2)) { | |
s = "0" + s; | |
} | |
return s; | |
} | |
function run() { | |
chrome.storage.sync.get(['name', 'address1', 'address2', 'zip', 'city', 'country', 'articles', 'buyDateString', 'payDateString', 'rnr', 'shipping', 'invoiceFileDate'], (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
// var app = chrome.runtime.getBackgroundPage(); | |
document.addEventListener('DOMContentLoaded', function () { | |
debugger; | |
console.log("the doc loaded") | |
var form = document.getElementById("form") | |
console.log(form) | |
form.addEventListener('submit', function (e) { | |
e.preventDefault() | |
console.log("added to the form") |
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
<html> | |
<body> | |
<form id="form"> | |
<input type="number" id="rnr" placeholder="Rechnungsnummer" style="margin-bottom: 10px"> | |
<input type="submit" value="Rechnung Erstellen"> | |
</form> | |
<script type="text/javascript" src="popup.js"></script> | |
</body> | |
</html> |
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
const name = $("#buyercontactname").val(); | |
const address1 = $('#buyeraddress1').val(); | |
const address2 = $('#buyeraddress2').val(); | |
const zip = $('#buyerzip').val(); | |
const city = $('#buyercity').val(); | |
const country = $('#buyercountry').children("option:selected").attr('id'); | |
let big_table = $('#ERSShipnHand').find("table"); | |
let all_articles = [] |
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
// Paste that in Google console | |
$$('#meb-items-cnt > section.active-page__list > div > div > div > div > div.col-3 > div.me-item-activity > div:nth-child(1) > span.me-item-activity__column-count').reduce((a, c)=>a+parseInt(c.innerHTML), 0) |
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
t = Task(type='resize', arguments=json.dumps({'new_width': width, 'url': url, 'bucket': self.bucket})) | |
try: | |
db.session.add(t) | |
db.session.commit() | |
sys_log.info("Added the resize task to the DB") | |
except IntegrityError as integrityerror: | |
db.session.rollback() | |
sys_log.info("Task is conflicting with another task in the DB") |
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
mapper = { | |
'function1': function1, | |
'function2': function2 | |
} | |
def execute_pending_tasks(): | |
all_pending_tasks = Task.query.all() | |
for t in all_pending_tasks: | |
try: | |
associated_function = mapper.get(t.type, False) |
NewerOlder