GitHub
Tests: 12 • Commercial: 2 • Pet projects: 4 • Legacy: 4
Total: 22

.NET Framework

Test
2021

Project Request

ASP.NET MVC • C# • SQL Server
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2020

ProjectC

ASP.NET MVC • C# • JSON • jQuery
JSON data processing.
Test
2020

Vehicle Maintenance

ASP.NET MVC • VB.NET • JSON
Idea of the project: if someone wants to order a project development, here you can send an application.
Test
2019

Movie Navigator

ASP.NET MVC • VB.NET
Request information about movie from IMDB.
Test
2018

Customers Exchange

ASP.NET MVC • C# • SQL Server
Automated teller machine emulation.
Test
2016

ATM

ASP.NET MVC • C#
Automated teller machine emulation.

.NET Core

Pet project
2022

Mail Daemon

.NET 9 • Console • JSON
Utility to send mails with customizable settings.

Custom

Code
2024

Buns of code

.NET Framework • C# • JavaScript
Code snippets from my projects, ready to use; tiny tests; code examples.

PHP

Test
2024

Mediabox

PHP 8 • Laravel 11 • Vue.js • Composer • SQLite
Test project for media files management.
Test
2020

Loan Castle

PHP • MariaDB
Jums jāizstrādā kāda lielāk projekta prototips. Izstrādājot prototipu, paturiet prātā, ka projektam attīstoties, šo prototipu varētu vajadzēt pilnveidot.
Test
2020

Content Management

PHP • MySQL • AJAX
Создать простой сайт, где будет страница с формой для авторизации и страница для авторизованного пользователя.
Test
2019

Laravel

PHP • Laravel • Vue.js • Composer • SQLite
Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.
Test
2019

Phone Check

PHP • JavaScript • JSON • Docker
Implement application to detect country by phone number.

Frontend

Test
2021

Forex Wall

npm • React
For this exercise, what we need is a simple live wall for tracking currencies.

Business projects

Commercial
2008

Certification Center

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Dapper • JavaScript • jQuery • Git
Transport registration and certification services in Latvia, Customer Relationship Management.
Commercial
2000

Amerikas Auto

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • SQL Server • ADO.NET • Entity Framework • JavaScript • jQuery • Git
Car service and spare parts for all USA and European car models, Customer Relationship Management.

Pet projects

Pet project
2023

Geolocation Assistant

.NET 8 • ASP.NET Core • C# • Web API • JSON • Git
Website for determining geolocation by IP or geotagged photo.
Pet project
2008

Web Dynamics

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
Software development blog. Articles, books, videos, content management.
Pet project
2000

Blackball

.NET Framework 4.8 • ASP.NET Web Forms • C# • LINQ • Web API • JSON • XML • SQL Server • Dapper • JavaScript • jQuery • SVG • Git
My entertainment portal created from scratch.

Good old times

Legacy
2000

DOS Clock

Turbo Pascal • Assembler
Digital clock.
Legacy
2000

BrainOut

Turbo Pascal • Assembler
Tank battle game.
Legacy
1999

Airport Administrator

Turbo Pascal
Курсовая работа в институте.
Legacy
1998

Atomizer

Turbo Pascal • Assembler
Atomizer, aka «Studio2D». Graphic raster editor. AGI is my own «Atomizer Generated Image» file format.

Mediabox

2024 Test

Test project for media files management.

