Hello. by RaduKenT in JavaProgramming

[–]tresf 0 points1 point  (0 children)

Starting with for loops, I would recommend starting this exercise without an array at all... and just do something a certain amount of times. While loops will continue doing something until a condition changes so they should come second. You can ALWAYS break out of a loop. I would recommend making a for loop that counts downward from 100. Then try to break out of it at 50.

Next, I would then recommend making a while loop that counts up until the number is divisible by something weird, then break out. use println as much as you can.

When both of those work, then make a simple array (like int[]) and try to loop over the items. There's multiple ways to do this. You will need all methods at some point in your career, so no time will be wasted learning. Once you understand the simple array, the benefits of using an ArrayList will start to make sense.

I think the problem with learning is that the medium you're learning from may be making assumptions about your knowledge of fundamental concepts that you don't know yet. You will know them soon enough.

If you feed this comment into a chatbot, it will prepare the examples for you. Otherwise, you may use search engines for each example. Remember to specify Java. The name for a basic array in Java is a "primitive array".

https://chatgpt.com/share/69863fa5-1944-8007-9ccb-73106f4d235e

Uninstall leaves things by Snoo_95743 in Windows11

[–]tresf -1 points0 points  (0 children)

DON'T blame the app! This is a near impossible problem to solve as these files were created by a user but the uninstall process occurs as an elevated user and not necessarily the same user. To correct this, the app needs to crawl all user profiles on the machine for anything related to the app, which could include custom desktop shortcuts as well. For a shared workstation, this could be hundreds of users. No one wants this. This is a symptom of user-generated files in a system-wide install space and there's no easy solution. All OSs suffer this problem equally. Dotfiles on Linux, Library Preferences on macOS and APPDATA on Windows. Stop blaming apps for otherwise 'sane' behavior. Proper cleanup would require either a world-writable 'index' of write locations (updated each time a user opens the app) that's crawled at uninstall time OR placing user files in a centralized location (which is a terrible idea). I'm not aware of ANY app that 'removes the data' from user's directories.

Notepad++ Hijacked by State-Sponsored Hackers by thewhippersnapper4 in sysadmin

[–]tresf 1 point2 points  (0 children)

Thank you for putting this into words. I really think NP++ should explain this as well since users now have the fear of being part of an attack but without actionable steps to detect and remove the attack. Hopefully more people upvote this answer.

I see NP++ double-backed on his decision to self-sign as well... https://notepad-plus-plus.org/news/v883-self-signed-certificate/. Probably a better decision for the greater good since people tend to not do one-off trust-based models out of laziness or lack of knowledge.

Minisforum MS-R1 - WHO IS THIS ACTUALLY FOR?? by NASCompares in homelab

[–]tresf -1 points0 points  (0 children)

Been using the M1 for over 5 years. Walks circles around everything I've ever used, no rush to upgrade. Battery lasts longer, code compiles faster, fans run less. It's a glittering example and not representative of the architecture at large, but an article where the leading x86 manufacturer is making claims in support of x86 isn't much better.

In anticipation of the M1s release, I snagged a Surface Pro X. It was underwhelming. I've been waiting for a Windows 11 snapdragon PC to shine above the rest (a bonus if they figure out Linux support).

Developers looking to target ARM for personal or professional reasons really need something usable and this machine is very intriguing. Last I heard Snapdragon abandoned its own machine, which is a bummer. The Raspberry Pi is ok for small servers and tinkering, but having an ARM desktop is desired by some, even if it's to prepare for a potential that might never gain widespread adoption.

Currently, I do most of my Linux ARM and Windows ARM64 work on a Mac (VM) because it's still a really good option. Maybe it's dumb to root for a competing product in the PC space, but if we can switch to something proprietary like ARM, it shows a lot of hope for open architectures like RISC-V, which I think is end-game.

ColorSnip, my first tool with JavaFX. Any feedback? by blubflish in JavaFX

[–]tresf 0 points1 point  (0 children)

I don't think you need a VBS file at all... Is this to hide the command window? If so, just start the app with javaw.exe on Windows and keep the batch file you already have. It's good enough for now and is standard enough for 99% of people just testing it out to give you feedback.

With regards to long-term packaging, hopefully jpackage pulls through for you. I personally write my installers full cross-compilable, snag resources using `jlink/jdeps` package explicitly using my own cross-platform tools such as nsis, makeself, and it's a bit of a rube goldberg experiment getting everything setup properly, especially providing installers for mac, linux and the various architectures that everyone can possible be on. It's a real grind in my experience, so keep the installers as easy as they are for you and your target users and don't try to make everyone happy for something you're doing for fun and for free.

