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
| <div class="row"> | |
| {{ $t("WIND") }}: | |
| {{ | |
| ** This ternary operator looks weird here, logic should be probably moved to function ** | |
| getWindDirection(weather.wind ? weather.wind.direction : 400) | |
| }} | |
| | {{ weather.wind ? weather.wind.speed : "n/a" }}m/s | |
| </div> |
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 $$ | |
| begin | |
| for i in 1..10 loop | |
| INSERT INTO public.providers (name, description, address, online_booking, cancellation_policy, cancellation_time, website, contact_numbers, currency_code, country_code, time_zone, created_at, updated_at, print_receipts, receipt_message, prices_include_tax, beginning_of_week, default_calendar_view, time_slot_minutes, sms_enabled, business_type_id, widget_allows_employee_selection, widget_max_advance_time_in_months, commission_before_discount, commission_after_tax, time_format, voucher_expiration_period, locale, payments_activated, marketplace_enabled, marketplace_info, checkout_version, sale_custom_header_1, sale_custom_header_2, sale_show_customer_info, new_appointment_modal, new_appointment_summary, advance_notice_time_in_seconds, appointment_color_source, custom_invoice_title, payments_coming_soon, payments_enabled, new_taxes, sale_show_customer_address, zendesk_enabled, payments_enabled_by_provider, hidden_from_marketplace, payments_required, payment_due, new_cal |
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
| EXPLAIN SELECT "customers".*, | |
| coalesce("customer_bookings"."appointments", 0) AS "appointments", | |
| coalesce("customer_bookings"."no_shows", 0) AS "no_shows", | |
| "customer_bookings"."last_appointment" AS "last_appointment", | |
| coalesce("customer_sales"."total_sales", 0) AS "total_sales", | |
| greatest("customer_payments_accumulators"."unpaid_amount", 0) AS "outstanding", | |
| "locations"."name" AS "last_location" | |
| FROM "customers" | |
| LEFT OUTER JOIN | |
| (SELECT COUNT(*) FILTER( |
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
| #!/bin/sh | |
| # Script to update YouTube IP ranges and set up routing | |
| # Create YouTube domains file if it doesn't exist | |
| if [ ! -f /config/youtube_domains.txt ]; then | |
| cat > /config/youtube_domains.txt << EOF | |
| youtube.com | |
| youtu.be | |
| ytimg.com | |
| yt3.ggpht.com |
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
| @PutMapping("/{studentId}") | |
| public ResponseEntity<Void> updateStudent( | |
| @PathVariable Long studentId, | |
| @Valid @RequestBody StudentRequest request) { | |
| Student existing = studentRepository.findById(studentId) | |
| .orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND)); | |
| updateFrom(existing, request); // or maybe more compact but less easy to read: modelMapper.map(request, existing); | |
| studentRepository.save(existing); |
OlderNewer