PHP 8 Laravel 11 Vue.js Composer SQLite
Information
Source code
  app
  Http
  .bin
  vite
  lib
  dist
  esm
  node
  lib
  core
  env
  node
  lib
  lib
  lib
  lib
  dist
  lib
  lib
  dist
  es
  lib
  vite
  dist
  node
  dist
  css
  js
  app
  data
  logs
  Unit
  math
  src
  src
  src
  docs
  en
  lib
  src
  src
  Cron
  src
  src
  Core
  ORM
  Spot
  filp
  src
  css
  js
  Util
  src
  src
  src
  src
  psr7
  src
  src
  Core
  Text
  Type
  Xml
  Core
  Text
  Type
  Xml
  src
  Auth
  make
  Bus
  View
  Auth
  Bus
  Http
  Mail
  View
  Auth
  Bus
  Http
  dist
  Http
  Json
  Log
  Mail
  html
  text
  Jobs
  lang
  en
  View
  pint
  pint
  src
  sail
  8.0
  8.1
  8.2
  8.3
  src
  src
  src
  src
  Node
  Util
  Node
  Node
  Node
  Data
  Node
  Node
  Util
  Xml
  src
  src
  src
  docs
  Pass
  src
  Curl
  Test
  src
  Date
  Spl
  lazy
  src
  Cli
  Lang
  List
  src
  src
  lib
  Node
  Expr
  Cast
  Name
  Stmt
  src
  src
  Html
  src
  xml
  src
  src
  src
  Data
  Node
  Html
  css
  js
  Xml
  Util
  src
  src
  src
  src
  src
  Test
  Test
  Math
  Type
  Api
  Rule
  Stub
  Api
  PHPT
  Cli
  Xml
  Util
  PHP
  Xml
  psr
  src
  src
  src
  src
  src
  docs
  src
  log
  src
  src
  psy
  src
  Hoa
  77
  78
  Sudo
  Util
  src
  src
  Map
  Tool
  uuid
  src
  Time
  Guid
  Lazy
  Math
  Dce
  Node
  Time
  Type
  src
  src
  src
  src
  src
  diff
  src
  src
  src
  src
  src
  src
  src
  src
  type
  src
  type
  src
  Test
  CI
  Node
  css
  js
  File
  Test
  Log
  Test
  Smtp
  Auth
  mime
  Part
  Test
  Test
  data
  data
  Test
  Util
  Test
  uid
  css
  js
  Test
  yaml
  Tag
  src
  src
  Css
  Rule
  src
  File
  Util
  voku
  src
  voku
  data
  src
  .env