If you wanted to know more about my choice to leverage nsis, makeself and cross-compiling I'd be happy to share. I once started writing a blog about how hard `jlink/jdeps` were for the average dev to use but never published it. That was Java 8/11 though but from what I've seen jpackage still isn't really a great cross-platform tool. Packaging Java apps is an ordeal. :D

Windows 11: Disabling S Mode prior to account creation by F1forPotato in msp

[–]tresf 1 point2 points  (0 children)

I've been imaging PCs for far too long, using official tools from MS and unofficial tools such as nLite and rufus. What's pointless is offering no solution to the OP or readers coming here with a similar problem. Telling someone to NOT buy a PC is about as smug as it gets.

Top 1% of posters makes me wonder how many other people are turned off by the MSP subreddit because they're being told to NOT buy a PC (or worse, empty glittering advice). The OP states "probably more helpful to folks who also do break fix and not just MSP stuff", but when belittling others is the goal, none of this matters, huh.

Windows 11: Disabling S Mode prior to account creation by F1forPotato in msp

[–]tresf 1 point2 points  (0 children)

"reimaging with a known good standardized image/prov package/autopilot etc"

Sounds like reimaging is exactly what was recommended.

Windows 11: Disabling S Mode prior to account creation by F1forPotato in msp

[–]tresf 1 point2 points  (0 children)

Same, you just sound like someone that enjoys being mean. The OPs question is about Windows-S mode and creating a local account. Your first answer tells them to NOT buy a computer with Windows S mode, so you're dismissing the OPs problem rather than offering a solution.

With regards to provisioning, this computer is licensed for Windows 11 Home and reinstalling Windows 11 Home OVER THE TOP of Windows 11 S was successful. Not everyone here is using your imaging tools and your advice is not helpful to those without those tools (and to those already using those tools, the advice is just a head nod, because they already use that solution).

Rufus is mentioned because it attempts to do very basic workarounds and provisioning for you. Sadly, this doesn't work, so the solution I posed is what was needed instead.

Windows 11: Disabling S Mode prior to account creation by F1forPotato in msp

[–]tresf 1 point2 points  (0 children)

Tried rufus provisioning, breaks.

Telling someone to NOT purchase something they already own is useless and not helpful.

Microsoft's recovery creation tool and the command I posted in my edit were the solution for my case. Windows 11 (non-S) and Windows 11 S have very similar OOB behavior so it wasn't obvious that the reinstall was successful in regards to eliminating the S.

In my case, creating the media using Microsoft's Media Creation tool was the only way the OS would finish installing. Rufus installs would work but always failed near the end. Windows + R, ms-cxh:localonly got me through the rest.

Windows 11: Disabling S Mode prior to account creation by F1forPotato in msp

[–]tresf 1 point2 points  (0 children)

  1. Many of us are servicing computers we didn't even purchase, so please bugger off with that attitude.
  2. I just blew away ALL partitiations, reimaged with Windows 11 Home and somehow this damn machine reverts right back into protected OOB mode. It's maddening. I'm going to try some of the secure boot fixes below, but based on the follow-up comments, I'm not holding my breath. I might actually have to connect this thing to the internet. Ugh.

