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
| CREATE FUNCTION key_underscore_to_camel_case(s text) | |
| RETURNS json | |
| IMMUTABLE | |
| LANGUAGE sql | |
| AS $$ | |
| SELECT to_json(substring(s, 1, 1) || substring(replace(initcap(replace(s, '_', ' ')), ' ', ''), 2)); | |
| $$; | |
| -- TODO: add recursive processing | |
| CREATE FUNCTION json_underscore_to_camel_case(data json) |
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
| #!/usr/bin/env python | |
| #---------------------------------------------------------------------- | |
| # Imports | |
| #---------------------------------------------------------------------- | |
| import sys | |
| import json | |
| import requests |
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
| $ libtoolize --force | |
| $ aclocal | |
| $ autoheader | |
| $ automake --force-missing --add-missing | |
| $ autoconf |
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
| dummy |
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
| subtotal - предварительная сумма без вычета скидок, налогов и т.д. | |
| total - сумма за вычетом скидок, налогов и т.д. | |
| reward points - бонусные баллы. | |
| discount amount - сумма скидки. | |
| points with expiry - бонусы с ограниченным периодом действия. | |
| redeem reward points - обмен бонусных баллов (например на скидку или товар). | |
| reward - вознаграждение за что-то (например за покупку). | |
| reward tiers - уровни вознаграждения (например уровень 1 дает 20% скидки, уровень 2 - 30%). | |
| encashing points - обналичивание бонусных баллов. |
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
| syn on | |
| set number nowrap hls | |
| colo desert | |
| " Folding | |
| set fen fdm=syntax | |
| hi Folded ctermbg=0 | |
| " Show cursor line position | |
| set cul so=9999 |
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 grails.gorm.DetachedCriteria | |
| import grails.util.Holders | |
| import org.codehaus.groovy.grails.orm.hibernate.query.HibernateQuery | |
| import org.grails.datastore.gorm.finders.DynamicFinder | |
| import org.hibernate.engine.spi.SessionFactoryImplementor | |
| import org.hibernate.internal.CriteriaImpl | |
| import org.hibernate.internal.SessionImpl | |
| import org.hibernate.loader.criteria.CriteriaLoader | |
| import org.hibernate.persister.entity.OuterJoinLoadable |
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
| do $$ | |
| declare | |
| rec record; | |
| namespace_restriction text; | |
| begin | |
| namespace_restriction = 'public'; | |
| for rec in select | |
| conrelid::oid::regclass::text as constraint_table, | |
| conname as constraint_name, | |
| pg_catalog.pg_get_constraintdef(oid) as constraint_definition |
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
| -- https://codereview.stackexchange.com/questions/23181/get-all-recursive-dependencies-of-a-single-database-object | |
| WITH RECURSIVE dep_recursive AS ( | |
| -- Recursion: Initial Query | |
| SELECT | |
| 0 AS "level", | |
| 'company' AS "dep_name", -- <- define dependent object HERE | |
| '' AS "dep_table", | |
| '' AS "dep_type", | |
| '' AS "ref_name", |
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
| #!/usr/bin/env python3 | |
| import re | |
| import os | |
| import sys | |
| multiline_coment = re.compile(r'/\*\*.+?\*/\n?', flags=re.DOTALL) | |
| extensions = tuple('.' + ext for ext in ( | |
| 'java', | |
| )) |
OlderNewer