Vývoj software je často o hledání správné rovnováhy mezi:
čistotou kódu vs. praktičností
přehledností vs. flexibilitou
striktními pravidly vs. pragmatickým přístupem
A jak jste správně poznamenal - je to neustálý proces učení a přizpůsobování. Co fungovalo včera, nemusí být nejlepší řešení zítra. A to je v pořádku!
Důležité je:
Dělat informovaná rozhodnutí
Nebát se změny, když je potřeba
Učit se z předchozích zkušeností
Zachovat si zdravý rozum a neupnout se na jeden přístup
Proto je t
open explorer with branc files
type cmd in address line to open terminal in this folder
excecute
"build.cmd deploy --environment dev" // focus, qa
enter
Description
https://devops.peemdomain.at/SSISchaeferPeemGraz/CSS%20Dashboard/_versionControl?path=%24%2FCSS%20Dashboard%2FFeatures%2FMain-Dev-2025.05%2Fdocs%2FDocumentation%2FCoding%2FCICD%2Fdeploy.md
# Website with many git help commands
https://ohshitgit.com
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when '@app' -%}
{%- liquid
capture block_rendered
render block
endcapture
-%}
{%- if block_rendered contains 'cevoid-section-gallery' -%}
<script>console.log({{ block_rendered | json }});</script>
{%- endif -%}
{% render block %}
{%- endcase -%}
{%- endfor -%}
1. install ruff:
uv tool install ruff
2. run ruff to check a particular file:
ruff check main.py
3. ruff check entire current dir:
ruff check .
4. make ruff fix stuff
ruff --fix .
5. make ruff show what it is changing:
ruff check --fix --diff .
6. use ruff to format:
ruff format .
7. make ruff watch and report errors:
ruff --watch .
8. configure ruff:
local config - use ruff.toml or pyproject.toml
example of pyproject.toml file
[project]
name = "ruff-demo"
version = "0.1.0"
description =
# python uv faq
- ## `uv pip install`和`uv add`区别在哪里?
答:`uv add`选择通用或跨平台依赖项。`uv pip install`则直接往虚拟环境里添加依赖。参考:[What's the difference between uv pip install and uv add](https://github.com/astral-sh/uv/issues/9219)
/**
* @param {number[]} nums
* @return {string}
*/
var triangleType = function(nums) {
// Check if the input array has exactly 3 sides
if (nums.length !== 3) {
return "none";
}
const [a, b, c] = nums; // Destructure the array for clarity
// Check for invalid sides (negative or zero)
if (a <= 0 || b <= 0 || c <= 0) {
return "none";
}
// Triangle Inequality Theorem: The sum of any two sides must be greater than the third
if (a + b <= c || a
Если вы хотите создать контроллер только с одним действием, вы можете использовать метод __invoke() и даже создать «вызываемый» (invokable) контроллер.
<?
namespace App\Http\Controllers;
use App\User;
use App\Http\Controllers\Controller;
class ShowProfile extends Controller
{
/**
* Показать профайл данного пользователя
*
* @param int $id
* @return Response
*/
public function __invoke($id)
{
return view('user.profile', ['user' => User::findOrFail($id
$ShutdownCode = @'
[CmdletBinding()]
param(
[int32]$Minutes = 10
)
function Test-Uptime {
$LastBootUpTime = Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -ExpandProperty LastBootUpTime
$UptimeTotalMinutes = New-TimeSpan -Start $LastBootUpTime -End (Get-Date) | Select-Object -ExpandProperty TotalMinutes
$UptimeTotalMinutes -gt $Minutes
}
$Shutdown = Test-Uptime
if (-not $Shutdown) {
Write-Warning "The computer has not been online for $Minut
/**
* @param {number} m
* @param {number} n
* @return {number}
*/
var colorTheGrid = function(m, n) {
const MOD = 10**9 + 7;
let validRows = new Map(); // Store valid row configurations and their count
// Generate all possible valid row colorings (using backtracking)
function generateRows(row, current) {
if (row === m) {
validRows.set(current, 1); // Store the valid row pattern
return;
}
for (let color of ['R', 'G', 'B']) {
#Region '.\Private\Get-ApifyDatasetItems.ps1' -1
function Get-ApifyDatasetItems {
param(
[string]$DefaultDatasetId # The dataset ID returned from the previous step
)
$url = "https://api.apify.com/v2/datasets/$DefaultDatasetId/items"
$headers = @{
"Authorization" = "Bearer $env:ApifyToken"
}
$response = Invoke-RestMethod -Method GET -Uri $url -Headers $headers
return $response
}
#EndRegion '.\Private\Get-ApifyDatasetItems.ps1' 14
#Reg
inicio{
"host":"58DE7FC18BD271DA291A2A2A3E1F2C"
}fim
/**
* Finds the longest subsequence of words where each word is
* "compatible" with the next and belongs to different groups.
*
* @param {string[]} words - Array of words.
* @param {number[]} groups - Corresponding group identifiers.
* @return {string[]} - Longest subsequence satisfying the constraints.
*/
var getWordsInLongestSubsequence = function(words, groups) {
const isCompatible = function(word1, word2) {
if (word1.length !== word2.length) {
return fals
# Add swap file
`sudo fallocate -l 4G /swapfile`
`sudo chmod 600 /swapfile`
`sudo mkswap /swapfile`
`sudo swapon /swapfile`
`echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab`
param(
[string] $personalAccessToken,
[string] $project,
[string] $repository,
[string] $team,
[string] $sourceBranch,
[string] $targetBranch,
[string] $slackNotificationChannelId,
[switch] $lockSource,
[switch] $noSquash
)
$ErrorActionPreference = "Stop"
$InformationPreference = "Continue"
$v = $PSVersionTable.PSVersion
if ($v -lt [Version]'7.2') {
throw [System.Exception] "Powershell Version $v Unsupported - Please retry using version 7.2+"
}
$azureU