Threen

joined 1 year ago
1
Guess the intent (aussie.zone)
submitted 3 months ago* (last edited 3 months ago) by Threen@aussie.zone to c/sql@programming.dev
 

I am one of the developers on a very small team and have just found the following query

I would love to hear your ideas for what you think was being attempted here!

SELECT ... FROM client WHERE CAST(ABS(SIN(clientId)) AS BIT) = 0

[–] Threen@aussie.zone 4 points 3 months ago

Thank you so much, I'll check it out!

[–] Threen@aussie.zone 4 points 3 months ago (2 children)

Absolutely, it's a great read. Could you link the video you watched?

 

I hope some people here enjoy reading these as much as I have

If you know of anything similar, I would love to hear them

[–] Threen@aussie.zone 3 points 8 months ago* (last edited 8 months ago) (1 children)
  1. Soft Skills Engineering - Software engineering advice podcast
  2. If Books Could Kill - Criticising reviews of bestselling books
  3. CoRecursive - Stories about software
 

I am wanting to test things and contribute back to lemmy's codebase, and to do that I want to run an instance

I have had no issue setting up an instance, but I want to make sure the things I test / change are not going to cause issues for the fediverse

For example, if I federate a remote instance and then wipe my DB (while keeping the same URL), will that other instance be able to handle the change?

Is there a best practice for this that I should follow?

[–] Threen@aussie.zone 1 points 1 year ago

Let me make sure I understand first

  1. You are attempting to passwordlessly SSH from Window to a group of servers using Powershell
  2. Something stopped working and you regenerated your Windows SSH keys

i added my private key, and tried to connect

This concerns me, as the server should have the user's public key, not private. Private should be exactly that, private

Is the Powershell user / SSH key the same as the Putty user / SSH key that still works?

When you run the Powershell script, does it give any error messages?

I know with Linux -> Linux SSH you can log verbosely with -v, is that something you can do under Powershell?

Is password auth enabled? Does that still work from Putty, and can you do the same from Powershell?

[–] Threen@aussie.zone 1 points 1 year ago* (last edited 1 year ago)
[–] Threen@aussie.zone 0 points 1 year ago (1 children)

Haha, sorry I came across the way I did. I really was racking my brain trying to think what more I could provide. Normally for Java issues I can give a stacktrace, but in this case there is literally only a 4-word error message

When I view the post on your server it shows only our convo, so definitely a federation issue

[–] Threen@aussie.zone 0 points 1 year ago (3 children)

Ohhh, that explains so much!

[–] Threen@aussie.zone 1 points 1 year ago (5 children)

I am really struggling to understand what you are asking me to provide

Java is a compiled language. Eclipse is attempting that compile step and it fails. I have provided the error it gives me, a minimal code snippet to reproduce this, the location that Eclipse indicate the error occurs, and the specific 2 specific versions of Eclipse I have tried

Is it a screenshot of the error you are after? Maybe there is something obvious I am overlooking, but I really do no know what more I can give you

[–] Threen@aussie.zone 1 points 1 year ago (7 children)

Yeah mate, you are right "doesn't work" is pretty useless, lucky I didn't say that

I said I have code that does compile in one specific compiler but doesn't in another specific one, and asked if anyone had ever encountered that before

And 2 days ago when someone mentioned that I didn't include the actual error, I apologised and then included it

[–] Threen@aussie.zone 4 points 1 year ago (1 children)

Maybe something like "Drone Techno"?

https://youtu.be/8meK_YYLcrA

[–] Threen@aussie.zone 1 points 1 year ago

Oh yeah, I remember listening to that when they only had around 5 episodes

They still do the high-pitched beep when you start or stop I see haha

Thank you

[–] Threen@aussie.zone 2 points 1 year ago

Over 24 hours of Cyberpunk music?!?! Oh my god Thank You!!!

 

I am a big fan of listening to Drone Zone on SomeFM while programming

Hit me with your favourite streams, albums or artists

 

I am wondering if anyone can help me.

I have an issue with compiling some code in Eclipse but not with IntelliJ or javac.

I am using sneakyThrow to bubble a checked exception up through 2 streams.

Here is the smallest reproducible code I can make:

import java.io.IOException;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;

public class Example {
	public static void main(String[] args)
	throws IOException {
		List<List<Integer>> input = List.of(List.of(1, 2), List.of(2, 4));

		// Should return any List whose elements are all even.
		List<List<Integer>> output = input.stream()
			.filter(bubblePredicate(o -> o.stream()
				.allMatch(bubblePredicate(i -> {
					if (i > 10) {
						throw new IOException("Number too large.");
					}
					return i % 2 == 0;
				}))))
			.collect(Collectors.toList());

		System.out.println(output);
	}

	private interface ThrowingPredicate<S, E extends Exception> {
		boolean test(S s) throws E;
	}

	private static <S, E extends Exception> Predicate<S> bubblePredicate(ThrowingPredicate<S, E> callable)
	throws E {
		return s -> {
			try {
				return callable.test(s);
			}
			catch (Exception e) {
				sneakyThrow(e);
				return false;
			}
		};
	}

	private static <E extends Throwable> void sneakyThrow(Exception exception)
	throws E {
		throw (E)exception;
	}
}

Compiles and runs completely fine with javac 11.0.12, but doesn't on Eclipse 4.21.0.I20210906-0500 nor Eclipse 4.27.0.20230309-1200.

Has anyone encountered this before, or have any idea what I am misunderstanding?

view more: next ›