This file contains 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
{ | |
"object": "page", | |
"id": "d745c7a0-aac2-4bc4-be52-df5e58737a1b", | |
"created_time": "2023-04-23T19:08:00.000Z", | |
"last_edited_time": "2023-04-23T19:08:00.000Z", | |
"created_by": { | |
"object": "user", | |
"id": "98f69ff4-b3b5-4ddf-a707-a4aa36d444dc" | |
}, | |
"last_edited_by": { |
This file contains 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 getRowNumberByValue() { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1'); | |
const searchValue = 'value to search for'; | |
const dataRange = sheet.getRange('A:A'); | |
const values = dataRange.getValues(); | |
for (let i = 0; i < values.length; i++) { | |
if (values[i][0] === searchValue) { | |
const rowNumber = i + 1; | |
Logger.log(`Found "${searchValue}" at row ${rowNumber}`); |
This file contains 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
// https://godoc.org/github.com/pkg/errors#Frame.Format | |
package main | |
import ( | |
"fmt" | |
"github.com/pkg/errors" | |
) |
This file contains 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
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', printEnd = "\r"): | |
""" | |
Call in a loop to create terminal progress bar | |
@params: | |
iteration - Required : current iteration (Int) | |
total - Required : total iterations (Int) | |
prefix - Optional : prefix string (Str) | |
suffix - Optional : suffix string (Str) | |
decimals - Optional : positive number of decimals in percent complete (Int) | |
length - Optional : character length of bar (Int) |
This file contains 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
console.log('Hello World'); | |
import satori from 'satori' | |
import { SatoriOptions } from 'satori'; | |
import * as fs from 'fs'; | |
import SVGtoPDF from 'svg-to-pdfkit'; | |
import PDFKit from 'pdfkit'; | |
This file contains 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
<?php | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This file contains 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
// solution 1 | |
func lengthOfLongestSubstring(s string) int { | |
length := len(s) | |
var result []string | |
// fmt.Println(s[1:4]) |
This file contains 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 { HttpService } from '@nestjs/axios'; | |
import { AxiosRequestHeaders } from 'axios'; | |
import { Injectable } from '@nestjs/common'; | |
import { firstValueFrom } from 'rxjs'; | |
@Injectable() | |
export class BaseHttpService { | |
public baseUrl: string; | |
public secretKey: string; | |
private headers: AxiosRequestHeaders = {}; |
This file contains 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 main | |
import "fmt" | |
const ArraySize = 7 | |
type HashTable struct { | |
array [ArraySize]*bucket | |
} |
This file contains 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 main | |
import "fmt" | |
type node struct { | |
data int | |
next *node | |
} | |
type linkedList struct { |