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.

Laravel

2019 Test

Izveidot aplikāciju, kura ik pēc noteikta intervāla (60 sekundes) veic ierakstu datubāzē izmantojot Laravel freimworka iebūvēto funkcionalitāti.

PHP Laravel Vue.js Composer SQLite
Information
Source code
  app
  Http
  Auth
  css
  js
  js
  lang
  en
  sass
  app
  data
  logs
  Unit
  src
  src
  lib
  docs
  en
  src
  docs
  en
  lib
  src
  Cron
  Cron
  src
  filp
  src
  css
  js
  Util
  src
  ORM
  Spot
  test
  Core
  Text
  Type
  Xml
  Core
  Text
  Type
  Xml
  html
  src
  src
  src
  Auth
  make
  auth
  Bus
  Auth
  Bus
  Http
  Mail
  View
  Auth
  Bus
  Http
  Http
  Json
  Log
  Mail
  html
  text
  Jobs
  View
  src
  src
  Util
  docs
  Pass
  Pass
  Pass
  doc
  src
  Curl
  doc
  f001
  f002
  f003
  f004
  f005
  f006
  f007
  f008
  src
  Date
  Spl
  src
  Lang
  List
  doc
  lib
  Node
  Expr
  Cast
  Name
  Stmt
  test
  code
  expr
  uvs
  stmt
  loop
  expr
  stmt
  Node
  Stmt
  src
  opis
  src
  dist
  lib
  src
  xml
  xml
  src
  Unit
  src
  src
  Tags
  src
  src
  src
  Call
  Node
  Call
  Util
  src
  Node
  Html
  css
  js
  Xml
  HTML
  XML
  src
  src
  src
  src
  src
  Stub
  Hook
  Util
  Log
  PHP
  cli
  1149
  1216
  1265
  1330
  1335
  1337
  1348
  1351
  1374
  1437
  1468
  1471
  1472
  1570
  2085
  2137
  2145
  2158
  2366
  2380
  2382
  2435
  244
  2448
  2724
  2725
  2731
  2811
  2830
  2972
  3093
  3107
  3156
  322
  3364
  3379
  3380
  3396
  433
  445
  498
  503
  581
  74
  765
  797
  873
  Trac
  1021
  523
  578
  684
  783
  fail
  unit
  Util
  PHP
  psr
  src
  log
  Psr
  Log
  Test
  src
  psy
  src
  Sudo
  Util
  test
  Sudo
  Util
  box
  uuid
  src
  Time
  Node
  Time
  src
  src
  diff
  src
  out
  src
  src
  src
  src
  src
  src
  src
  src
  doc
  lib
  Mime
  Pop
  Auth
  Mime
  bug
  unit
  Mime
  Auth
  dkim
  Node
  Node
  psr4
  phpt
  .dot
  b
  a
  A
  B
  C
  copy
  A
  B
  C
  one
  b
  .dot
  a
  dir
  File
  Test
  File
  test
  Test
  Log
  Log
  mime
  Part
  test
  Part
  glob
  Test
  data
  dat
  res
  Util
  Util
  Test
  css
  js
  Test
  Test
  src
  src
  Css
  Rule
  src
  src
  .env
  null