Root / vendor / laravel / framework / src / Illuminate / Validation / Concerns / FormatsMessages.php
<?php namespace Illuminate\Validation\Concerns; use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\HttpFoundation\File\UploadedFile; trait FormatsMessages { use ReplacesAttributes; /** * Get the validation message for an attribute and rule. * * @param string $attribute * @param string $rule * @return string */ protected function getMessage($attribute, $rule) { $attributeWithPlaceholders = $attribute; $attribute = $this->replacePlaceholderInString($attribute); $inlineMessage = $this->getInlineMessage($attribute, $rule); // First we will retrieve the custom message for the validation rule if one // exists. If a custom validation message is being used we'll return the // custom message, otherwise we'll keep searching for a valid message. if (! is_null($inlineMessage)) { return $inlineMessage; } $lowerRule = Str::snake($rule); $customKey = "validation.custom.{$attribute}.{$lowerRule}"; $customMessage = $this->getCustomMessageFromTranslator( in_array($rule, $this->sizeRules) ? [$customKey.".{$this->getAttributeType($attribute)}", $customKey] : $customKey ); // First we check for a custom defined validation message for the attribute // and rule. This allows the developer to specify specific messages for // only some attributes and rules that need to get specially formed. if ($customMessage !== $customKey) { return $customMessage; } // If the rule being validated is a "size" rule, we will need to gather the // specific error message for the type of attribute being validated such // as a number, file or string which all have different message types. elseif (in_array($rule, $this->sizeRules)) { return $this->getSizeMessage($attributeWithPlaceholders, $rule); } // Finally, if no developer specified messages have been set, and no other // special messages apply for this rule, we will just pull the default // messages out of the translator service for this validation rule. $key = "validation.{$lowerRule}"; if ($key !== ($value = $this->translator->get($key))) { return $value; } return $this->getFromLocalArray( $attribute, $lowerRule, $this->fallbackMessages ) ?: $key; } /** * Get the proper inline error message for standard and size rules. * * @param string $attribute * @param string $rule * @return string|null */ protected function getInlineMessage($attribute, $rule) { $inlineEntry = $this->getFromLocalArray($attribute, Str::snake($rule)); return is_array($inlineEntry) && in_array($rule, $this->sizeRules) ? $inlineEntry[$this->getAttributeType($attribute)] : $inlineEntry; } /** * Get the inline message for a rule if it exists. * * @param string $attribute * @param string $lowerRule * @param array|null $source * @return string|null */ protected function getFromLocalArray($attribute, $lowerRule, $source = null) { $source = $source ?: $this->customMessages; $keys = ["{$attribute}.{$lowerRule}", $lowerRule, $attribute]; // First we will check for a custom message for an attribute specific rule // message for the fields, then we will check for a general custom line // that is not attribute specific. If we find either we'll return it. foreach ($keys as $key) { foreach (array_keys($source) as $sourceKey) { if (str_contains($sourceKey, '*')) { $pattern = str_replace('\*', '([^.]*)', preg_quote($sourceKey, '#')); if (preg_match('#^'.$pattern.'\z#u', $key) === 1) { $message = $source[$sourceKey]; if (is_array($message) && isset($message[$lowerRule])) { return $message[$lowerRule]; } return $message; } continue; } if (Str::is($sourceKey, $key)) { $message = $source[$sourceKey]; if ($sourceKey === $attribute && is_array($message)) { return $message[$lowerRule] ?? null; } return $message; } } } } /** * Get the custom error message from the translator. * * @param array|string $keys * @return string */ protected function getCustomMessageFromTranslator($keys) { foreach (Arr::wrap($keys) as $key) { if (($message = $this->translator->get($key)) !== $key) { return $message; } // If an exact match was not found for the key, we will collapse all of these // messages and loop through them and try to find a wildcard match for the // given key. Otherwise, we will simply return the key's value back out. $shortKey = preg_replace( '/^validation\.custom\./', '', $key ); $message = $this->getWildcardCustomMessages(Arr::dot( (array) $this->translator->get('validation.custom') ), $shortKey, $key); if ($message !== $key) { return $message; } } return Arr::last(Arr::wrap($keys)); } /** * Check the given messages for a wildcard key. * * @param array $messages * @param string $search * @param string $default * @return string */ protected function getWildcardCustomMessages($messages, $search, $default) { foreach ($messages as $key => $message) { if ($search === $key || (Str::contains($key, ['*']) && Str::is($key, $search))) { return $message; } } return $default; } /** * Get the proper error message for an attribute and size rule. * * @param string $attribute * @param string $rule * @return string */ protected function getSizeMessage($attribute, $rule) { $lowerRule = Str::snake($rule); // There are three different types of size validations. The attribute may be // either a number, file, or string so we will check a few things to know // which type of value it is and return the correct line for that type. $type = $this->getAttributeType($attribute); $key = "validation.{$lowerRule}.{$type}"; return $this->translator->get($key); } /** * Get the data type of the given attribute. * * @param string $attribute * @return string */ protected function getAttributeType($attribute) { // We assume that the attributes present in the file array are files so that // means that if the attribute does not have a numeric rule and the files // list doesn't have it we'll just consider it a string by elimination. return match (true) { $this->hasRule($attribute, $this->numericRules) => 'numeric', $this->hasRule($attribute, ['Array', 'List']) => 'array', $this->getValue($attribute) instanceof UploadedFile, $this->getValue($attribute) instanceof File => 'file', default => 'string', }; } /** * Replace all error message place-holders with actual values. * * @param string $message * @param string $attribute * @param string $rule * @param array $parameters * @return string */ public function makeReplacements($message, $attribute, $rule, $parameters) { $message = $this->replaceAttributePlaceholder( $message, $this->getDisplayableAttribute($attribute) ); $message = $this->replaceInputPlaceholder($message, $attribute); $message = $this->replaceIndexPlaceholder($message, $attribute); $message = $this->replacePositionPlaceholder($message, $attribute); if (isset($this->replacers[Str::snake($rule)])) { return $this->callReplacer($message, $attribute, Str::snake($rule), $parameters, $this); } elseif (method_exists($this, $replacer = "replace{$rule}")) { return $this->$replacer($message, $attribute, $rule, $parameters); } return $message; } /** * Get the displayable name of the attribute. * * @param string $attribute * @return string */ public function getDisplayableAttribute($attribute) { $primaryAttribute = $this->getPrimaryAttribute($attribute); $expectedAttributes = $attribute != $primaryAttribute ? [$attribute, $primaryAttribute] : [$attribute]; foreach ($expectedAttributes as $name) { // The developer may dynamically specify the array of custom attributes on this // validator instance. If the attribute exists in this array it is used over // the other ways of pulling the attribute name for this given attributes. if ($inlineAttribute = $this->getAttributeFromLocalArray($name)) { return $inlineAttribute; } // We allow for a developer to specify language lines for any attribute in this // application, which allows flexibility for displaying a unique displayable // version of the attribute name instead of the name used in an HTTP POST. if ($translatedAttribute = $this->getAttributeFromTranslations($name)) { return $translatedAttribute; } } // When no language line has been specified for the attribute and it is also // an implicit attribute we will display the raw attribute's name and not // modify it with any of these replacements before we display the name. if (isset($this->implicitAttributes[$primaryAttribute])) { return ($formatter = $this->implicitAttributesFormatter) ? $formatter($attribute) : $attribute; } return str_replace('_', ' ', Str::snake($attribute)); } /** * Get the given attribute from the attribute translations. * * @param string $name * @return string|null */ protected function getAttributeFromTranslations($name) { if (! is_array($attributes = $this->translator->get('validation.attributes'))) { return null; } return $this->getAttributeFromLocalArray($name, Arr::dot($attributes)); } /** * Get the custom name for an attribute if it exists in the given array. * * @param string $attribute * @param array|null $source * @return string|null */ protected function getAttributeFromLocalArray($attribute, $source = null) { $source = $source ?: $this->customAttributes; if (isset($source[$attribute])) { return $source[$attribute]; } foreach (array_keys($source) as $sourceKey) { if (str_contains($sourceKey, '*')) { $pattern = str_replace('\*', '([^.]*)', preg_quote($sourceKey, '#')); if (preg_match('#^'.$pattern.'\z#u', $attribute) === 1) { return $source[$sourceKey]; } } } } /** * Replace the :attribute placeholder in the given message. * * @param string $message * @param string $value * @return string */ protected function replaceAttributePlaceholder($message, $value) { return str_replace( [':attribute', ':ATTRIBUTE', ':Attribute'], [$value, Str::upper($value), Str::ucfirst($value)], $message ); } /** * Replace the :index placeholder in the given message. * * @param string $message * @param string $attribute * @return string */ protected function replaceIndexPlaceholder($message, $attribute) { return $this->replaceIndexOrPositionPlaceholder( $message, $attribute, 'index' ); } /** * Replace the :position placeholder in the given message. * * @param string $message * @param string $attribute * @return string */ protected function replacePositionPlaceholder($message, $attribute) { return $this->replaceIndexOrPositionPlaceholder( $message, $attribute, 'position', fn ($segment) => $segment + 1 ); } /** * Replace the :index or :position placeholder in the given message. * * @param string $message * @param string $attribute * @param string $placeholder * @param \Closure|null $modifier * @return string */ protected function replaceIndexOrPositionPlaceholder($message, $attribute, $placeholder, ?Closure $modifier = null) { $segments = explode('.', $attribute); $modifier ??= fn ($value) => $value; $numericIndex = 1; foreach ($segments as $segment) { if (is_numeric($segment)) { if ($numericIndex === 1) { $message = str_ireplace(':'.$placeholder, $modifier((int) $segment), $message); } $message = str_ireplace( ':'.$this->numberToIndexOrPositionWord($numericIndex).'-'.$placeholder, $modifier((int) $segment), $message ); $numericIndex++; } } return $message; } /** * Get the word for a index or position segment. * * @param int $value * @return string */ protected function numberToIndexOrPositionWord(int $value) { return [ 1 => 'first', 2 => 'second', 3 => 'third', 4 => 'fourth', 5 => 'fifth', 6 => 'sixth', 7 => 'seventh', 8 => 'eighth', 9 => 'ninth', 10 => 'tenth', ][(int) $value] ?? 'other'; } /** * Replace the :input placeholder in the given message. * * @param string $message * @param string $attribute * @return string */ protected function replaceInputPlaceholder($message, $attribute) { $actualValue = $this->getValue($attribute); if (is_scalar($actualValue) || is_null($actualValue)) { $message = str_replace(':input', $this->getDisplayableValue($attribute, $actualValue), $message); } return $message; } /** * Get the displayable name of the value. * * @param string $attribute * @param mixed $value * @return string */ public function getDisplayableValue($attribute, $value) { if (isset($this->customValues[$attribute][$value])) { return $this->customValues[$attribute][$value]; } if (is_array($value)) { return 'array'; } $key = "validation.values.{$attribute}.{$value}"; if (($line = $this->translator->get($key)) !== $key) { return $line; } if (is_bool($value)) { return $value ? 'true' : 'false'; } if (is_null($value)) { return 'empty'; } return (string) $value; } /** * Transform an array of attributes to their displayable form. * * @param array $values * @return array */ protected function getAttributeList(array $values) { $attributes = []; // For each attribute in the list we will simply get its displayable form as // this is convenient when replacing lists of parameters like some of the // replacement functions do when formatting out the validation message. foreach ($values as $key => $value) { $attributes[$key] = $this->getDisplayableAttribute($value); } return $attributes; } /** * Call a custom validator message replacer. * * @param string $message * @param string $attribute * @param string $rule * @param array $parameters * @param \Illuminate\Validation\Validator $validator * @return string|null */ protected function callReplacer($message, $attribute, $rule, $parameters, $validator) { $callback = $this->replacers[$rule]; if ($callback instanceof Closure) { return $callback(...func_get_args()); } elseif (is_string($callback)) { return $this->callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters, $validator); } } /** * Call a class based validator message replacer. * * @param string $callback * @param string $message * @param string $attribute * @param string $rule * @param array $parameters * @param \Illuminate\Validation\Validator $validator * @return string */ protected function callClassBasedReplacer($callback, $message, $attribute, $rule, $parameters, $validator) { [$class, $method] = Str::parseCallback($callback, 'replace'); return $this->container->make($class)->{$method}(...array_slice(func_get_args(), 1)); } }