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
| import { useState } from "react" | |
| export interface NescafeXpressProps { | |
| type: "Americano" | "Original" | "Latte" | "Black Roast" | "Vanilla" | "Caramel" | "Cafe Choco" | |
| image: string | |
| rating: string | |
| } | |
| export function NescafeXpressCard({ type, image, rating }: NescafeXpressProps) { | |
| return ( |
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
| const fs = require('fs'); | |
| const path = require('path'); | |
| const generatedDirectory = 'lib/api'; | |
| function removeNonTsFilesAndEmptyFolders(directory) { | |
| fs.readdirSync(directory).forEach((item) => { | |
| const itemPath = path.join(directory, item); | |
| if (fs.statSync(itemPath).isDirectory()) { | |
| removeNonTsFilesAndEmptyFolders(itemPath); | |
| if (fs.readdirSync(itemPath).length === 0) { | |
| fs.rmdirSync(itemPath); |
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
| static string RemoveDiacritics(this string text) | |
| { | |
| Encoding srcEncoding = Encoding.UTF8; | |
| Encoding destEncoding = Encoding.GetEncoding(1252); | |
| text = destEncoding.GetString(Encoding.Convert(srcEncoding, destEncoding, srcEncoding.GetBytes(text))); | |
| string normalizedString = text.Normalize(NormalizationForm.FormD); | |
| StringBuilder result = new StringBuilder(); |
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
| # Common IntelliJ Platform excludes | |
| # User specific | |
| **/.idea/**/workspace.xml | |
| **/.idea/**/tasks.xml | |
| **/.idea/shelf/* | |
| **/.idea/dictionaries | |
| **/.idea/httpRequests/ | |
| # Sensitive or high-churn files |
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
| namespace API.Extensions | |
| { | |
| public static class ApplicationServiceExtensions | |
| { | |
| public static IServiceCollection AddApplicationServices(this IServiceCollection services, IConfiguration config) | |
| { | |
| services.AddSwaggerGen(c => | |
| { | |
| c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebAPIv5", Version = "v1" }); | |
| }); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.ComponentModel.DataAnnotations; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Reflection; | |
| namespace theilgazcode.Utilities | |
| { |
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
| function GetCurrentDateTime:string; | |
| var | |
| Year, Month, Day, Hour, Min, Sec, MSec: Word; | |
| sYear, sMonth, sDay, sHour, sMin, sSec: string; | |
| begin | |
| DecodeDate(Now, Year, Month, Day); | |
| DecodeTime(Now, Hour, Min, Sec, MSec); | |
| sYear := Copy(Year.ToString, 3, 2); | |
| if Month < 10 then sMonth := '0'+Month.ToString else sMonth := Month.ToString; | |
| if Day < 10 then sDay := '0'+Day.ToString else sDay := Day.ToString; |