[-] [email protected] 1 points 2 months ago

Update: The original dev does not remember exactly. However they have said that clientId was originally a VARCHAR, so this may have been checking for both '0' or ''

So an over-engineered workaround to a bad datatype perhaps?

[-] [email protected] 3 points 2 months ago

I forgot to mention this is in SQL Server, so SIN operates on radians. So I THINK this can only ever cast to a 0 when clientId is also 0

It certainly doesn't for any of the 100,000 existing rows

[-] [email protected] 4 points 2 months ago

The client table has around 100,000 rows each with a unique clientId, none of which are returned from the CAST / ABS / SIN

I think you are right and this is a 'fix' for something lost to time. I am going to talk to the original dev tomorrow to see if they remember what it was for

23
Guess the intent (aussie.zone)
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]

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

[-] [email protected] 4 points 3 months ago

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

[-] [email protected] 4 points 3 months ago

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

57
submitted 3 months ago by [email protected] to c/[email protected]

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

35
submitted 3 months ago by [email protected] to c/[email protected]
[-] [email protected] 3 points 8 months ago* (last edited 8 months ago)
  1. Soft Skills Engineering - Software engineering advice podcast
  2. If Books Could Kill - Criticising reviews of bestselling books
  3. CoRecursive - Stories about software
2
submitted 1 year ago by [email protected] to c/[email protected]

I have the maxed out Pokemon storage of 6,800. Does anyone know if I buy the Great Storage Box if it will still increase this?

[-] [email protected] 3 points 1 year ago* (last edited 1 year ago)

0589 6066 6425

I would love to give gifts to anyone here

I am from Australia, and I travel between Queensland and South Australia regularly

7
Glitched avatar (aussie.zone)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

Found an interesting little glitch

  1. Close your game
  2. Turn your phone's GPS off
  3. Start the game and as soon as it loads open routes
  4. Turn GPS back on and after a few seconds close routes

Gyms and stops don't appear

Pokemon cannot be clicked on

[-] [email protected] 1 points 1 year ago* (last edited 1 year ago)

This is in my nearby list

This is in my profile

11
Routes? (aussie.zone)
submitted 1 year ago by [email protected] to c/[email protected]

What am I meant to be doing with "routes". There are none around me to follow and I cannot seem to create a new one

I am missing something? Do I need to complete something?

3
Programming Music (somafm.com)
submitted 1 year ago by [email protected] to c/[email protected]

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

Hit me with your favourite streams, albums or artists

1
submitted 1 year ago by [email protected] to c/[email protected]

I fell in love with this album many years ago, I hope someone here will enjoy it too

3
submitted 1 year ago by [email protected] to c/[email protected]

I work on top of pokestops, so add me and you'll get one today

0692 0102 3964

1
submitted 1 year ago by [email protected] to c/[email protected]

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?

2
submitted 1 year ago by [email protected] to c/[email protected]

Can probably only send you 1 gift, as my friend list is quite full

0692 0102 3964

3
submitted 1 year ago by [email protected] to c/[email protected]
view more: next ›

Threen

joined 1 year ago