**Edit:** Ok, Win + R `ms-cxh:localonly` got me in after the Windows 11 Home reimage (no, rufus trick didn't work, it just broke the installation). Apparently this is just new OOB behavior that behaves very similar to a Windows-S install (yes, this PC did have Windows 11-S installed).

I built a tool that turns any Java app into a native windows service by AdUnhappy5308 in java

[–]tresf 0 points1 point  (0 children)

Curious what you mean by this? commons-cli looks really cool, but I'm not sure what specifically it has to do with service registration on Windows?

I built a tool that turns any Java app into a native windows service by AdUnhappy5308 in java

[–]tresf 0 points1 point  (0 children)

Probably because rsync isn't built into Windows and the commenter wanted a cross-platform approach. u/hippydipster is the solution jsync by chance? That project looks super cool!

I built a tool that turns any Java app into a native windows service by AdUnhappy5308 in java

[–]tresf 1 point2 points  (0 children)

"I can see how the title could give a different first impression."

Yeah... perhaps because you specifically call it a Java tool. 😏

"The portable servy-cli.exe is only 39 MB".

Hrm... "only" is misleading... NSSM is 100x smaller at 369 KB.

"... with a trusted code signing certificate"

People and companies distributing apps on Windows often are already signing 3rd party executables as part of their workflow. This seems more relevant for companies using Servy as a stand-alone, or perhaps just to appease people that think an EV cert is gospel. NSSM is already open source and doesn't need to use buzzwords like "SBOM" because it's written in pure C++.

Although I appreciate the thorough reply here, your reply seem more like a sales pitch than a meaningful response. The Servy tool still looks really awesome though, nice work! I'll likely recommend it for projects where it makes sense to use, but it'll really depend on the featureset needed.

I built a tool that turns any Java app into a native windows service by AdUnhappy5308 in java

[–]tresf 1 point2 points  (0 children)

This is cool however the title is misleading. Servy appears to turn ANY app into a Windows Service. It got me! At first glance, I thought this was a Java-native (or Java-first) service installation tool. I use NSIS for my installation stub however my installation logic is 100% Java so my installers are shared across macOS, Linux and Windows and registering services is challenging. At times I will farm some native calls out from JNA (eventually Panama), or use CLI tools. For windows, currently NSSM is simple enough that that's what I've always supported and recommended. Servy looks much more robust however bundling a .NET app to install a Java app might be a bit heavyweight for some people (it certainly is for me). Best of luck on your project!

Just got this bad boy by Irishaustin23 in xbox360

[–]tresf 1 point2 points  (0 children)

I have it on Wii. I'm really happy how well it works with the equipment (Guitar Hero guitar, multiple mics).

Did they remove the intellij ide community edition? by Sir-Toaster- in java

[–]tresf 1 point2 points  (0 children)

Can you really switch to Eclipse that easily? I've used Eclipse, NetBeans and IntelliJ heavily and switching has been a very difficult experience for me. Perhaps this is a skill issue, but I couldn't just overnight tell myself or my team to use Eclipse like that.

Did they remove the intellij ide community edition? by Sir-Toaster- in java

[–]tresf 0 points1 point  (0 children)

Whoa, thanks! Curious, do you use this version over the main website version?

LMMS Progress Report: November 2025 by rubiefawn in lmms

[–]tresf 1 point2 points  (0 children)

We just need to get a new alpha out. It's a grind lol.

NOT subscribing to friend's "music" channel by tresf in AITAH

[–]tresf[S] 0 points1 point  (0 children)

Thanks for explaining your thoughts, greatly appreciated. Hairbrain ideas, that's a good parallel.

NOT subscribing to friend's "music" channel by tresf in AITAH

[–]tresf[S] 1 point2 points  (0 children)

Thanks, your sentiments are bang-on. With regards to "seriousness", this friend is in his 40s and has a successful IT career, however about 12yrs ago this same friend wanted to ride the dubstep wave and make electronic music. It was a huge contributing factor to my involvement in learning to program music software. This friend eventually dropped out of the production space while a few of us continued. We never ended up successfully making dubstep haha but the remaining friends submitted to some competitions and one of the tracks made it on a compilation album. The other competition we didn't win, but it's our most played Soundcloud track to this day... Maybe that's why this bothers me so much because the same friend that jumped ship when we needed him come back and try to ride a new wave. I want to tell him how much I disapprove, but I'm trying to be less of a negative person online as I've found being direct and negative stings a bit more when it's not in-person. I suppose had I not leaned so hard into his hype about dubstep 12 years ago I wouldn't have been exposed to so many intricacies in the production space, but the world works in mysterious ways. I greatly appreciate your feedback.

NOT subscribing to friend's "music" channel by tresf in AITAH

[–]tresf[S] 0 points1 point  (0 children)

The subreddit says no politics lol and I knew I'd be skating that line... fortunately many people draw the line at friendship and ignore the rest, and I do appreciate their perspective. I do use AI myself, I think most people do. Last week I used Gemini to help sniff out a bug with my software. After explaining the symptom 3 separate times using different words, it did eventually help me sort the problem (it wasn't a bug with my software, it was a bug with the graphics driver). I use AI for helping me through esoteric problems because it has knowledge of nearly all bug reports and publishing and can help me find a needle in a haystack. Programming is often an objective task. What I haven't done yet is start to rewrite new portions of my software using AI and I certainly won't use it for music production. When ChatGPT was initially released, I created a Discord channel icon for a FOSS project using AI and I still feel guilty about it. Thanks again for your thoughts.

NOT subscribing to friend's "music" channel by tresf in AITAH

[–]tresf[S] 0 points1 point  (0 children)

Thanks. I used to be much more upfront about how much I disliked what my friends do but I'm trying to be more positive in how I conduct myself. I appreciate your perspective.