• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Programming Challenge: Mini Calendar Display

      It has been a while since the last time we did something like a programming challenge, so here's one for ya. The life story of the author before you get to the recipe I've been working on a little...

      It has been a while since the last time we did something like a programming challenge, so here's one for ya.

      The life story of the author before you get to the recipe

      I've been working on a little "today" website, showing what day it is, if it's a significant date for holiday/independence/... reasons, and one of the things I wanted was a small calendar display that showed the full month and days in each week. Like how XFCE's Clock plugin does it.

      So I got to figuring it out and after finishing it up I thought this could be a nice little programming challenge. It has one input (the date) that can be in any of the rows and columns, and it's up to you to figure out all the rest.

      Here's how mine looks in about 250ish lines of TypeScript (TSX technically) and SCSS.


      The Recipe

      Make a mini calendar display that shows all the days of the current month and at least one day of each adjacent month. So for example for May 2023: the 31 days in May, the 30th of April and the 1st of June should at least be visible.

      It can be in any language with any method of rendering; simple text, TUI/GUI toolkit, web-based, raytraced in some game engine, nixie tubes, whatever.

      Bonus Points

      • Highlight the current day name in the first row, if you're including day names.
      • Highlight the current day number, wherever it is.
      • Highlight the current week row, wherever it is.
      • Differentiate the days of current month and the days of the other adjacent months, wherever they are.

      Some Tips

      The week number

      If your programming language of choice doesn't have a built-in way to get the week number, like JavaScript doesn't, this website may have you covered.

      Testing

      Make sure to test multiple different input dates, I thought I was finished with my display until I tried some other dates and noticed that there were still some bugs left to squash.

      Starting

      If you know what the first day in the calendar should be, counting up is as easy as "one two three"!

      Weeks

      If you use 6 weeks in the display, you will always have enough space to fit all the current month's days and the minimum 1 day of the adjacent month's too.


      Showcase

      If at all possible and with at least a few entries I will try to run all the submissions myself and create a little showcase website for it.

      16 votes
    2. Midweek Movie Free Talk

      Warning: this post may contain spoilers

      Have you watched any movies recently you want to discuss? Any films you want to recommend or are hyped about? Feel free to discuss anything here.

      Please just try to provide fair warning of spoilers if you can.

      19 votes
    3. True Crime junkies: What have you been watching?

      I’m a true crime fiend, but without cable or Netflix it’s hard to discover new lurid murders and cult exposés to relax with. So I’m asking y’all: what’s been on your watchlist in the true crime...

      I’m a true crime fiend, but without cable or Netflix it’s hard to discover new lurid murders and cult exposés to relax with.

      So I’m asking y’all: what’s been on your watchlist in the true crime doc department?

      To kick it off, I’ll start: I just binged 5 hours of “The Curious Case Of Natalia Grace “

      Not since Making a Murderer or The Bad Vegan have I immediately binged an entire True Crime series.

      So, quick synopsis for those unaware: ** “ Investigation Discovery's "The Curious Case of Natalia Grace" is a six-episode docuseries that explores the case of Natalia Grace, a Ukrainian orphan who was adopted by Michael and Kristine Barnett in 2010.2 Initially thought to be a 6-year-old orphan with a rare bone growth disorder, Natalia was actually a fully grown adult.…or was she?”**

      This one’s a total trainwreck in the best possible way: twists, turns, creeps and weirdos and some odd people just trying to do right…surreal but highly recommended.

      So Tildes: where is my next fix? I want to to hear any other True Crime junkies chime in with their recent picks!

      3 votes
    4. Wildflower plantings

      I've recently been trying to get an area of my yard to grow with perennial wild flowers. For 2 years straight, I plant seeds and nothing comes up. I'm starting to think that the seeds the store...

      I've recently been trying to get an area of my yard to grow with perennial wild flowers. For 2 years straight, I plant seeds and nothing comes up. I'm starting to think that the seeds the store sells are just a scam. Even when I tried to germinate them in potting soil, nothing grew. Anyone here have any sort of advice?

      21 votes
    5. Weekly US politics news and updates thread - week of May 29

      This thread is posted weekly - please try to post all relevant US political content in here, such as news, updates, opinion articles, etc. Extremely significant events may warrant a separate...

      This thread is posted weekly - please try to post all relevant US political content in here, such as news, updates, opinion articles, etc. Extremely significant events may warrant a separate topic, but almost all should be posted in here.

      This is an inherently political thread; please try to avoid antagonistic arguments and bickering matches. Comment threads that devolve into unproductive arguments may be removed so that the overall topic is able to continue.

      15 votes
    6. Fortnightly Programming Q&A Thread

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

      Don't forget to format your code using the triple backticks or tildes:

      Here is my schema:
      
      ```sql
      CREATE TABLE article_to_warehouse (
        article_id   INTEGER
      , warehouse_id INTEGER
      )
      ;
      ```
      
      How do I add a `UNIQUE` constraint?
      
      3 votes