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
| =LAMBDA(cell, [seek_down], [seek_right], | |
| LET( | |
| MAX_COLS, 16384, | |
| MAX_ROWS, 1048576, | |
| sd, IF(ISOMITTED(seek_down), TRUE, seek_down), | |
| sr, IF(ISOMITTED(seek_right), FALSE, seek_right), | |
| start_row, ROW(cell), | |
| start_col, COLUMN(cell), | |
| IF( | |
| ISBLANK(cell), |
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
| % Kentucky Fried Chicken Murders - Kilgore, Texas (1983) | |
| % Comprehensive Prolog Knowledge Base for Case Analysis | |
| % | |
| % SOURCES: | |
| % - Transcript from YouTube video: https://www.youtube.com/watch?v=_81kTZ0MxjI | |
| % - Wikipedia: https://en.wikipedia.org/wiki/Kentucky_Fried_Chicken_murders | |
| % ============================================================================ | |
| % CASE OVERVIEW | |
| % ============================================================================ |
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
| { | |
| "title": "Storyer", | |
| "content": "Once upon a time, in a land far, far away, lived a brave knight named <span class=\"annotated-text\" data-prolog-fact=\"hero(sir_reginald).\">Sir Reginald</span>. He was known throughout the kingdom for his courage and his unwavering commitment to justice. One day, a fearsome dragon, <span class=\"annotated-text\" data-prolog-fact=\"villain(ignis).\">Ignis</span>, descended upon the peaceful village of <span class=\"annotated-text\" data-prolog-fact=\"location(oakhaven).\">Oakhaven</span>, demanding tribute. The villagers, terrified, turned to Sir Reginald for help.\n\nSir Reginald, without hesitation, donned his shining armor and sharpened his trusty sword. He knew the <span class=\"annotated-text\" data-prolog-fact=\"travels_to(sir_reginald, dragons_peak).\">journey to Ignis's lair, nestled deep within the treacherous Dragon's Peak</span>, would be perilous. Along the way, he encountered a wise old wizard, <span class=\"annotated-text\" data-prolog-fact=\"helper(elara). |
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
| // Where to download Alloy: https://alloytools.org/download.html | |
| // Run within Alloy: java -jar org.alloytools.alloy.dist.jar | |
| // The Riverside Diner Murder Mystery | |
| // Recreated from Prolog to Alloy | |
| // Define the people involved in the investigation | |
| abstract sig Person {} | |
| one sig Elena, David, James, Lisa, Tom extends Person {} |
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
| % Read article at | |
| % https://medium.com/@gareth.stretton/the-riverside-diner-murder-a-logic-programming-investigation-b8ea0f54bae6 | |
| % Original facts remain the same | |
| missing_knife(elena). | |
| missing_knife(david). | |
| matching_tires(james). | |
| matching_tires(lisa). | |
| matching_tires(david). |
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 java.util.*; | |
| import java.util.function.*; | |
| import java.util.stream.*; | |
| public class PrologInterpreter { | |
| // Represents a Prolog term (fact or rule component) | |
| public static class Term { | |
| String predicate; | |
| List<String> arguments; |
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 java.util.*; | |
| import java.util.function.*; | |
| import java.util.stream.*; | |
| public class HuntingBuddies { | |
| // Person class with attributes | |
| public static class Person { | |
| private String name; | |
| private boolean hasJob; |
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
| DOI 1:1 | |
| “When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another...” | |
| DOI 1:2 | |
| “...a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.” | |
| DOI 2:1 | |
| “We hold these truths to be self-evident, that all men are created equal...” | |
| DOI 2:2 |
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
| -- Purpose: Debug a single Java class from within LazyVim | |
| -- Overview of steps: | |
| -- 1. Update ~/.config/nvim/lua/config/lazy.lua to enable the 'Java Extra' | |
| -- 2. Add new plugin config at ~/.config/nvim/plugins/debug_java.lua | |
| -- 3. Test: Add break point, hit <leader>dA, Observe debugging in action. | |
| -- Notes: | |
| -- 1. Works for a single Java file, larger projects likely will need other steps or configuration | |
| -- 2. Solution was found on Reddit, see reference 1. | |
| -- References: | |
| -- 1) Reddit: https://www.reddit.com/r/neovim/comments/subfv1/help_setting_up_debugger_for_java/ |
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
| -- Purpose: | |
| -- 1. Demonstrate configuring Telekasten with LazyVim 'plugin configuration' file. | |
| -- 2. Add ability to create links to ... | |
| -- - a heading under the cursor | |
| -- - a specific line under the cursor (using a 'block reference') | |
| -- - the file with a description entered at a prompt | |
| -- 3. Demonstrate having a main vault and seperate one(s) for work | |
| -- Usage: (look for 'TODO') | |
| -- 1. Save as ~/.config/nvim/plugins/telekasten.lua | |
| -- 2. Create directories for vault(s) |
NewerOlder