| marp | true |
|---|---|
| theme | default |
| paginate | true |
👨💻 Senior .NET Dev Journey
| import java.net.URI; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| public record PagedResult<T>( | |
| List<T> content, | |
| int pageNumber, // 1-based | |
| int pageSize, | |
| long totalElements, |
| package org.nemesis; | |
| import jakarta.servlet.http.HttpServlet; | |
| import jakarta.servlet.http.HttpServletRequest; | |
| import jakarta.servlet.http.HttpServletResponse; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.servlet.ServletContextHandler; | |
| import org.eclipse.jetty.servlet.ServletHolder; | |
| import java.sql.*; | |
| import java.time.LocalDateTime; |
| import java.time.LocalDate; | |
| import java.util.UUID; | |
| public class Booking { | |
| public String id; | |
| public String guestName; | |
| public String roomNumber; | |
| public LocalDate checkIn; | |
| public LocalDate checkOut; |
| import java.lang.reflect.*; | |
| import java.util.*; | |
| public class DefaultObjectGenerator { | |
| public <T> T create(Class<T> clazz) { | |
| try { | |
| // Base cases: primitive, string, enum | |
| if (isSimpleType(clazz)) return getPrimitive(clazz); | |
| if (clazz.isEnum()) return clazz.cast(createEnumValue(clazz)); |
| package conditionalFormattingExcel; | |
| import org.jetbrains.annotations.NotNull; | |
| public sealed interface FormattableNumber permits FormattableNumber.Currency, FormattableNumber.Fixed, FormattableNumber.Percentage { | |
| double rawNumber(); | |
| static Fixed ofFixed(double value) { | |
| return new Fixed(value); | |
| } |
| package evaluation; | |
| import com.ezylang.evalex.EvaluationException; | |
| import com.ezylang.evalex.Expression; | |
| import com.ezylang.evalex.config.ExpressionConfiguration; | |
| import com.ezylang.evalex.data.EvaluationValue; | |
| import com.ezylang.evalex.functions.AbstractFunction; | |
| import com.ezylang.evalex.functions.FunctionParameter; | |
| import com.ezylang.evalex.parser.Token; | |
| import lombok.extern.slf4j.Slf4j; |
| <# | |
| .SYNOPSIS | |
| This script provides three modes of operation: | |
| 1. Converts a given string to its hexadecimal representation. | |
| 2. Decodes a given hexadecimal string back to its original UTF-8 representation. | |
| 3. Renames files in a given directory by encoding the part of the filename before the first '.' or '_'. | |
| .PARAMETER InputString | |
| A string that will be converted to hexadecimal encoding. |
| $process = Get-Process | Where-Object { $_.MainWindowTitle -like "*xxx*" } | |
| if ($process) { | |
| # Get the executable file path | |
| $exePath = Get-CimInstance -ClassName Win32_Process -Filter "ProcessId = $($process.Id)" | Select-Object -ExpandProperty ExecutablePath | |
| Write-Output "Executable Path: $exePath" | |
| } else { | |
| Write-Output "No process found with the specified window title." | |
| } |
| package org.example2; | |
| import com.fasterxml.jackson.core.*; | |
| import com.fasterxml.jackson.databind.*; | |
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | |
| import java.io.IOException; | |
| import java.util.*; | |
| import java.util.stream.Collectors; |