on-internet

I created 2 arrays that store letter values for a scrabble game. However my program assigns the wrong point value to 4 of the letters. Why?

My program correctly assigns the indexed point value to all letters except 'D', 'd', 'G', and 'g'. I store these letters in my array LetterValue[2]. They are worth 2 points each but are assigned 3 points. My temporary solution was changing my ScoreValue[7] array to {1,1,3,4,5,8,10}; and then the program assigned my targeted letters 2 points. I figure that the program is either adding one additional point to ScoreValue[2] OR it is not assigning LetterValue[2] to ScoreValue[2] but I can't figure out why. char LetterValue[7][20] = { {'A', 'a', 'E', 'e', 'I', 'i', 'L', 'l', 'N', 'n', 'O', 'o', 'R'

Join the discussion →

how can a total layman protect themselves from AI bullshit and scammers when looking to learn from or ask someone to help with a website?

submitted by Donkeywitch to asklemmy 12 points | 8 comments The internet sucks a lot right now. I know it’s full of AI and scammers, the Lemmy users are helpful to spread warnings about them everyday. It’s a little disheartening though to know that a lot of the warning signs are way above my entry level knowledge. Is there anyplace “safe” where someone can ask questions or even hire (not a job request post!) someone to help make a website without getting something that looks pretty but is actually a vibe coded nightmare? Alternatively, what should laymen like myself be on the lookout for when

Join the discussion →

Can I make a copy of a case class with abstract override while maintaining functionality

Say I define the following traits and case class trait A { def f(): Unit = println("A") } trait B extends A { abstract override def f(): Unit = println("B") } case class C() extends A { } And then construct and copy it thus: val c = new C() with B c.f() val c2 = c.copy() c2.f() Then of course my output is B A Is there an elegant way one can make a copy of a this case class while maintaining the B extended functionality?

Join the discussion →

Microsoft Took 31 Years to Let You Kill Windows 11's Sticky Keys Popup

Microsoft is testing a Windows 11 option that lets users permanently disable the Sticky Keys and Filter Keys activation prompts directly from the pop-ups themselves, ending a 31-year-old annoyance without requiring a trip into Settings. Windows Latest reports: Sadly, the dialog is still the same aging Win32 window, but we spotted Microsoft's design boss replying under an X post reply about this, saying he is working on modernizing legacy dialogs. The popup might be annoying, but did you know that it exists because of a pinball game from 1995? [...] The change is in Build 26340.9882 (Experiment

Join the discussion →

Hi, I'm Fyn - sound engineer into retro computing and mechanical keyboards

submitted by Fyn to asklemmy 8 points | 1 comments Hi, I’m Fyn. Sound engineer in Portland, OR. Into retro computing (mostly 80s home computers), mechanical keyboards, and climbing. I’ve been around the fediverse a while now (Mastodon - @[email protected]) and wanted a home on the forum side of things. Nice to meet you all, and happy to answer any questions.

Join the discussion →

How do I add a question at the bottom that asks the user if they want to continue?

The program is a Student Grade Calculator written in C. It uses an array called myGrades[10] to store the grades of up to 10 students. First, it asks the user to enter the number of students using printf() and scanf(). It then checks if the number entered is valid using an if statement. A for loop is used to collect each student's grade and store it in the array. After collecting the grades, the program initializes the highest and lowest variables using the first student's grade. Another for loop displays each student's grade, compares the grades using if statements to determine the highest an

Join the discussion →

How do I add a question at the bottom that ask user if they want to continue?

The program is a Student Grade Calculator written in C. It uses an array called myGrades[10] to store the grades of up to 10 students. First, it asks the user to enter the number of students using printf() and scanf(). It then checks if the number entered is valid using an if statement. A for loop is used to collect each student's grade and store it in the array. After collecting the grades, the program initializes the highest and lowest variables using the first student's grade. Another for loop displays each student's grade, compares the grades using if statements to determine the highest an

Join the discussion →

How can I compare hotel guest ratings by neighbourhood instead of trusting a city-wide average?

In large cities the “best hotels in X” list mixes properties that are 30+ minutes apart. I’m trying to choose a base neighbourhood first (walkability to what I’ll actually do), then pick among hotels near that base. Is there a practical way to compare guest-review quality across neighbourhoods of the same city — not just look at city-wide star ratings or the top of a single booking-site sort — so I can see whether one district’s hotels are systematically better-reviewed than another? I’m especially interested in Rome as an example (15k+ hotels), but a method that works for other big cities wou

Join the discussion →

Trump Backs Nvidia CEO Jensen Huang Amid Chinese Spy Affair Investigation

President Donald Trump says the FBI is investigating Nvidia CEO Jensen Huang's affair with a woman alleged by U.S. intelligence to have gathered information for Beijing. "I know the FBI is looking into it in terms of something else, and I think that he'll be in good shape," Trump said at a White House briefing. The Associated Press reports: Trump suggested the extraordinary step of directly involving himself in a counterintelligence investigation, a sign of his friendly relationship with Huang and the possible geopolitical stakes. "I did speak to him today just to see if he's feeling all right

Join the discussion →

What does __lazy_import__() return?

What is the return type of __lazy_import__() in Python 3.15+? After writing this answer, I sent a PR to typeshed to annotate the return type of __lazy_import__() as types.LazyImportType. However, I'm now wondering whether this was correct.

Join the discussion →

Difference between __import__() and importlib.__import__()

This question asks the difference between import, __import__() and importlib.import_module(). However, it doesn't talk about importlib.__import__(). According to the docs: importlib.__import__(name, globals=None, locals=None, fromlist=(), level=0) An implementation of the built-in __import__() function. Note: Programmatic importing of modules should use import_module() instead of this function. Are importlib.__import__() and builtins.__import__() equivalent? What is "an implementation" of __import__()?

Join the discussion →
Older stories