diff --git a/pastes/pastes_20231104120612.csv b/pastes/pastes_20231104120612.csv new file mode 100644 index 0000000..54da13c --- /dev/null +++ b/pastes/pastes_20231104120612.csv @@ -0,0 +1,4421 @@ +id,title,username,language,date,content +AJaE0WZ9,data742,TestGuy1,JSON,Saturday 4th of November 2023 07:00:06 AM CDT,"{ + status: 'Success', + method: 'server', + maindata: '409002a1d5f71c746c190d66766d9f00bba03cecbdbd7f8d27d36f6f096876eea20c44d98e38f93b5a6027d4b841a9fe99fb595ac6fb523160475acdd4026e70e73b27b36ad9ceff6ee860c54102165ea2dee2b1df79357854031fac8845cda7a0c5a5d70b518bc93bd1b737b1734d1436f4ea562581187f85a4393fb63a1a00', + otherdata: [ + 'da979de43586dfc447a36bd37d7cab5d', + 'fdd34d6d970effcc70622ce7d50066b4', + '2c2080ef395dbba6cf09473f1c9cc625', + '185cddaa17a1df2a737c2b4b63d5544b', + 'd4639b34fb6b2bad8c121e14a8b2d5c9', + '7748abde47cd63d6865467c682f5b010', + 'd00923b6875c91cd737202c1d453892f', + 'dff239028287c3a68ee7144a70da88e3' + ] +}" +s7Vdk03Q,bimbimbambam,deltaDelete,C#,Saturday 4th of November 2023 06:54:54 AM CDT,"using Avalonia.Collections; + +using System; +using System.Linq; +using ReactiveUI; + +public class MainViewModel : ReactiveObject +{ + private AvaloniaList _items; + private string _searchText; + + public MainViewModel() + { + // Инициализация данных для таблицы + Items = new AvaloniaList + { + new Item { Name = ""Item 1"", Description = ""Description 1"" }, + new Item { Name = ""Item 2"", Description = ""Description 2"" }, + new Item { Name = ""Item 3"", Description = ""Description 3"" }, + }; + this.WhenAnyValue(x => x.SearchText) + .Subscribe(FilterItems); + } + + public AvaloniaList Items + { + get => _items; + set => this.RaiseAndSetIfChanged(ref _items, value); + } + + public string SearchText + { + get => _searchText; + set => this.RaiseAndSetIfChanged(ref _searchText, value); + } + + private void FilterItems(string searchText) + { + var filteredItems = _items.Where(item => + item.Name.Contains(searchText, StringComparison.OrdinalIgnoreCase) || + item.Description.Contains(searchText, StringComparison.OrdinalIgnoreCase)).ToList(); + Items = new AvaloniaList(filteredItems); + } +} + +public class Item +{ + public string Name { get; set; } + public string Description { get; set; } +} +" +q5tGCiNH,Untitled,Darlington_E47,Python,Saturday 4th of November 2023 06:29:53 AM CDT,"import tkinter as tk +import sqlite3 + +#conn = sqlite3.connect('C:/Users/tester/Documents/ФАРБА.db') +conn = sqlite3.connect('/home/darlington/Desktop/develope/PAINT.db') +cursor = conn.cursor() + +# Створення таблиці, якщо вона не існує +cursor.execute('''CREATE TABLE IF NOT EXISTS my_table ( + id INTEGER PRIMARY KEY, + Дата_приходу DATE, + Назва_фарби TEXT, + M0 REAL, + M1 REAL, + M2 REAL, + Результат REAL, + Середнє REAL + )''') + +conn.commit() +conn.close( +# Закриття з'єднання з базою даних + + + +def calculatefirst(): + date = str(entry_date.get()) + name = str(entry_paint.get()) + bank = int(entry_num.get()) + m01 = float(entry_m0.get()) + m11 = float(entry_m1.get()) + m21 = float(entry_m2.get()) + x1 = m21 - m01 + x2 = m11 - m01 + x3 = x1 / x2 + res = x3 * 100 + resout1 = float(f""{res:.4f}"") + result_label.config(text = f""\n\n Дата приходу: {date}\nФарба: {name}\nЧашка №{bank} має залишок: {res:.2f}"") + return resout1 + + +def calculatesecond(): + date = str(entry_date.get()) + name = str(entry_paint.get()) + bank = int(entry_num_right.get()) + m02 = float(entry_m0_right.get()) + m12 = float(entry_m1_right.get()) + m22 = float(entry_m2_right.get()) + x1 = m22 - m02 + x2 = m12 - m02 + x3 = x1 / x2 + res = x3 * 100 + resout2 = float(f""{res:.4f}"") + result_label_right.config(text = f""\n\n Дата приходу: {date}\nФарба: {name}\nЧашка №{bank} має залишок: {res:.2f}"") + return resout2 + +def calculate_average(): + if not entry_num.get() or not entry_m0.get() or not entry_m1.get() or not entry_m2.get() or not entry_num_right.get() or not entry_m0_right.get() or not entry_m1_right.get() or not entry_m2_right.get(): + # Вивести повідомлення про незаповнені поля або обробити іншим чином + return + + resout1 = calculatefirst() + resout2 = calculatesecond() + finres = (resout1 + resout2) / 2 + out = float(f""{finres:.2f}"") + average_label.config(text=f""\nСЕРЕДНІЙ ЗАЛИШОК: {out:.2f}"") + return out + + +def db_register(out): + resout1 = calculatefirst() + resout2 = calculatesecond() + date = str(entry_date.get()) + name = str(entry_paint.get()) + bank = int(entry_num.get()) + m01 = float(entry_m0.get()) + m11 = float(entry_m1.get()) + m21 = float(entry_m2.get()) + m02 = float(entry_m0_right.get()) + m12 = float(entry_m1_right.get()) + m22 = float(entry_m2_right.get()) + cursor.execute('''INSERT INTO my_table (Дата_приходу, Назва_фарби, M0, M1, M2, Результат, Середнє) + VALUES (?, ?, ?, ?, ?, ?, ?)''', (date, name, m01, m11, m21, resout1, out )) + cursor.execute('''INSERT INTO my_table (Дата_приходу, Назва_фарби, M0, M1, M2, Результат, Середнє) + VALUES (?, ?, ?, ?, ?, ?, ?)''', (date, name, m02, m12, m22, resout2, out )) + conn.commit() + conn.close() + +def clear(): + entry_m0.delete(0, 'end') + entry_m1.delete(0, 'end') + entry_m2.delete(0, 'end') + entry_num.delete(0, 'end') + entry_date.delete(0, 'end') + entry_paint.delete(0, 'end') + entry_m0_right.delete(0, 'end') + entry_m1_right.delete(0, 'end') + entry_m2_right.delete(0, 'end') + entry_num_right.delete(0, 'end') + +root = tk.Tk() +root.title(""Сухий залишок"") +#перша колонка +# Створення LabelFrame для першого блоку даних + +left_data_frame = tk.LabelFrame(root, text=""Перша чашка"") +left_data_frame.grid(row=4, column=0, padx=10, pady=10) + +num = tk.Label(left_data_frame, text=""Номер чашки:"") +paint_name = tk.Label(root, text=""Назва фарби:"") +date = tk.Label(root, text=""Дата приходу:"") +entry_paint = tk.Entry(root) +entry_date = tk.Entry(root) +entry_num = tk.Entry(left_data_frame) + +label_m0 = tk.Label(left_data_frame, text=""M0:"") +entry_m0 = tk.Entry(left_data_frame) + +label_m1 = tk.Label(left_data_frame, text=""M1:"") +entry_m1 = tk.Entry(left_data_frame) + +label_m2 = tk.Label(left_data_frame, text=""M2:"") +entry_m2 = tk.Entry(left_data_frame) + +calculate_button1 = tk.Button(left_data_frame, text=""Обчислити чашку"", command=lambda: calculatefirst()) +calculate_button1.grid(row=5, column=2, sticky = ""nsew"") + +num.grid(row=1, column=1) +entry_num.grid(row=1, column=2) +label_m0.grid(row=2, column=1, sticky = ""e"") +entry_m0.grid(row=2, column=2) +label_m1.grid(row=3, column=1, sticky = ""e"") +entry_m1.grid(row=3, column=2) +label_m2.grid(row=4, column=1, sticky = ""e"") +entry_m2.grid(row=4, column=2) + +date.grid(row=1, column=0) +entry_date.grid(row=1, column=1) +paint_name.grid(row=2, column=0) +entry_paint.grid(row=2, column=1) + +# Створення LabelFrame для другого блоку даних +right_data_frame = tk.LabelFrame(root, text=""Друга чашка"") +right_data_frame.grid(row=4, column=1, padx=10, pady=10) + +num_right = tk.Label(right_data_frame, text=""Номер чашки:"") +entry_num_right = tk.Entry(right_data_frame) + +label_m0_right = tk.Label(right_data_frame, text=""M0:"") +entry_m0_right = tk.Entry(right_data_frame) + +label_m1_right = tk.Label(right_data_frame, text=""M1:"") +entry_m1_right = tk.Entry(right_data_frame) + +label_m2_right = tk.Label(right_data_frame, text=""M2:"") +entry_m2_right = tk.Entry(right_data_frame) + +clear_button = tk.Button(root, text = ""Очистити"", command = lambda: clear()) +clear_button.grid(row=6, column=1, sticky=""e"") +calculate_button2 = tk.Button(right_data_frame, text=""Обчислити чашку"", command=lambda: calculatesecond()) +num_right.grid(row=1, column=1) +entry_num_right.grid(row=1, column=2) +label_m0_right.grid(row=2, column=1, sticky = ""e"") +entry_m0_right.grid(row=2, column=2) +label_m1_right.grid(row=3, column=1, sticky = ""e"") +entry_m1_right.grid(row=3, column=2) +label_m2_right.grid(row=4, column=1, sticky = ""e"") +entry_m2_right.grid(row=4, column=2) +calculate_button2.grid(row=5, column=2, sticky = 'nsew') +# Створення кнопки для обчислення середнього залишку +calculate_average_button = tk.Button(root, text=""Обчислити середній залишок"", command=lambda: db_register(calculate_average())) +calculate_average_button.grid(row=6, column=0, columnspan=2) + + +result_label = tk.Label(root,text="""") +result_label.grid(row=8, column=0, sticky='w') +result_label_right = tk.Label(root, text = """") +result_label_right.grid(row=9, column=0,sticky='w') +average_label = tk.Label(root,text="""") +average_label.grid(row = 10, column=0, sticky='w') + + + + +root.mainloop()" +nZzgB0Ds,BTC Wallet Credentials have been reset,castlclass_20,GetText,Saturday 4th of November 2023 06:22:09 AM CDT,"Dear User +We have received a request to reset the login information for your Bitcoin wallet. If you did not make this request, please disregard this message. +Your new login credentials will be +taginestg:H9pz49 on 212.224.93.130 +You can connect via SSH . +Regards" +4VH5sVXc,treesimple,bldng1,Lua,Saturday 4th of November 2023 05:57:59 AM CDT,"os.loadAPI(""bldng/lib"") +lib.addtoworth(""log"") +lib.move(1,0,0) +lib.goback()" +Zdt5C7wf,snowybot upgraded,coinwalk,JavaScript,Saturday 4th of November 2023 05:38:50 AM CDT,"var originalbal = parseFloat(document.getElementById('pct_balance').value); +var base = Number((originalbal/100).toFixed(8)); +var floatingbase = base; +var taget = (originalbal*7); +var groupedten = (base*10); +var groupedseven = (base*6.5); +var tobetnext = ((floatingbase*1).toFixed(8)); +var bolance = originalbal; +var over = 6.9; +var under = 2.9; +var oldbolancetwo = originalbal; +var oldbolance = ((Math.floor(originalbal/groupedten))*groupedten); + +function get(){ +console.clear(); +setTimeout(function(){ +bolance = document.getElementById('pct_balance').value; +if (bolance>(oldbolance+(floatingbase*over))) { + floatingbase = floatingbase*2; + over = 4.9; + under = 4.9; + oldbolance = parseFloat(bolance); +} +if (bolance<(oldbolance-(floatingbase*under))) { + floatingbase = floatingbase*2; + over = 4.9; + under = 4.9; + oldbolance = parseFloat(bolance); +} +if ((floatingbase>=(originalbal/10))&&(bolance<(((Math.floor(bolance/groupedten))*groupedten)+groupedseven))){ + floatingbase = base; + over = 6.9; + under = 2.9; + oldbolance = ((Math.floor(bolance/groupedten))*groupedten); + oldbolancetwo = parseFloat(bolance); +} +if ((floatingbase>=(bolance/20))&&(bolance>oldbolancetwo)){ + oldbolancetwo = parseFloat(bolance); +} +if ((floatingbase>=(bolance/20))&&(bolance= taget) { + console.log(""winner winner chicken dinner""); + return; + } +tobetnext = ((floatingbase*1).toFixed(8)); +$('#pct_chance').val(49.5); +$('#pct_bet').val(tobetnext); +$('#a_lo').click(); +}, 100); +var good = ((bolance-originalbal).toFixed(8)); +console.log(""profit""); +console.log(good); +setTimeout(() => get(), 200); +} +get();" +rHjRVJB9,VacuumAfter2Hours,Michael_ich,JSON,Saturday 4th of November 2023 05:38:14 AM CDT,"[ + { + ""id"": ""b981cf6fbb55d3bb"", + ""type"": ""server-state-changed"", + ""z"": ""3b9fd1dd2721a9a5"", + ""name"": """", + ""server"": ""9255c353.0ab86"", + ""version"": 4, + ""exposeToHomeAssistant"": true, + ""haConfig"": [ + { + ""property"": ""name"", + ""value"": ""meleavinghome"" + }, + { + ""property"": ""icon"", + ""value"": """" + } + ], + ""entityidfilter"": ""group.michael_local_devices"", + ""entityidfiltertype"": ""exact"", + ""outputinitially"": false, + ""state_type"": ""str"", + ""haltifstate"": ""not_home"", + ""halt_if_type"": ""str"", + ""halt_if_compare"": ""is"", + ""outputs"": 2, + ""output_only_on_state_change"": true, + ""for"": ""2"", + ""forType"": ""num"", + ""forUnits"": ""hours"", + ""ignorePrevStateNull"": false, + ""ignorePrevStateUnknown"": false, + ""ignorePrevStateUnavailable"": false, + ""ignoreCurrentStateUnknown"": false, + ""ignoreCurrentStateUnavailable"": false, + ""outputProperties"": [ + { + ""property"": ""payload"", + ""propertyType"": ""msg"", + ""value"": """", + ""valueType"": ""entityState"" + }, + { + ""property"": ""data"", + ""propertyType"": ""msg"", + ""value"": """", + ""valueType"": ""eventData"" + }, + { + ""property"": ""topic"", + ""propertyType"": ""msg"", + ""value"": """", + ""valueType"": ""triggerId"" + } + ], + ""x"": 250, + ""y"": 420, + ""wires"": [ + [ + ""df1e1da372f8ad97"" + ], + [] + ] + }, + { + ""id"": ""df1e1da372f8ad97"", + ""type"": ""api-call-service"", + ""z"": ""3b9fd1dd2721a9a5"", + ""name"": """", + ""server"": ""9255c353.0ab86"", + ""version"": 5, + ""debugenabled"": false, + ""domain"": ""vacuum"", + ""service"": ""start"", + ""areaId"": [], + ""deviceId"": [], + ""entityId"": [ + ""vacuum.roborock_s5_max"" + ], + ""data"": """", + ""dataType"": ""jsonata"", + ""mergeContext"": """", + ""mustacheAltTags"": false, + ""outputProperties"": [], + ""queue"": ""none"", + ""x"": 530, + ""y"": 420, + ""wires"": [ + [] + ] + } +]" +Whw5afRF,mentes_format,virtualm64,Bash,Saturday 4th of November 2023 05:35:29 AM CDT,"#!/bin/bash + +# mentes_format.sh + +# megnézzük a meghajtókat +#lsblk -f + +# honnan hova +RSYNCDIR=/home/wt/mentes/balcsiwt/ +DEV=/dev/sdc + +# partícionálás (két partíció) +printf ""n\np\n1\n2048\n+512M\nt 1\nc\na\nn2\n\n\nw\nq\n"" | fdisk $(DEV) +#lsblk -f + +# formázás - 2 partició +sudo mkfs.vfat -F 32 $(DEV)1 +sudo mkfs.ext2 -D $(DEV)2 + +# mountolás +mount $(DEV)2 /mnt +mkdir /mnt/boot +mount $(DEV)1 /mnt/boot + +mkdir /mnt/bootfs + +# a /rootfs nem kell ? +mkdir /mnt/rootfs + +# fájlok másolása +cp -r $(RSYNCDIR) /mnt + +# lecsatolás +umount /mnt/boot +umount /mnt + +echo "" "" +echo "" Kész.""" +bCcKVcR9,brain farts gone snowy el manual,coinwalk,JavaScript,Saturday 4th of November 2023 05:29:36 AM CDT,"var smiley = parseFloat(document.getElementById('pct_balance').value); +var nudie = Number((smiley/100).toFixed(8)); +var burp = nudie; +var taget = (smiley*7); +var bolux = (nudie*10); +var poopy = (nudie*6.5); +var jockey = ((burp*1).toFixed(8)); +var bolance = smiley; +var over = 6.9; +var under = 2.9; +var woman = smiley; +var sexual = ((Math.floor(smiley/bolux))*bolux); + +function get(){ +console.clear(); +setTimeout(function(){ +bolance = document.getElementById('pct_balance').value; +if (bolance>(sexual+(burp*over))) { + burp = burp*2; + over = 4.9; + under = 4.9; + sexual = parseFloat(bolance); +} +if (bolance<(sexual-(burp*under))) { + burp = burp*2; + over = 4.9; + under = 4.9; + sexual = parseFloat(bolance); +} +if ((burp>=(smiley/10))&&(bolance<(((Math.floor(bolance/bolux))*bolux)+poopy))){ + burp = nudie; + over = 6.9; + under = 2.9; + sexual = ((Math.floor(bolance/bolux))*bolux); + woman = parseFloat(bolance); +} +if ((burp>=(bolance/20))&&(bolance>woman)){ + woman = parseFloat(bolance); +} +if ((burp>=(bolance/20))&&(bolance= taget) { + console.log(""winner winner chicken dinner""); + return; + } +jockey = ((burp*1).toFixed(8)); +$('#pct_chance').val(49.5); +$('#pct_bet').val(jockey); +$('#a_lo').click(); +}, 100); +var good = ((bolance-smiley).toFixed(8)); +console.log(""profit""); +console.log(good); +setTimeout(() => get(), 200); +} +get();" +d0wsXSZ5,secret snowy business updated,coinwalk,JavaScript,Saturday 4th of November 2023 05:23:49 AM CDT,"var smiley = parseFloat(document.getElementById('pct_balance').value); +var nudie = Number((smiley/100).toFixed(8)); +var burp = nudie; +var taget = (smiley*7); +var bolux = (nudie*10); +var poopy = (nudie*6.5); +var jockey = ((burp*1).toFixed(8)); +var bolance = smiley; +var over = 6.9; +var under = 2.9; +var woman = smiley; +var sexual = ((Math.floor(smiley/bolux))*bolux); + +function get(){ +console.clear(); +setTimeout(function(){ +bolance = document.getElementById('pct_balance').value; +if (bolance>(sexual+(burp*over))) { + burp = burp*2; + over = 4.9; + under = 4.9; + sexual = parseFloat(bolance); +} +if (bolance<(sexual-(burp*under))) { + burp = burp*2; + over = 4.9; + under = 4.9; + sexual = parseFloat(bolance); +} +if (burp>=(smiley/10)){ + burp = nudie; + over = 6.9; + under = 2.9; + sexual = ((Math.floor(bolance/bolux))*bolux); + woman = parseFloat(bolance); +} +if ((burp>=(bolance/20))&&(bolance>woman)){ + woman = parseFloat(bolance); +} +if ((burp>=(bolance/20))&&(bolance= taget) { + console.log(""winner winner chicken dinner""); + return; + } +jockey = ((burp*1).toFixed(8)); +$('#pct_chance').val(49.5); +$('#pct_bet').val(jockey); +$('#a_lo').click(); +}, 100); +var good = ((bolance-smiley).toFixed(8)); +console.log(""profit""); +console.log(good); +setTimeout(() => get(), 200); +} +get();" +Kqcs6BBv,adventuron_RETURN_GR_part_template005g4_231101,plirof2,JavaScript,Saturday 4th of November 2023 05:00:29 AM CDT,"""{return '\\n#Adventuron ΕΛΛΗΝΙΚΗ ΜΕΤΑΦΡΑΣΗ\\n\\n#adventuron_initial_gr_script_v05g4.txt\\n# Για μεταφραση ιδέες https://github.com/paravaariar/adventuron_french_notes\\n# κωδικας εξτρα https://adventuron.io/documentation/cookbook.html (block location etc)\\nstart_at = outside_cave\\n\\n## Defines locations in the world - #Τοποθεσίες : Εδώ θα βάλετε όλες τις τοποθεσίες που θα έχει το παιχνίδι σας.\\n\\nlocations {\\n lakeside : location \""Είσαι δίπλα σε μια πανέμορφη λίμνη..\"" ;\\n outside_cave : location \""Είσαι έξω από μία σπηλιά. Η είσοδος είναι βόρεια.\"" ;\\n treasure_room : location \""Είσαι στο δωμάτιο του θησαυρού.\"" ; \\n}\\n\\n# Defines things in the world (scenery cannot be carried). Αντικείμενα που έχει το παιχνίδι σας.\\n\\nobjects {\\n apple : object \""ένα μήλο\"" msg=\""Νόστιμο.\"" at = \""lakeside\"" get_message = \""πήρες το μήλο\"";\\n troll : scenery \"" ένα τεράστιο Τρολ\"" at = \""outside_cave\"" msg=\""Πεινάει.\"";\\n lamp : object \""a lamp\"" at = \""treasure_room\"" get_message = \""You pick up the dusty lamp\"";\\n}\\n \\nconnections {\\n\\n ## Connects locations together (bidirectional). Συνδέσεις τοποθεσίών.\\n \\n from, direction, to = [\\n lakeside, north, outside_cave\\n outside_cave, north, treasure_room,\\n ]\\n}\\n\\nbarriers {\\n\\n ## Blocks Access To Cave Whilst Troll Exists (with message)\\n \\n block_cave : block {\\n location = treasure_room\\n message = Το Τρολ φυλάει την σπηλιά .\\n block_when_exists = troll\\n show_blocked_exit = true\\n }\\n \\n} \\n\\n## Print the objective when the game starts\\n\\non_startup {\\n : print \""CAVE OF MAGIC !\"" ;\\n : print \""ΕΞΕΡΕΥΝΗΣΤΕ ΤΟΝ ΧΩΡΟ.\"" ;\\n : print \""ΚΙΝΗΣΟΥ γράφοντας: Βόρεια(Β)/North,Ανατολικά(Α)/East,Δυτικά(Δ)/West, Νότια(Ν)/South.\"" ;\\n : print \""Μερικές από τις λέξεις που μπορείς να χρησιμοποιήσεις: ΠΑΡΕ, ΡΙΞΕ, ΔΩΣΕ, ΤΣΕΠΕΣ, ΚΟΙΤΑ, ΔΕΣ, ΒΟΗΘΕΙΑ\"" ;\\n : press_any_key ;\\n}\\n\\n## Execute this every time a player moves or redescribes a location\\n\\non_describe {\\n : if (is_at \""treasure_room\"" ) {\\n : print \""ΜΠΡΑΒΟ!! ΒΡΗΚΕΣ ΤΟΝ ΘΗΣΑΥΡΟ. ΚΕΡΔΙΣΕΣ!\"" ;\\n : win_game ;\\n }\\n}\\n\\n## Test VERB NOUN that the player types and executes conditional actions\\n\\non_command {\\n: match \""help _\"" {\\n : print \""- Γράψε \\\'ΔΕΣ/ΚΟΙΤΑ/LOOK\\\' για να ανανεωθεί η οθόνη \"" ;\\n : print \""- Γράψε \\\'Β,Ν,Δ,Α\\\' για να κινηθείς Βόρεια,Νότια,Δυτικά,Ανατολικά \"" ;\\n : print \""- Γράψε \\\'Ι/ΤΣΕΠΕΣ/INVENTORY\\\' για να δεις τι κρατάς \"" ;\\n : print \""- Γράψε \\\'ΠΑΡΕ αντικείμενο\\\' για να πάρεις το αντικείμενο \"" ;\\n : print \""- Γράψε \\\'ΡΙΞΕ αντικείμενο\\\' για να ρίξεις το αντικείμενο \"" ;\\n : print \""- Γράψε \\\'ΔΩΣΕ κάτι ΣΕ κάποιον \\\' για να δώσεις ένα αντικείμενο σε κάποιον \"" ;\\n : print \""- Γράψε \\\'SAVE/LOAD\\\' για να αποθηκευσεις/επαναφέρεις την πρόοδο σου στο παιχνίδι\"" ;\\n } \\n\\n : match \""give apple\"" {\\n : if (is_present \""troll\"" && is_carried \""apple\"") {\\n : print \""Το Τρολ τρώει το μήλο και φεύγει.\"" ;\\n : destroy \""apple\"" ;\\n : destroy \""troll\"" ;\\n }\\n }\\n}\\n\\n\\n\\nvocabulary {\\n\\n // Here we assocated new words with the already supported english system vocab\\n //Εδώ βάζουμε συννώνυμες ή παρόμοιες λέξεις. Σημείωση: Γράφουμε την λέξη με τόνο και χωρίς τόνο. Επίσης με τελικό σ και τελικό ς .\\n : verb / aliases = [e, Α ,ανατολικά ,ανατολικα ] \\n : verb / aliases = [south, Ν ,Νότια ,Νοτια ] \\n : verb / aliases = [north, Β ,Βόρεια ,ΒΟΡΕΙΑ ] \\n : verb / aliases = [west, Δ ,Δυτικά ,δυτικά ] \\n : verb / aliases = [up, Π,ΠΑΝΩ ,πάνω ,πανω ] \\n : verb / aliases = [down, Κ, ΚΑΤΩ,κάτω,κατω ] \\n \\n : verb / aliases = [examine, εξέτασε,ΕΞΕΤΑΣΕ ]\\n : verb / aliases = [get, ΠΑΡΕ, πάρε ]\\n : verb / aliases = [give, ΔΩΣΕ, δώσε ]\\n : verb / aliases = [drop,ρίξε,ριξε,αφησε,άφησε , droptranslated ]\\n : verb / aliases = [inventory,ι,τσέπες,τσεπες,τσέπεσ,τσεπεσ, inventorytranslated ]\\n : verb / aliases = [look, κοίτα,δες,δεσ,κοιτα ]\\n : verb / aliases = [quit, quittranslated ]\\n : verb / aliases = [help, βοήθεια,βοηθεια, helptranslated ]\\n : noun / aliases = [all, ΟΛΑ , όλα ]\\n : noun / aliases = [apple, μήλο , μηλο ] \\n : noun / aliases = [troll, ΤΡΟΛ , ΤΕΡΑΣ ] \\n\\n}\\n\\n\\nthemes {\\n mytheme : theme {\\n # order of the compass directions matters, and must be translated in full (all 12)\\n system_messages {\\n #compass = [north, northeast, east, southeast, south, southwest, west, northwest, up, down, inside, outside] \\n compass = [Βόρεια, northeast, Ανατολικά, southeast, Νότια, southwest, Δυτικά, northwest, up, down, inside, outside]\\n compass_short = [n, ne, e, se, s, sw, w, nw, u, d, in, out]\\n // MORE text to translate\\n all_treasures_found_win_game = Συγχαρητήρια, βρήκες όλους τους θησαυρούς. Κέρδισες!\\n already_in_container = ${entity} είναι ήδη μέσα στο ${entity2}.\\n ask_new_game = Would you like to start a new game?\\n ask_quit = Do you wish to quit the game?\\n be_more_specific = Πρέπει να γίνεις πιο συγκεκριμένος ... \\n cannot_carry_any_more = You cannot carry any more items.\\n cannot_carry_any_more_weight = It\\'s too heavy for you to carry.\\n cant_see_one_of_those = You can\\'t see one of those.\\n cant_take = Δεν μπορείς να το πάρεις.\\n dont_have_one_of_those = You don\\'t have one of those!\\n exit_list_additional_exits_are_located_verbose = Additional exits are located \\n exit_list_end_text =\\n exit_list_end_text_verbose = .\\n exit_list_from_here_you_can_go_verbose = Μπορείς να πάς \\n exit_list_header_concise = Έξοδοι : \\n exit_list_last_sep_verbose = and \\n exit_list_sep_verbose = , \\n exit_list_there_are_no_obvious_exits = Δεν βλέπεις κάποια προφανή έξοδο.\\n exit_list_to_the_verbose = to the\\n exit_list_you_can_also_go_verbose = Μπορείς επίσης να πάς \\n gamebook_question = Select An Option ...\\n i_cant_do_that = Όχι αυτή τη στιγμή.\\n invalid_choice = Λάθος επιλογή.\\n inventory_list_empty = Τίποτα\\n inventory_list_end_text = .\\n inventory_list_final_separator = and \\n inventory_list_header = Κουβαλάς: \\n inventory_list_header_verbose = Κουβαλάς \\n inventory_list_separator = , \\n it_is_dark = It is dark. You can\\'t see a thing.\\n must_remove_first = Try taking it off first.\\n not_carried = You can\\'t ${verb} something you are not carrying.\\n not_present = ${entity} is not here.\\n nothing_here = Δεν υπάρχει τίποτα εδώ.\\n nothing_to_get = You look around but can\\'t see any ${noun} anywhere!\\n object_list_empty = Τίποτα\\n object_list_end_text = .\\n object_list_final_separator = and \\n object_list_header = Βλέπεις : \\n object_list_header_verbose = Βλέπεις\\\\s \\n object_list_separator = , \\n ok = OK\\n on_drop = Αντικείμενο που έριξες\\\\s: ${entity}.\\n on_get = Αντικείμενο που πήρες: ${entity}.\\n on_put = You put ${entity} inside ${entity2}.\\n on_put_non_container = ${entity} is not a container.\\n on_put_non_surface = ${entity} is not a surface.\\n on_remove = You take off ${entity}.\\n on_wear = Φόρεσες ${entity}.\\n post_quit = You have quit the game.\\n prior_prompt = Τι κάνουμε τώρα?\\n prompt = >>\\n question_prompt_char = ?\\n there_is_nothing_you_can = Δεν υπάρχει τίποτα να ${verb} αυτή τη στιγμή.\\n treasure_message =\\n treasure_suffix =\\n unknown_noun = Αυτό το παιχνίδι δεν χρησιμοποιεί την λέξη \""${noun}\"".\\n unknown_verb = Αυτό το παιχνίδι δεν χρησιμοποιεί την λέξη \""${verb}\"".\\n worn_suffix = (worn)\\n you_already_wear = Το φοράς ήδη αυτό.\\n you_are_already_carrying = Έχεις ήδη ${entity}.\\n you_are_not_holding = Δεν κρατάς ${entity}.\\n you_cant_go_that_direction = Δεν μπορείς να πάς εκεί.\\n you_cant_wear = You can\\'t wear that.\\n you_cant_wear_anything_else = You can\\'t wear anything else without removing something first.\\n you_dont_wear = You are not wearing that.\\n you_see_nothing_special = Δεν βλέπεις τίποτα αξιόλογο.\\n\\n }\\n }\\n}\\n\\n\\n\\nassets {\\n graphics {\\n \\n\\n\\n }\\n}\\n'};"" +" +7YSMPehM,Travel Time,Pijomir,JavaScript,Saturday 4th of November 2023 04:51:00 AM CDT,"function checkDestinations(input) { + let destinationsList = {}; + input.forEach(el => { + let [country, town, price] = el.split(' > '); + price = Number(price); + if (!destinationsList.hasOwnProperty(country)) { + destinationsList[country] = {[town]: price}; + } else { + if (destinationsList[country].hasOwnProperty(town)) { + if (price > destinationsList[country][town]) { + price = destinationsList[country][town]; + } + } + + destinationsList[country][town] = price; + } + }); + let sortedDestinations = Object.entries(destinationsList).sort((a, b) => a[0].localeCompare(b[0])); + sortedDestinations.forEach(el => { + let [country, townAndPrice] = el; + let sortedTOwns = Object.entries(townAndPrice).sort((a, b) => a[1] - b[1]).map(a => `${a[0]} -> ${a[1]}`).join(' '); + console.log(`${country} -> ${sortedTOwns}`); + }); +}" +g9nUqbrN,startup_code.s,PecaJ,ARM,Saturday 4th of November 2023 04:37:24 AM CDT,".cpu cortex-m3 +.fpu softvfp +.syntax unified +.thumb + + +.extern _main_stack_pointer_value + +.weak nmi_handler +.thumb_set nmi_handler, default_handler + +.weak hard_fault_handler +.thumb_set hard_fault_handler, default_handler + +.weak mem_fault_handler +.thumb_set mem_fault_handler, default_handler + +.weak bus_fault_handler +.thumb_set bus_fault_handler, default_handler + +.weak usage_fault_handler +.thumb_set usage_fault_handler, default_handler + +.weak sv_call_handler +.thumb_set sv_call_handler, default_handler + +.weak pend_sv_handler +.thumb_set pend_sv_handler, default_handler + +.weak systick_handler +.thumb_set systick_handler, default_handler + +.weak irq0 +.thumb_set irq0, default_handler + +.weak irq1 +.thumb_set irq1, default_handler + +.weak irq2 +.thumb_set irq2, default_handler + +# =============== Vector table ================== +.section .vector_table, ""a"" +.word _main_stack_pointer_value +.word reset_handler +.word nmi_handler +.word hard_fault_handler +.word mem_fault_handler +.word bus_fault_handler +.word usage_fault_handler +.rept 4 + .word default_handler +.endr +.word sv_call_handler +.rept 2 + .word default_handler +.endr +.word pend_sv_handler +.word systick_handler +.word irq0 +.word irq1 +.word irq2 +.rept 65 + .word default_handler +.endr +# ============= End vector table ================= + + +.extern main + +.extern _vma_data_start +.extern _vma_data_end +.extern _lma_data_start + +.section .text.reset_handler +.type reset_handler, %function +reset_handler: + ldr r0, =_lma_data_start + ldr r1, =_vma_data_start + ldr r2, =_vma_data_end + + cmp r0, r1 + beq branch_to_main +copy_loop: + ldr r3, [r0], 4 + str r3, [r1], 4 + cmp r1, r2 + blo copy_loop + +branch_to_main: + b main + +inf_loop: + b inf_loop + + + +.section .text.default_handler +.type default_handler, %function +default_handler: + b default_handler + +.end +" +vysqPHDQ,makefile,PecaJ,Make,Saturday 4th of November 2023 04:36:45 AM CDT,"PROGRAM = program +BUILD_DIR = build +DEBUG_ENABLED = 1 + +SOURCE_S_LIST = \ +src/startup_code.s\ +src/instruction_set.s + +SOURCE_C_LIST = \ +src/main.c \ +src/systick.c + +OBJECTS_LIST = +# Make funkcija notdir daje samo ime fajla (izbacuje source/) +OBJECTS_LIST += ${addprefix ${BUILD_DIR}/, ${notdir ${SOURCE_S_LIST:.s=.o}}} +OBJECTS_LIST += ${addprefix ${BUILD_DIR}/, ${notdir ${SOURCE_C_LIST:.c=.o}}} +# Make funkcija dir vraca samo direktorijum +# vpath kaze make-u u kojim dodatnim direktorijuma da trazi fajlove oblika %.s +vpath %.s ${sort ${dir ${SOURCE_S_LIST}}} +vpath %.c ${sort ${dir ${SOURCE_C_LIST}}} + +# Da kompajler zna gde da trazi include fajlove -Ifolder +FLAGS_INCLUDE = \ +-Iinc + +# format je -fdebug-prefix-map=old=new +# menja putanje u debug informacijama +# kako bi se izbeglo da se u debug informacijama vidi putanja do fajla na racunaru +# tj da ne bude /home/username/... vec samo /... +FLAGS_DEBUG = -g -gdwarf-2 -fdebug-prefix-map==../ + + +CC = arm-none-eabi-gcc.exe -c +AS = arm-none-eabi-gcc.exe -c -x assembler +LD = arm-none-eabi-ld.exe +HX = arm-none-eabi-objcopy.exe -O ihex + +MCU = -mcpu=cortex-m3 -mthumb + + +FLAGS_AS = +FLAGS_AS += $(MCU) +ifeq (${DEBUG_ENABLED}, 1) +FLAGS_AS += ${FLAGS_DEBUG} +endif +# Za automatsko ubacivanje it instrukcije za uslovno izvrsavanje +FLAGS_AS += -Wa,-mimplicit-it=thumb + + +FLAGS_CC = +FLAGS_CC += $(MCU) +# -MMD -MP dodaje .d fajl (dependency) koji sadrzi zavisnosti izmedju fajlova (za .h fajlove) +FLAGS_CC += -MMD -MP +# -mlong-calls omogucava da se pozivaju funkcije koje su udaljene vise od 32MB +FLAGS_CC += -mlong-calls +FLAGS_CC += ${FLAGS_INCLUDE} +ifeq (${DEBUG_ENABLED}, 1) +FLAGS_CC += ${FLAGS_DEBUG} +endif + +LINKER_SCRIPT = linker_script.ld + + +# Cilj je all, preduslovi su program.hex i program.elf +# all ce se izvrsiti nakon sto se izvrse preduslovi +all : ${BUILD_DIR}/${PROGRAM}.hex ${BUILD_DIR}/${PROGRAM}.elf + +# ${@} je cilj, ${<} je prvi preduslov, ${^} predstavlja sve preduslove +${BUILD_DIR}/${PROGRAM}.hex : ${BUILD_DIR}/${PROGRAM}.elf + ${HX} ${<} ${@} + +# Dodavanje makefile kao preduslov obezbedjujemo da ako dodamo neki fajl da ce se opet izvrsiti +# Samim time ne mozemo koristiti ${^} jer to ukljucuje makefile +${BUILD_DIR}/${PROGRAM}.elf : ${OBJECTS_LIST} makefile + ${LD} -T ${LINKER_SCRIPT} -o ${@} ${OBJECTS_LIST} + +# Obicno se vidi oblik -o ${@} ${<} +# Ako postoji neki fajl.s ako ima preduslov fajl.o, ovo ce se izvrsiti +# Kako bi se pravili fajlove u build dir mora da postoji, ali ne treba da pratimo da li je noviji od cilja, samo da postoji +# Zato se navodi kao order only prerequisite - treba samo da postoji +${BUILD_DIR}/%.o : %.s | ${BUILD_DIR} + ${AS} ${FLAGS_AS} -o ${@} ${<} + +# Ovde ne moze se navesti header fajl tako da se nece izvrsiti ako se promeni header fajl +${BUILD_DIR}/%.o : %.c | ${BUILD_DIR} + ${CC} ${FLAGS_CC} -o ${@} ${<} + +# Dodat cilj za pravljenje build dir ako ne postoji +${BUILD_DIR} : + mkdir ${@} + +clean : + rm -rf ${BUILD_DIR} + + +# -include dodaje sve .d fajlove +# wildcard ekspanduje wildcard expression +-include ${wildcard ${BUILD_DIR}/*.d}" +8b4w3BAd,instruction_set.s,PecaJ,ARM,Saturday 4th of November 2023 04:34:58 AM CDT,".cpu cortex-m3 +.fpu softvfp +.syntax unified +.thumb + +.extern _vma_data_start + +.global instruction_set + +.section .text.instruction_set +.type instruction_set, %function +instruction_set: + +@ ================== Branch/jump instrukcije =========================== +@ b{cond} label @ Branch (immediate) +@ bl{cond} label @ Branch with link (immediate) +@ bx{cond} Rm @ Branch indirect (register) +@ blx{cond} Rm @ Branch with link indirect (register) +@ Za link povratna adresa se upisuje u link registar +@ -> moramo sami da cuvamo link registar + +@ Kako bismo koristili dalje link registar kao opstenamenski moramo ga +@ sacuvati u memoriji (na stek) +@ str lr, [sp, -4]! @ Stek pun opadajuci, smanjujemo za jednu + @ rec (4B) pre upisa, i azuriramo ga +@ Alternativno + push {r0-r5, lr} @ backupujemo koriscene registre + +@ ================= Memorijske instrukcije LDR, STR ======================== +@ op{type} [r0, offset] +@ op{type} [r0, offset]! Pre indexed +@ op{type} [r0], offset Post indexed +@ op: ldr, str +@ type: b - byte, sb - signed byte, h - half word, sh - signed half word + + ldr r0, data1 @ Ucitava vrednost sa adrese data1 + @ Ne enkoduje samu adresu, vec pc-relativno + + ldr r0, =data1 @ Ucitava adresu data1 + ldr r0, [r0] @ Ucitava vrednost sa adrese data1 + + adr r0, data1 @ Ucitava adresu data1 + ldr r1, [r0] @ Ucitava vrednost sa adrese data1 + + ldrb r1, [r0, 3] @ Ucitavanje jednog bajta sa adrese r0+3 + ldrb r1, [r0], 1 @ Ucitavanje 1B sa adrese r0, nakon cega + @ se r0 povecava za 1 + ldrh r1, [r0, 1]! @ Ucitavanje 2B sa adrese r0+1, nakon cega + @ se r0 povecava za 1 + +@ ============ Visestruke memorijske instrukcije LDM, STM ================= +@ op{addr_mode}{cond} Rn{!}, reglist +@ addr_mode: IA - increment after(default), DB - decrement before each access +@ !: da li se vrednost koja se inkrementira cuva u registru Rn + ldm r0, {r1-r4, r5} @ U registre se smestaju vrednosti pocevsi + @ od adrese r0, i dodeljuju se redom po + @ brojevima registara + ldm r0, {r1, r2, r3} @ r1 = [r0], r2 = [r0+4], r3 = [r0+8] +@ ldm r0, {r3, r1, r2} @ Isti efekat, ali daje warning + ldmia r0!, {r1-r4} + ldmdb r0!, {r1-r4} + +@ ================== Smestanje konstanti u registar ======================= +@ Instrukcije su 2-4 bajta, tako da nije uvek moguce enkodovati 4B vrednost +@ u instrukciju + mov r0, 0xFF00FF00 @ OK +@ mov r0, 0x12345678 @ Greska +@ Resenje: + mov r0, 0x5678 @ Upise nizih 2B i prosiri nulom + movt r0, 0x1234 @ Upise u visih 2B + +@ =================== Aritmeticke i logicke instrukcije =================== + mov r1, 17 + mov r2, 5 + sub r1, r2 @ r1 = r1-r2 + sub r0, r1, r2 @ r0 = r1-r2 +@ r2 ovde prestavlja tzv. Fleksibilni operand tj operand2, za njega moze se +@ navesti konstanta, ili uraditi neka shift operacija + sub r0, r1, r2, LSL 2 @ r0 = r1 - (r2<<2) + sub r0, r1, 9 @ r0 = r1 - 9 +@ Instrukcije obicno ne menjaju condition flags ali mogu sa sufiksom S + lsls r0, r3, r4 + adds r0, r1, r2 + rrx r0, r1 @ rotacija desno za jedan sa carry flag + +@ Conditional execution, svaka instrukcija moze uslovno da se izvrsi +@ eq, ne - equal, not equal +@ hi, lo - higher, lower (unsigned >, <) +@ hs, ls - higher or same, lower or same (unsigned >=, <=) +@ gt, lt - greater, less than (signed >, <) +@ ge, le - greater or equal, greater or equal (signed >=, <=) +@ mi, pl - negative, positive or zero +@ vs, vc - overflow set, clear + cmp r1, 13 +@ Kako bi se koristilo uslovno izvrsavanje potrebna je priprema +@ pise se i(if) pa t(then) ili e(else) za svaku od sledecih instrukcija +@ ittet ne @ Zbog opcija prosledjenih as-u moze bez + movne r0, 5 @ t jer koristi ne + movsne r1, 4 @ zbog s menja flegove + moveq r2, 3 @ e jer koristi eq (komplement navedenog) + movne r3, 2 + +@ ========================= Izlaz iz funkcije =========================== +@ ldr lr, [sp], 4 @ Restauriramo link reg sa steka + pop {r0-r5, lr} + bx lr @ Return iz funkcije + + +data1: +.word _vma_data_start + + .end +" +58KriVtb,03. Inventory,Spocoman,Python,Saturday 4th of November 2023 04:34:25 AM CDT,"collected_items = input().split("", "") +input_line = input() + +while input_line != ""Craft!"": + command, item = input_line.split("" - "") + if command == ""Collect"": + if item not in collected_items: + collected_items.append(item) + elif command == ""Drop"": + if item in collected_items: + collected_items.remove(item) + elif command == ""Combine Items"": + old_item, new_item = item.split(':') + if old_item in collected_items: + collected_items.insert(collected_items.index(old_item) + 1, new_item) + else: + if item in collected_items: + collected_items.append(collected_items.pop(collected_items.index(item))) + input_line = input() + +print("", "".join(collected_items)) +" +mw6x9xmk,14 номер,nq1s788,Python,Saturday 4th of November 2023 04:19:10 AM CDT,"s = '8' * 68 +while ('222' in s) or ('888' in s): + if ('222' in s): + s = s.replace('222', '8') + else: + s = s.replace('888', '2') +print(s)" +QfXaueQV,Untitled,kwest87,C#,Saturday 4th of November 2023 03:54:01 AM CDT,"[StartCode] +using System; + +namespace ConsoleApp26 +{ + internal class Program + { + static void Main(string[] args) + { + Console.Write(""Введите ваше имя : ""); + string name = Console.ReadLine(); + Console.Write(""Введите символ : ""); + char symbol = Console.ReadKey().KeyChar; + string edgedName = symbol + name + symbol; + Console.WriteLine(); + string edging = """"; + + for (int i = 0; i < edgedName.Length; i++) + { + edging += symbol; + } + + Console.WriteLine(edging); + Console.WriteLine(edgedName); + Console.WriteLine(edging); + } + } +} +[EndCode]" +QDPN7eC2,Untitled,JihakaYo,C#,Saturday 4th of November 2023 02:38:39 AM CDT," using Docker.DotNet; +using Docker.DotNet.Models; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +class Program +{ + static async Task Main() + { + // Создаем клиент Docker API + using (var client = new DockerClientConfiguration(new Uri(""http://localhost:2375"")).CreateClient()) + { + // Имя контейнера, который нужно перезагрузить + string containerName = ""your_container_name""; + + // Получаем информацию о контейнере + var container = await client.Containers.InspectContainerAsync(containerName); + + if (container != null) + { + // Останавливаем контейнер + await client.Containers.StopContainerAsync(containerName, new ContainerStopParameters()); + + // Запускаем контейнер снова + await client.Containers.StartContainerAsync(containerName, new ContainerStartParameters()); + + Console.WriteLine($""Контейнер {containerName} был перезагружен.""); + } + else + { + Console.WriteLine($""Контейнер {containerName} не найден.""); + } + } + } +} +" +9XFRGmbm,Untitled,JihakaYo,C#,Saturday 4th of November 2023 01:08:26 AM CDT,"using System; +using Npgsql; + +class Program +{ + static void Main() + { + string connString = ""Host=your_postgres_host;Port=5432;Username=your_username;Password=your_password;Database=your_database""; + + try + { + // Подключение к PostgreSQL + using (var conn = new NpgsqlConnection(connString)) + { + conn.Open(); + Console.WriteLine(""Соединение с базой данных установлено.""); + + // Выполнение запроса к PostgreSQL логам + using (var cmd = new NpgsqlCommand(""SELECT * FROM pg_stat_activity"", conn)) + { + using (var reader = cmd.ExecuteReader()) + { + if (reader.HasRows) + { + Console.WriteLine(""База данных работает. Логи доступны.""); + } + else + { + Console.WriteLine(""База данных не работает. Логи недоступны.""); + } + } + } + } + } + catch (NpgsqlException ex) + { + Console.WriteLine($""Ошибка при подключении к базе данных: {ex.Message}""); + } + } +} +" +uMS431St,9. Palindrome Number,micahbales,JavaScript,Saturday 4th of November 2023 01:08:01 AM CDT,"/** +* Problem statement: https://leetcode.com/problems/palindrome-number/ +* +* There are really fancy bitwise operations you can do to avoid string conversion, +* but in the absence of a need for extreme efficiency, this seems like an acceptable solution to me. +*/ + +/** + * @param {number} x + * @return {boolean} + */ +var isPalindrome = function(x) { + if (x < 0) return false + xString = x + '' + for (let i = 0, j = xString.length - 1; i < j; i++, j--) { + if (xString[i] !== xString[j]) return false + } + return true +};" +vKFReEqh,Streaks,marcusa3000,Lua,Saturday 4th of November 2023 01:04:45 AM CDT,"{ + Tools = ordered() { + FastNoise1_6 = FastNoise { + NameSet = true, + Inputs = { + GlobalOut = Input { Value = 124, }, + Width = Input { Value = 1080, }, + Height = Input { Value = 1080, }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" }, }, + LockXY = Input { Value = 0, }, + XScale = Input { Value = 0, }, + YScale = Input { Value = 21.4, }, + Angle = Input { Value = -13, }, + SeetheRate = Input { Value = 2, }, + Type = Input { Value = 1, }, + Color1Alpha = Input { Value = 1, }, + Gradient = Input { + Value = Gradient { + Colors = { + [0.651741293532338] = { 0, 0, 0, 1 }, + [0.676616915422886] = { 1, 0, 0.24, 1 }, + [0.766169154228856] = { 0.154936, 0.127, 1, 1 }, + [0.885572139303483] = { 0.454199134199134, 0.610383788513709, 0.967964444444444, 1 }, + [0.945273631840796] = { 1, 0.47, 0.927919999999999, 1 }, + [1] = { 1, 0.47, 0.927919999999999, 1 } + } + }, + }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 610.5 } }, + }, + Merge22 = Merge { + Inputs = { + Background = Input { + SourceOp = ""Merge1"", + Source = ""Output"", + }, + Foreground = Input { + SourceOp = ""SoftGlow3_1"", + Source = ""Output"", + }, + ApplyMode = Input { Value = FuID { ""LinearDodge"" }, }, + PerformDepthMerge = Input { Value = 0, }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 709.5 } }, + }, + BrightnessContrast1_17 = BrightnessContrast { + Inputs = { + ApplyMaskInverted = Input { Value = 1, }, + Alpha = Input { Value = 1, }, + High = Input { Value = 0.161, }, + ClipBlack = Input { Value = 1, }, + ClipWhite = Input { Value = 1, }, + PreDividePostMultiply = Input { Value = 1, }, + Input = Input { + SourceOp = ""ErodeDilate1_1"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 880, 808.5 } }, + }, + ChannelBooleans2 = ChannelBoolean { + Inputs = { + ToRed = Input { Value = 4, }, + ToGreen = Input { Value = 4, }, + ToBlue = Input { Value = 4, }, + ToAlpha = Input { Value = 16, }, + Background = Input { + SourceOp = ""BrightnessContrast1_17"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 880, 775.5 } }, + }, + Blur_5 = Blur { + NameSet = true, + Inputs = { + Filter = Input { Value = FuID { ""Fast Gaussian"" }, }, + XBlurSize = Input { Value = 6, }, + Input = Input { + SourceOp = ""ChannelBooleans2"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 770, 775.5 } }, + }, + SoftGlow3_1 = SoftGlow { + Inputs = { + Filter = Input { Value = FuID { ""Fast Gaussian"" }, }, + Threshold = Input { Value = 0.063, }, + Gain = Input { Value = 2.913, }, + XGlowSize = Input { Value = 93.7, }, + Input = Input { + SourceOp = ""BrightnessContrast1_16"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 770, 709.5 } }, + }, + Merge1 = Merge { + Inputs = { + MaskChannel = Input { Value = 5, }, + MaskLow = Input { Value = 0.056, }, + MaskHigh = Input { Value = 0.15, }, + Background = Input { + SourceOp = ""FastNoise1_6"", + Source = ""Output"", + }, + Foreground = Input { + SourceOp = ""FastNoise1_7"", + Source = ""Output"", + }, + ApplyMode = Input { Value = FuID { ""LinearDodge"" }, }, + PerformDepthMerge = Input { Value = 0, }, + EffectMask = Input { + SourceOp = ""Bitmap1_6"", + Source = ""Mask"", + } + }, + ViewInfo = OperatorInfo { Pos = { 660, 676.5 } }, + }, + Merge23 = Merge { + Inputs = { + Background = Input { + SourceOp = ""Merge22"", + Source = ""Output"", + }, + Foreground = Input { + SourceOp = ""Blur_5"", + Source = ""Output"", + }, + ApplyMode = Input { Value = FuID { ""LinearDodge"" }, }, + PerformDepthMerge = Input { Value = 0, }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 775.5 } }, + }, + BrightnessContrast1_16 = BrightnessContrast { + Inputs = { + ApplyMaskInverted = Input { Value = 1, }, + Low = Input { Value = 0.294, }, + High = Input { Value = 0.839, }, + ClipBlack = Input { Value = 1, }, + ClipWhite = Input { Value = 1, }, + PreDividePostMultiply = Input { Value = 1, }, + Input = Input { + SourceOp = ""FastNoise1_8"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 880, 709.5 } }, + }, + FastNoise1_7 = FastNoise { + NameSet = true, + CurrentSettings = 2, + CustomData = { + Settings = { + [1] = { + Tools = ordered() { + FastNoise1_7 = FastNoise { + CtrlWZoom = false, + NameSet = true, + CustomData = { + }, + Inputs = { + GlobalOut = Input { Value = 124, }, + Width = Input { Value = 1080, }, + Height = Input { Value = 1080, }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" }, }, + LockXY = Input { Value = 0, }, + XScale = Input { Value = 0, }, + YScale = Input { Value = 21.4, }, + Angle = Input { Value = -13, }, + Seethe = Input { Value = 0.413, }, + SeetheRate = Input { Value = 2, }, + Type = Input { Value = 1, }, + Color1Alpha = Input { Value = 1, }, + Gradient = Input { + Value = Gradient { + Colors = { + [0.766169154228856] = { 0, 0, 0, 1 }, + [0.791044776119403] = { 1, 0, 0.24, 1 }, + [0.840796019900497] = { 0.459428571428572, 0.441558441558442, 1, 1 }, + [0.915422885572139] = { 0.454199134199134, 0.610383788513709, 0.967964444444444, 1 }, + [0.965174129353234] = { 1, 0.47, 0.927919999999999, 1 }, + [1] = { 1, 0.47, 0.927919999999999, 1 } + } + }, + }, + }, + ViewInfo = OperatorInfo { Pos = { -110, 841.5 } }, + } + } + }, + } + }, + Inputs = { + GlobalOut = Input { Value = 124, }, + Width = Input { Value = 1080, }, + Height = Input { Value = 1080, }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" }, }, + LockXY = Input { Value = 0, }, + XScale = Input { Value = 0, }, + YScale = Input { Value = 21.4, }, + Angle = Input { Value = -13, }, + Seethe = Input { Value = 0.413, }, + SeetheRate = Input { Value = 2, }, + Type = Input { Value = 1, }, + Color1Alpha = Input { Value = 1, }, + Gradient = Input { + Value = Gradient { + Colors = { + [0.472636815920398] = { 0, 0, 0, 1 }, + [0.776119402985075] = { 1, 0.91336, 0.886, 1 } + } + }, + }, + }, + ViewInfo = OperatorInfo { Pos = { 770, 676.5 } }, + }, + Bitmap1_6 = BitmapMask { + Inputs = { + Filter = Input { Value = FuID { ""Fast Gaussian"" }, }, + MaskWidth = Input { Value = 1080, }, + MaskHeight = Input { Value = 1080, }, + PixelAspect = Input { Value = { 1, 1 }, }, + UseFrameFormatSettings = Input { Value = 1, }, + ClippingMode = Input { Value = FuID { ""None"" }, }, + Image = Input { + SourceOp = ""FastNoise1_6"", + Source = ""Output"", + }, + Channel = Input { Value = FuID { ""Luminance"" }, }, + Low = Input { Value = 0.211, }, + High = Input { Value = 0.495, }, + }, + ViewInfo = OperatorInfo { Pos = { 550, 676.5 } }, + }, + CornerPositioner1_1 = CornerPositioner { + Inputs = { + TopLeft = Input { Value = { -0.139154160982265, 1.55313351498638 }, }, + TopRight = Input { Value = { 1.03274215552524, 1.04904632152589 }, }, + BottomLeft = Input { Value = { -0.0600272851296044, -0.0435967302452316 }, }, + BottomRight = Input { Value = { 1.02182810368349, -0.0817438692098093 }, }, + Input = Input { + SourceOp = ""Merge23"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 841.5 } }, + }, + ErodeDilate1_1 = ErodeDilate { + Inputs = { + Filter = Input { Value = 3, }, + XAmount = Input { Value = 0.0022, }, + Input = Input { + SourceOp = ""pRender1"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 990, 808.5 } }, + }, + SoftGlow3 = SoftGlow { + Inputs = { + Filter = Input { Value = FuID { ""Fast Gaussian"" }, }, + Threshold = Input { Value = 0.22, }, + Gain = Input { Value = 2.913, }, + XGlowSize = Input { Value = 22, }, + Input = Input { + SourceOp = ""CornerPositioner1_1"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 874.5 } }, + }, + pRender1 = pRender { + Inputs = { + _MotionBlurWarning = Input { Disabled = true, }, + GlobalOut = Input { Value = 124, }, + Width = Input { Value = 1080, }, + Height = Input { Value = 1080, }, + UseFrameFormatSettings = Input { Value = 1, }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" }, }, + OutputMode = Input { + Value = FuID { ""TwoD"" }, + Disabled = true, + }, + PreGenerateFrames = Input { Value = 35, }, + [""MaterialID.MaterialID""] = Input { Value = 4, }, + [""ObjectID.ObjectID""] = Input { Value = 4, }, + Input = Input { + SourceOp = ""pEmitter2"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 990, 775.5 } }, + }, + FastNoise1_8 = FastNoise { + NameSet = true, + CurrentSettings = 2, + CustomData = { + Settings = { + [1] = { + Tools = ordered() { + FastNoise1_7 = FastNoise { + Inputs = { + YScale = Input { Value = 21.4 }, + XScale = Input { Value = 0 }, + Gradient = Input { + Value = Gradient { + Colors = { + [0.766169154228856] = { 0, 0, 0, 1 }, + [0.791044776119403] = { 1, 0, 0.24, 1 }, + [0.840796019900497] = { 0.459428571428572, 0.441558441558442, 1, 1 }, + [0.915422885572139] = { 0.454199134199134, 0.610383788513709, 0.967964444444444, 1 }, + [0.965174129353234] = { 1, 0.47, 0.927919999999999, 1 }, + [1] = { 1, 0.47, 0.927919999999999, 1 } + } + } + }, + Seethe = Input { Value = 0.413 }, + Width = Input { Value = 1080 }, + Type = Input { Value = 1 }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" } }, + SeetheRate = Input { Value = 2 }, + Color1Alpha = Input { Value = 1 }, + GlobalOut = Input { Value = 124 }, + Angle = Input { Value = -13 }, + LockXY = Input { Value = 0 }, + Height = Input { Value = 1080 } + }, + CtrlWZoom = false, + NameSet = true, + ViewInfo = OperatorInfo { Pos = { -110, 841.5 } }, + CustomData = { + } + } + } + }, + } + }, + Inputs = { + GlobalOut = Input { Value = 124, }, + Width = Input { Value = 1080, }, + Height = Input { Value = 1080, }, + [""Gamut.SLogVersion""] = Input { Value = FuID { ""SLog2"" }, }, + LockXY = Input { Value = 0, }, + XScale = Input { Value = 0, }, + YScale = Input { Value = 2.83, }, + Angle = Input { Value = -13, }, + Seethe = Input { Value = 0.413, }, + SeetheRate = Input { Value = 2, }, + Type = Input { Value = 1, }, + Color1Alpha = Input { Value = 1, }, + Gradient = Input { + Value = Gradient { + Colors = { + [0.671641791044776] = { 0, 0, 0, 1 }, + [0.7860696517413] = { 1, 0.922480000000002, 0.898, 1 } + } + }, + }, + }, + ViewInfo = OperatorInfo { Pos = { 990, 709.5 } }, + }, + pEmitter2 = pEmitter { + ID = 2960, + Inputs = { + Number = Input { Value = 0.2, }, + VelocityControls = Input { Value = 1, }, + Velocity = Input { Value = 2, }, + VelocityVariance = Input { Value = 0.528, }, + Angle = Input { Value = -180, }, + AngleVariance = Input { Value = 47, }, + RotationControls = Input { Value = 1, }, + RotationMode = Input { Value = 1, }, + SpinControls = Input { Value = 1, }, + SpinZ = Input { Value = 2.7, }, + Style = Input { Value = FuID { ""ParticleStyleLine"" }, }, + [""ParticleStyleLine.Fade""] = Input { Value = 0, }, + Region = Input { Value = FuID { ""LineRgn"" }, }, + [""SphereRgn.Size""] = Input { Value = 0.593880495657624, }, + [""ParticleStyle.ColorControls""] = Input { Value = 1, }, + [""ParticleStyle.Green""] = Input { Value = 0.995584, }, + [""ParticleStyle.Blue""] = Input { Value = 0.976, }, + [""ParticleStyle.ColorVariance""] = Input { Value = 1, }, + [""ParticleStyle.RedLow""] = Input { Value = -1, }, + [""ParticleStyle.GreenLow""] = Input { Value = -1, }, + [""ParticleStyle.BlueLow""] = Input { Value = -1, }, + [""ParticleStyle.AlphaLow""] = Input { Value = -1, }, + [""ParticleStyle.SizeControls""] = Input { Value = 1, }, + [""ParticleStyle.Size""] = Input { Value = 2.3, }, + [""ParticleStyle.SizeVariance""] = Input { Value = 0.5, }, + [""ParticleStyle.SizeOverLife""] = Input { + SourceOp = ""pEmitter2SizeOverLife"", + Source = ""Value"", + }, + [""ParticleStyle.BlurOverLife""] = Input { + SourceOp = ""pEmitter2BlurOverLife2D"", + Source = ""Value"", + }, + [""LineRgn.Start.X""] = Input { Value = 0.574397923875432, }, + [""LineRgn.Start.Y""] = Input { Value = 0.508650519031142, }, + [""LineRgn.End.X""] = Input { Value = 0.57439446366782, }, + [""LineRgn.End.Y""] = Input { Value = -0.494809688581315, }, + }, + ViewInfo = OperatorInfo { Pos = { 1100, 775.5 } }, + }, + pEmitter2SizeOverLife = LUTBezier { + KeyColorSplines = { + [0] = { + [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } }, + [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } } + } + }, + SplineColor = { Red = 192, Green = 128, Blue = 64 }, + CtrlWZoom = false, + }, + pEmitter2BlurOverLife2D = LUTBezier { + KeyColorSplines = { + [0] = { + [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } }, + [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } } + } + }, + SplineColor = { Red = 192, Green = 128, Blue = 64 }, + CtrlWZoom = false, + }, + JPEGDamage1 = ofx.com.blackmagicdesign.resolvefx.JPEGDamage { + Inputs = { + Source = Input { + SourceOp = ""SoftGlow3"", + Source = ""Output"", + }, + ofxQuality = Input { Value = 40, }, + Resolution = Input { Value = 4, }, + AspectRatio = Input { Value = 1, }, + FrequencyScale = Input { Value = 1, }, + FrequencyType = Input { Value = FuID { ""FREQUENCY_TYPE_XY"" }, }, + BlendAmount = Input { Value = 0, }, + blendGroup = Input { Value = 0, }, + blendIn = Input { Value = 1, }, + blend = Input { Value = 0, }, + ignoreContentShape = Input { Value = 0, }, + legacyIsProcessRGBOnly = Input { Value = 0, }, + IsNoTemporalFramesReqd = Input { Value = 0, }, + refreshTrigger = Input { Value = 1, }, + resolvefxVersion = Input { Value = ""1.1"", }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 907.5 } }, + }, + ChangeDepth1_5 = ChangeDepth { + Inputs = { + Depth = Input { Value = 1, }, + Input = Input { + SourceOp = ""JPEGDamage1"", + Source = ""Output"", + }, + }, + ViewInfo = OperatorInfo { Pos = { 660, 973.5 } }, + } + } +}" +2ujGwcHF,268. Missing Number,micahbales,JavaScript,Saturday 4th of November 2023 12:48:18 AM CDT,"/* +* Problem statement: https://leetcode.com/problems/missing-number/ +* +* The obvious solution to this problem is to pre-sort the array and then iterate +* over it searching for the missing number. Unfortunately, this solution requires two +* iterations over the entire array, including a sort action that can be expensive +* depending on the implementation. +* +* There is an alternative solution here, if you are aware of the Gaussian Summation, +* which states that for any list of ordered numbers 1..n, the sum total of that list +* will be equal to (n * (n + 1)) / 2, where 'n' is the length of the list of numbers. +* This seems like a silly thing to expect someone to know in an interview. +* But it's a neat trick. +*/ + + +/* Trivial Solution By Pre-Sorting */ + +/** + * @param {number[]} nums + * @return {number} + */ +var missingNumber = function(nums) { + nums.sort((a,b) => a - b) + + let lastNum = -1 + for (let i = 0; i < nums.length; i++) { + if (nums[i] !== lastNum + 1) return nums[i] - 1 + lastNum = nums[i] + } + return lastNum + 1 +} + +/* Trick-Shot, feat. C.F. Gauss */ + +/** + * @param {number[]} nums + * @return {number} + */ +var missingNumber = function(nums) { + const n = nums.length + const expectedSum = (n * (n + 1)) / 2 + let actualSum = 0 + for (let i = 0; i < nums.length; i++) { + actualSum += nums[i] + } + return expectedSum - actualSum +}" +HNbEiTtX,Untitled,test12333,C++,Friday 3rd of November 2023 10:55:11 PM CDT,"std::uintptr_t util::FindPattern( const char* smodule, const char* pattern, bool only_text_or_code, bool format ) { + const auto mod_p = (uintptr_t)util::get_module_base_ansi( smodule ); + PIMAGE_DOS_HEADER pe_headers = (PIMAGE_DOS_HEADER)mod_p; + PIMAGE_NT_HEADERS new_pe_headers = PIMAGE_NT_HEADERS( (uint8_t*)( mod_p + pe_headers->e_lfanew ) ); + + DWORD dwSizeOfImage; + DWORD end; + uintptr_t begin; + + if ( only_text_or_code ) { + PIMAGE_SECTION_HEADER Section = IMAGE_FIRST_SECTION( new_pe_headers ); + + for ( WORD i = 0; i < new_pe_headers->FileHeader.NumberOfSections; i++ ) { + + if ( !fast_strcmp( (char*)Section->Name, "".code"" ) || !fast_strcmp( (char*)Section->Name, "".text"" ) ) { + + begin = Section->VirtualAddress; + dwSizeOfImage = Section->SizeOfRawData; + end = begin + dwSizeOfImage; + + //printf( ""%-8s\t%x\t%x\t%x\n"", Section->Name, Section->VirtualAddress, + // Section->PointerToRawData, Section->SizeOfRawData ); + + } + Section++; + } + } + + else { + begin = mod_p; + dwSizeOfImage = new_pe_headers->OptionalHeader.SizeOfImage; + end = begin + dwSizeOfImage; + } + + + if ( const auto result = reinterpret_cast( find_pattern_internal( begin, end, format ? ParseCombo( pattern ).c_str( ) : pattern ) ); result ) { + return result; + } + return NULL; +}" +6mZZpTLg,Koikatsu List Scraper V1.3,Skelun,JavaScript,Friday 3rd of November 2023 10:37:20 PM CDT,"/* -------------------------------------------------------------------- +-- Transforms embedded links into actual Hyperlinks +----------------------------------------------------------------------- */ + +function createHyperlink() { + var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); + + // Get the selected range + var range = sheet.getActiveRange(); + var richTextValues = range.getRichTextValues(); + + for (var i = 0; i < richTextValues.length; i++) { + for (var j = 0; j < richTextValues[0].length; j++) { + var textValue = richTextValues[i][j].getText(); + var link = richTextValues[i][j].getLinkUrl(); + + if (link) { + // Creates a hyperlink formula + var formula = '=HYPERLINK(""' + link + '"", ""Here"")'; + + // Set the formula in the cell + sheet.getRange(range.getRow() + i, range.getColumn() + j).setFormula(formula); + } + } + } +} + +/* -------------------------------------------------------------------- +-- MOON RATING +----------------------------------------------------------------------- +-- I'm using this because it was the easier way +-- to simulate rating stars. +----------------------------------------------------------------------- */ + +function moonRating(number) { + + if (!isNaN(number)) { + var votes; + + // Is it an interger? + if (number % 1 === 0) { + votes=""🌕"".repeat(number); + votes+=""🌑"".repeat(5-number); + + // Or is it a float? + } else { + let n = Math.floor(number); + votes=""🌕"".repeat(n); + votes+=""🌗""; + votes+=""🌑"".repeat(4-n); + } + return votes; + } else { + // If no votes + return ""------"" + } +} + +/* -------------------------------------------------------------------- +-- Scraping data using Cheerio library +-- (https://github.com/tani/cheeriogs) +-- Script ID: 1ReeQ6WO8kKNxoaA_O0XEQ589cIrRvEBA9qcWpNqdOP17i47u6N9M5Xh0 +----------------------------------------------------------------------- */ + +// Cheerio method to scrape +function getContent(url) { + return UrlFetchApp.fetch(url).getContentText() +} + +/* -------------------------------------------------------------------- +-- Actual scrape function +----------------------------------------------------------------------- */ + +function scrapeData(force) { + + // Selects the active sheet + var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); + + // Get selected cells + var selectedRange = sheet.getActiveRange(); + + // Get the values from the selected cells + var selectedValues = selectedRange.getRichTextValues(); + + // Iterate through cells + for (var i = 0; i < selectedValues.length; i++) { + + // It assumes the URLs are in the first column of the selected column + var urlFromLink = selectedValues[i][0].getLinkUrl(); + var urlFromCellValue = selectedValues[i][0].getText(); // Get text value from the cell + + // Check if there is a link URL, and use it if available; otherwise, use the URL from the cell value + var url = urlFromLink ? urlFromLink : urlFromCellValue; + + // If the value is not empty... + if (url && isValidURL(url)) { + + // Grabs the HTML data + var content = getContent(url); + + // Parses the HTML data + var $ = Cheerio.load(content); + + /* -------------------------------------------------------------------- + -- [TITLE] + -------------------------------------------------------------------- */ + var threadTitle = $('h1.p-title-value'); + + var rawTitle = threadTitle.contents().filter(function() { + return this.type === 'text'; + }).text(); + + /* + var titleREGEX = /(.+?)\s*\[(.+?)\](?:\s*\[(.+?)\])?/.exec(rawTitle); + + // We should check if titleREGEX is not null before accessing its indices + if (titleREGEX) { + var title = titleREGEX[1]; + var version = titleREGEX[2]; + } else { + var title = ""Title Problem ⚠️""; + var version = ""Version Problem ⚠️""; + } + + var devBackup = titleREGEX[3] ? titleREGEX[3] + "" ❓"" : ""Not found ⚠️""; + + */ + + // Inspects the Title searching for what's inside the brackets and what's not + // it creates 3 captures groups: title, version and developer's name + var titleREGEX = /(.+?)\s*\[(.+?)\](?:\s*\[(.+?)\])?/.exec(rawTitle); + + // initialize variables + var title = ""Title N.F. ⚠️""; + var version = ""Version N.F. ⚠️""; + var devBackup = ""Dev N.F. ⚠️""; + + // Check if the regex has matched + if (titleREGEX) { + + // If it exists, the game title is the first capture group + title = titleREGEX && titleREGEX.length > 1 ? titleREGEX[1] : title; + + // The version will be in the second capture group, if it exists + version = titleREGEX.length > 2 && titleREGEX[2] ? titleREGEX[2] : version; + + // The dev backup information will be in the third capture group, if it exists + devBackup = titleREGEX.length > 3 && titleREGEX[3] ? titleREGEX[3] + "" ❓"" : devBackup; + + } else { + // If there's nothing extra, assumes it's only the title + title = rawTitle; + } + + + /* -------------------------------------------------------------------- + -- [STATUS] (ACTIVE - ABANDONED - ONHOLD) + -------------------------------------------------------------------- */ + // Default status + var status = 'Active'; + + // Search for ""Abandoned"" or ""Onhold"" + threadTitle.find('span').each(function() { + var spanText = $(this).text(); + if (['Completed','Abandoned','Onhold'].includes(spanText)) { + status = spanText; + return false; + } + }); + + /* -------------------------------------------------------------------- + -- [ENGINE] + ----------------------------------------------------------------------- */ + // If there's no engine info, it returns ""unknown"" + var engine = '⚠️ Unknown'; + + // Checks if there's one of these strings + threadTitle.find('span').each(function() { + var spanText = $(this).text(); + if (['ADRIFT','Flash','Java','Others','QSP','RAGS','RPGM',""Ren'Py"",'Tads','Unity','Unreal Engine','WebGL','Wolf RPG','HTML'].includes(spanText)) { + engine = spanText; + return false; // Stop searching once a match is found + } + }); + + /* -------------------------------------------------------------------- + -- [TAGS] + ----------------------------------------------------------------------- */ + // Selects the element containing the tags + var tagList = $('span.js-tagList'); + + // Grabs the tags and separate them by comma + var tags = tagList.find('a.tagItem').map(function() { + return $(this).text(); + }).get().join(', '); + + /* -------------------------------------------------------------------- + -- GAMEPLAY + ----------------------------------------------------------------------- */ + var gameplay; + + // Assumes the [Gameplay] type by using the tags + switch (true) { + case tags.includes('sandbox'): + gameplay = 'Sandbox'; + break; + case tags.includes('turn based combat'): + gameplay = 'TBC'; + break; + case tags.includes('management'): + gameplay = 'Management'; + break; + case tags.includes('simulator'): + gameplay = 'Simulator'; + break; + case tags.includes('rpg'): + gameplay = 'RPG'; + break; + default: + gameplay = 'Visual Novel'; + } + + /* -------------------------------------------------------------------- + -- - Thread [Start] Date + ----------------------------------------------------------------------- */ + + // Selects the first 'article' element + var firstArticle = $('article').first(); + + // Find the 'header.message-attribution' element + var messageAttributionHeader = firstArticle.find('header.message-attribution'); + + // Find the 'time' element with class 'u-dt' + var timeElement = messageAttributionHeader.find('time.u-dt'); + + // Check if the time element exists + if (timeElement.length > 0) { + // Extract the 'datetime' attribute + var start = timeElement.attr('datetime'); + start = start.split('T')[0]; // Get the date part only + + } else { + Logger.log(""