Root / vendor / swiftmailer / swiftmailer / tests / unit / Swift / Mime / Headers / ParameterizedHeaderTest.php
<?php class Swift_Mime_Headers_ParameterizedHeaderTest extends \SwiftMailerTestCase { private $charset = 'utf-8'; private $lang = 'en-us'; public function testTypeIsParameterizedHeader() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $this->assertEquals(Swift_Mime_Header::TYPE_PARAMETERIZED, $header->getFieldType()); } public function testValueIsReturnedVerbatim() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setValue('text/plain'); $this->assertEquals('text/plain', $header->getValue()); } public function testParametersAreAppended() { /* -- RFC 2045, 5.1 parameter := attribute "=" value attribute := token ; Matching of attributes ; is ALWAYS case-insensitive. value := token / quoted-string token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> "/" / "[" / "]" / "?" / "=" ; Must be in quoted-string, ; to use within parameter values */ $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setValue('text/plain'); $header->setParameters(['charset' => 'utf-8']); $this->assertEquals('text/plain; charset=utf-8', $header->getFieldBody()); } public function testSpaceInParamResultsInQuotedString() { $header = $this->getHeader('Content-Disposition', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setValue('attachment'); $header->setParameters(['filename' => 'my file.txt']); $this->assertEquals('attachment; filename="my file.txt"', $header->getFieldBody() ); } public function testLongParamsAreBrokenIntoMultipleAttributeStrings() { /* -- RFC 2231, 3. The asterisk character ("*") followed by a decimal count is employed to indicate that multiple parameters are being used to encapsulate a single parameter value. The count starts at 0 and increments by 1 for each subsequent section of the parameter value. Decimal values are used and neither leading zeroes nor gaps in the sequence are allowed. The original parameter value is recovered by concatenating the various sections of the parameter, in order. For example, the content-type field Content-Type: message/external-body; access-type=URL; URL*0="ftp://"; URL*1="cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" is semantically identical to Content-Type: message/external-body; access-type=URL; URL="ftp://cs.utk.edu/pub/moore/bulk-mailer/bulk-mailer.tar" Note that quotes around parameter values are part of the value syntax; they are NOT part of the value itself. Furthermore, it is explicitly permitted to have a mixture of quoted and unquoted continuation fields. */ $value = str_repeat('a', 180); $encoder = $this->getParameterEncoder(); $encoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), 63, \Mockery::any()) ->andReturn(str_repeat('a', 63)."\r\n". str_repeat('a', 63)."\r\n".str_repeat('a', 54)); $header = $this->getHeader('Content-Disposition', $this->getHeaderEncoder('Q', true), $encoder ); $header->setValue('attachment'); $header->setParameters(['filename' => $value]); $header->setMaxLineLength(78); $this->assertEquals( 'attachment; '. 'filename*0*=utf-8\'\''.str_repeat('a', 63).";\r\n ". 'filename*1*='.str_repeat('a', 63).";\r\n ". 'filename*2*='.str_repeat('a', 54), $header->getFieldBody() ); } public function testEncodedParamDataIncludesCharsetAndLanguage() { /* -- RFC 2231, 4. Asterisks ("*") are reused to provide the indicator that language and character set information is present and encoding is being used. A single quote ("'") is used to delimit the character set and language information at the beginning of the parameter value. Percent signs ("%") are used as the encoding flag, which agrees with RFC 2047. Specifically, an asterisk at the end of a parameter name acts as an indicator that character set and language information may appear at the beginning of the parameter value. A single quote is used to separate the character set, language, and actual value information in the parameter value string, and an percent sign is used to flag octets encoded in hexadecimal. For example: Content-Type: application/x-stuff; title*=us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A Note that it is perfectly permissible to leave either the character set or language field blank. Note also that the single quote delimiters MUST be present even when one of the field values is omitted. */ $value = str_repeat('a', 20).pack('C', 0x8F).str_repeat('a', 10); $encoder = $this->getParameterEncoder(); $encoder->shouldReceive('encodeString') ->once() ->with($value, 12, 62, \Mockery::any()) ->andReturn(str_repeat('a', 20).'%8F'.str_repeat('a', 10)); $header = $this->getHeader('Content-Disposition', $this->getHeaderEncoder('Q', true), $encoder ); $header->setValue('attachment'); $header->setParameters(['filename' => $value]); $header->setMaxLineLength(78); $header->setLanguage($this->lang); $this->assertEquals( 'attachment; filename*='.$this->charset."'".$this->lang."'". str_repeat('a', 20).'%8F'.str_repeat('a', 10), $header->getFieldBody() ); } public function testMultipleEncodedParamLinesAreFormattedCorrectly() { /* -- RFC 2231, 4.1. Character set and language information may be combined with the parameter continuation mechanism. For example: Content-Type: application/x-stuff title*0*=us-ascii'en'This%20is%20even%20more%20 title*1*=%2A%2A%2Afun%2A%2A%2A%20 title*2="isn't it!" Note that: (1) Language and character set information only appear at the beginning of a given parameter value. (2) Continuations do not provide a facility for using more than one character set or language in the same parameter value. (3) A value presented using multiple continuations may contain a mixture of encoded and unencoded segments. (4) The first segment of a continuation MUST be encoded if language and character set information are given. (5) If the first segment of a continued parameter value is encoded the language and character set field delimiters MUST be present even when the fields are left blank. */ $value = str_repeat('a', 20).pack('C', 0x8F).str_repeat('a', 60); $encoder = $this->getParameterEncoder(); $encoder->shouldReceive('encodeString') ->once() ->with($value, 12, 62, \Mockery::any()) ->andReturn(str_repeat('a', 20).'%8F'.str_repeat('a', 28)."\r\n". str_repeat('a', 32)); $header = $this->getHeader('Content-Disposition', $this->getHeaderEncoder('Q', true), $encoder ); $header->setValue('attachment'); $header->setParameters(['filename' => $value]); $header->setMaxLineLength(78); $header->setLanguage($this->lang); $this->assertEquals( 'attachment; filename*0*='.$this->charset."'".$this->lang."'". str_repeat('a', 20).'%8F'.str_repeat('a', 28).";\r\n ". 'filename*1*='.str_repeat('a', 32), $header->getFieldBody() ); } public function testToString() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setValue('text/html'); $header->setParameters(['charset' => 'utf-8']); $this->assertEquals('Content-Type: text/html; charset=utf-8'."\r\n", $header->toString() ); } public function testValueCanBeEncodedIfNonAscii() { $value = 'fo'.pack('C', 0x8F).'bar'; $encoder = $this->getHeaderEncoder('Q'); $encoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo=8Fbar'); $header = $this->getHeader('X-Foo', $encoder, $this->getParameterEncoder(true)); $header->setValue($value); $header->setParameters(['lookslike' => 'foobar']); $this->assertEquals('X-Foo: =?utf-8?Q?fo=8Fbar?=; lookslike=foobar'."\r\n", $header->toString() ); } public function testValueAndParamCanBeEncodedIfNonAscii() { $value = 'fo'.pack('C', 0x8F).'bar'; $encoder = $this->getHeaderEncoder('Q'); $encoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo=8Fbar'); $paramEncoder = $this->getParameterEncoder(); $paramEncoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo%8Fbar'); $header = $this->getHeader('X-Foo', $encoder, $paramEncoder); $header->setValue($value); $header->setParameters(['says' => $value]); $this->assertEquals("X-Foo: =?utf-8?Q?fo=8Fbar?=; says*=utf-8''fo%8Fbar\r\n", $header->toString() ); } public function testParamsAreEncodedWithEncodedWordsIfNoParamEncoderSet() { $value = 'fo'.pack('C', 0x8F).'bar'; $encoder = $this->getHeaderEncoder('Q'); $encoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo=8Fbar'); $header = $this->getHeader('X-Foo', $encoder, null); $header->setValue('bar'); $header->setParameters(['says' => $value]); $this->assertEquals("X-Foo: bar; says=\"=?utf-8?Q?fo=8Fbar?=\"\r\n", $header->toString() ); } public function testLanguageInformationAppearsInEncodedWords() { /* -- RFC 2231, 5. 5. Language specification in Encoded Words RFC 2047 provides support for non-US-ASCII character sets in RFC 822 message header comments, phrases, and any unstructured text field. This is done by defining an encoded word construct which can appear in any of these places. Given that these are fields intended for display, it is sometimes necessary to associate language information with encoded words as well as just the character set. This specification extends the definition of an encoded word to allow the inclusion of such information. This is simply done by suffixing the character set specification with an asterisk followed by the language tag. For example: From: =?US-ASCII*EN?Q?Keith_Moore?= <moore@cs.utk.edu> */ $value = 'fo'.pack('C', 0x8F).'bar'; $encoder = $this->getHeaderEncoder('Q'); $encoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo=8Fbar'); $paramEncoder = $this->getParameterEncoder(); $paramEncoder->shouldReceive('encodeString') ->once() ->with($value, \Mockery::any(), \Mockery::any(), \Mockery::any()) ->andReturn('fo%8Fbar'); $header = $this->getHeader('X-Foo', $encoder, $paramEncoder); $header->setLanguage('en'); $header->setValue($value); $header->setParameters(['says' => $value]); $this->assertEquals("X-Foo: =?utf-8*en?Q?fo=8Fbar?=; says*=utf-8'en'fo%8Fbar\r\n", $header->toString() ); } public function testSetBodyModel() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setFieldBodyModel('text/html'); $this->assertEquals('text/html', $header->getValue()); } public function testGetBodyModel() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setValue('text/plain'); $this->assertEquals('text/plain', $header->getFieldBodyModel()); } public function testSetParameter() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setParameters(['charset' => 'utf-8', 'delsp' => 'yes']); $header->setParameter('delsp', 'no'); $this->assertEquals(['charset' => 'utf-8', 'delsp' => 'no'], $header->getParameters() ); } public function testGetParameter() { $header = $this->getHeader('Content-Type', $this->getHeaderEncoder('Q', true), $this->getParameterEncoder(true) ); $header->setParameters(['charset' => 'utf-8', 'delsp' => 'yes']); $this->assertEquals('utf-8', $header->getParameter('charset')); } private function getHeader($name, $encoder, $paramEncoder) { $header = new Swift_Mime_Headers_ParameterizedHeader($name, $encoder, $paramEncoder); $header->setCharset($this->charset); return $header; } private function getHeaderEncoder($type, $stub = false) { $encoder = $this->getMockery('Swift_Mime_HeaderEncoder')->shouldIgnoreMissing(); $encoder->shouldReceive('getName') ->zeroOrMoreTimes() ->andReturn($type); return $encoder; } private function getParameterEncoder($stub = false) { return $this->getMockery('Swift_Encoder')->shouldIgnoreMissing(); } }