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
| { | |
| "workspace": "kolumbus", | |
| "collection": "meteoweb", | |
| "type": "gallery", | |
| "advancedCategoryTerm": { | |
| "categoryTerms": "/meteoweb", | |
| "searchInSecondaryCategory": true, | |
| "searchInChildCategories": true | |
| }, | |
| "paging": { |
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
| def combine_query(query, piece) | |
| # this function always receives its previous return value | |
| _query = {}.merge(query) # also tried Hash.new(), query.dup, query.clone | |
| _query['query'] ||= {} | |
| _query['query']['bool'] ||= {} | |
| _query['query']['bool']['must'] ||= [] | |
| _query['query']['bool']['must'] << piece | |
| _query | |
| end |
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
Show hidden characters
| { | |
| "query": { | |
| // ... | |
| }, | |
| "aggs": { | |
| "uniq": { | |
| "nested": { | |
| "path": "nested_object" | |
| }, | |
| "aggs": { |
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
| class SyncPromise { | |
| constructor( callback ) { | |
| try{ | |
| this.returnValue = callback(); | |
| } | |
| catch(err) { | |
| throw err; | |
| } | |
| } |
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
| function numericValue() { | |
| if (stringValue === "one") { | |
| numericValue = 1; | |
| } else if (stringValue === "two") { | |
| numericValue = 2; | |
| } else if (stringValue === "three") { | |
| numericValue = 3; | |
| } | |
| } | |
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
| def do_stuff_with_data(&block) | |
| data = 1 | |
| yield data | |
| end | |
| do_stuff_with_data do |data| | |
| puts data | |
| end |
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
| drawRegularBadge() { | |
| return this.getLayer(this.size.rectWidth, this.size.rectHeight + this.size.bottomSpace).then(ctx => { | |
| this.drawRectangle(ctx, [0, 0], [this.size.rectWidth, this.size.rectHeight], this.style); | |
| // ADD TEXT | |
| this.getLine().then(line => { | |
| if (this.style.midStroke) ctx.drawImage(line.canvas, 0, 0); | |
| this.getSpacedText(this.text).then(drawnText => { | |
| // ADD STROKE LINE | |
| ctx.drawImage(drawnText.canvas, this.cn(this.size.padding), this.cn(this.getTextTop(this.size.rectHeight, this.size.fontSize))); | |
| this.drawTriangle(ctx, |
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 | |
| require_once('../../obj/XmlGeocms.php'); | |
| require_once('../../obj/Geo.php'); | |
| require_once('../../input/stream/Stream.php'); | |
| require_once('config.php'); | |
| $requestURI = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH); | |
| $requestURI = explode("/", $requestURI); | |
| $app = $requestURI[4]; | |
| if(empty($app)){ echo "app number is empty!"; die(); } |
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
| def render_tabs_wrapper | |
| content_tag :ul, class: 'nav nav-tabs' do | |
| content_tag( :li, 'v-sticky': 'value' ) do; ""; end + yield | |
| end | |
| end |
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
| class Rating::Option < ApplicationRecord | |
| belongs_to :rating_type, class_name: 'Rating::Type', :foreign_key => "rating_type_id" | |
| has_many :rating_scores, class_name: 'Rating::Score', :foreign_key => "rating_option_id", dependent: :destroy | |
| end |
NewerOlder