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
| public static class DateTimeHelpers | |
| { | |
| /// <summary> | |
| /// Generates a list of dates representing the next week's dates starting from the upcoming Sunday. | |
| /// </summary> | |
| /// <returns>A list of <see cref="DateOnly"/> objects representing the dates of the next week.</returns> | |
| public static List<DateOnly> NextWeeksDates() | |
| { | |
| var start = DateTime.Now; | |
| var nextSunday = DateOnly.FromDateTime(start).Next(DayOfWeek.Sunday); |
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
| #!/bin/bash | |
| QUERY=query.json | |
| time curl -i -XPOST \ | |
| -o output.log \ | |
| --data "@$QUERY" \ | |
| -H "Accept: application/json" \ | |
| -H "Content-Type: application/json" \ | |
| http://127.0.0.1:7474/db/data/transaction/commit |
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
| z-counter::part(root) { | |
| @apply font-bold flex flex-col gap-2 items-center text-gray-600; | |
| } | |
| z-counter::part(count) { | |
| @apply text-4xl leading-none; | |
| } | |
| z-counter::part(title) { | |
| @apply max-w-fit text-lg flex gap-4; |
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
| package form | |
| import ( | |
| "encoding/json" | |
| "gopkg.in/guregu/null.v4/zero" | |
| ) | |
| type OptionalText string |
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
| <body class="antialiased sans-serif bg-gray-300"> | |
| <!-- Alert Box --> | |
| <div class="fixed w-full z-50 flex inset-0 items-start justify-center pointer-events-none md:mt-5" x-data="{ | |
| message: '', | |
| showFlashMessage(event) { | |
| this.message = event.detail.message; | |
| setTimeout(() => this.message = '', 3000) | |
| } | |
| }"> | |
| <template x-on:flash.window="showFlashMessage(event)"></template> |
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
| // Sequence generator function (commonly referred to as "range", e.g. Clojure, PHP etc) | |
| const range = (start, stop, step = 1) => Array.from({ length: (stop - start) / step + 1}, (_, i) => start + (i * step)); | |
| // Generate numbers range 0..4 | |
| range(0, 4); | |
| // [0, 1, 2, 3, 4] | |
| // Generate numbers range 1..10 with step of 2 | |
| range(1, 10, 2); | |
| // [1, 3, 5, 7, 9] |
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
| Column A | Column B | Column C | Formula | |
|---|---|---|---|---|
| 1 | 2 | 5 | =SUM(A2:C2) | |
| 5 | 3 | 10 | =A3*C3+B3 | |
| 2 | 2 | 4 | =COUNTIF(A:C,2) | |
| 0 | 0 | No | =IF(and(A5=0,B5=0,C5="Yes"),1,0) | |
| 0 | 0 | Yes | =IF(and(A6=0,B6=0,C6="Yes"),1,0) | |
| 1 | 0 | 1 | =IF(AND(A7=1,B7=0),"UPDATE",IF(AND(A7=0,B7=1),"CHECK","No Change")) | |
| 0 | 1 | 1 | =IF(AND(A8=1,B8=0),"UPDATE",IF(AND(A8=0,B8=1),"CHECK","No Change")) | |
| 0 | 0 | 0 | =IF(AND(A9=1,B9=0),"UPDATE",IF(AND(A9=0,B9=1),"CHECK","No Change")) |
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.IO; | |
| using System.Text.RegularExpressions; | |
| namespace DocImportStrategies | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| version: '2' | |
| services: | |
| nginx-proxy: | |
| container_name: nginx-proxy | |
| image: jwilder/nginx-proxy:alpine | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock:ro |
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
| // If you want to convert a PascalCase variable to camelCase, you can do the following: | |
| // Where `n` is the tab stop you want to reference | |
| ${n/^(.)(.*)$/${1:/downcase}${2}/} | |
| // Example: ${1:This is my original} => ${1/^(.)(.*)$/${1:/downcase}${2}/} | |
| // If you want to convert a camelCase variable to PascalCase, you can do the following: | |
| // Where `n` is the tab stop you want to reference | |
| ${n/^(.)(.*)$/${1:/upcase}${2}/} |
NewerOlder