Tuuba Time: 2024-11-24 08:16:28 | Local Time: 2024-11-24 06:16:28

You are not logged in.

^ #17461 2017-10-02 00:28:46

abraker
Mad Scientist
From: Experimentation Site
Registered: 2015-10-20
Posts: 590

Re: ITT: Pretend we are still writing in osu! OT


hfT37VC.gif

Offline

^ #17462 2017-10-10 01:27:23

InsectProxy
a moskito made it for a stig
Registered: 2015-10-28
Posts: 406

Re: ITT: Pretend we are still writing in osu! OT

Last night I accidentally ate a whole baguette.


LJHcm9k.png?1

Offline

^ #17463 2017-10-10 04:35:00

thelewa
absolute
Registered: 2016-04-04
Posts: 163

Re: ITT: Pretend we are still writing in osu! OT

why didn't battler just lift the door off the hinges preserving the chain lock seal

it would have been the coolest thing ever
why did I only get this idea afterwards

aargh episode 6 could have been so much better, I'm going to make my own improved version


We do not die - we go to hell to regroup.

Offline

^ #17464 2017-10-10 07:55:48

tupsu
Sales Manager
From: south finland
Registered: 2016-05-19
Posts: 1,323
Website

Re: ITT: Pretend we are still writing in osu! OT

https://www.youtube.com/watch?v=GceNsojnMf0
all credit to ipep (this is still a bad joke don't take this as validation)


(´・ω・`)

Offline

^ #17465 2017-10-10 11:06:39

IppE
Complaints Department
From: Funland
Registered: 2015-10-19
Posts: 2,410
Website

Re: ITT: Pretend we are still writing in osu! OT

tupsu wrote:

(this is still a bad joke don't take this as validation)

1475458639057.gif

Offline

^ #17466 2017-10-10 12:32:43

fittan
nup.pw/rPApJe.webm
From: irc://
Registered: 2015-10-30
Posts: 1,537
Website

Re: ITT: Pretend we are still writing in osu! OT

i maked bad depres meme

edit: also



fittan.gif

Offline

^ #17467 2017-10-10 18:22:36

InsectProxy
a moskito made it for a stig
Registered: 2015-10-28
Posts: 406

Re: ITT: Pretend we are still writing in osu! OT

still better than other meme


LJHcm9k.png?1

Offline

^ #17468 2017-10-11 11:15:02

IppE
Complaints Department
From: Funland
Registered: 2015-10-19
Posts: 2,410
Website

Re: ITT: Pretend we are still writing in osu! OT

public class ArrayMinMax {

    /**
    * Method arrayMin
    * returns the smallest value in a given array
    * @param array  array to find minimum from
    */
    public static int arrayMin(int[] array) {
        int temp = array[0]; // set value of first index in temp
        for (int n = 1;n < array.length;n++) {
            if (temp > array[n]) // compare current value against temp
                temp = array[n]; // if current value is smaller, save it in temp
        }
        return temp; // return temp that now has the smallest value
    }

    /**
    * Method arrayMax
    * returns the largest value in a given array
    * @param array  array to find maximum from
    */
    public static int arrayMax(int[] array) {
        int temp = array[0];
        for (int n = 1;n < array.length;n++) {
            if (temp < array[n]) // the only difference to min is the flip of > to <
                temp = array[n];
        }
        return temp;

    }

    /**
    * Main program
    * @param user input, not used
    */
    public static void main(String args[]) {

        int[] values = { 1, -5, 10, -15, 0, 7 };

        // prints out min and max with formatting
        System.out.printf("%-5s%2d\n%-5s%2d\n","Min:",arrayMin(values),"Max:",arrayMax(values));
    }
}

suicide

Offline

^ #17469 2017-10-11 11:53:08

InsectProxy
a moskito made it for a stig
Registered: 2015-10-28
Posts: 406

Re: ITT: Pretend we are still writing in osu! OT

Yup thats a java.
Been a while since I've used a java.
My instincts tell me you've forgotten to import a minimum of 5 classes including java.io.
I know this still works.
My experience tells me otherwise.


LJHcm9k.png?1

Offline

^ #17470 2017-10-11 13:13:49

IppE
Complaints Department
From: Funland
Registered: 2015-10-19
Posts: 2,410
Website

Re: ITT: Pretend we are still writing in osu! OT

public class ArrayColorConversion {


    /**
    * Method arrayMin
    * returns the smallest value in a given array
    * @param array  array to find minimum from
    * @return minimum value in array
    */
    public static int arrayMin(int[] array) {
        int temp = array[0]; // set value of first index in temp
        for (int n = 1;n < array.length;n++) {
            if (temp > array[n]) // compare current value against temp
                temp = array[n]; // if current value is smaller, save it in temp
        }
        return temp; // return temp that now has the smallest value
    }

    /**
    * Method arrayMax
    * returns the largest value in a given array
    * @param array  array to find maximum from
    * @return maximum value in array
    */
    public static int arrayMax(int[] array) {
        int temp = array[0];
        for (int n = 1;n < array.length;n++) {
            if (temp < array[n]) // the only difference to min is the flip of > to <
                temp = array[n];
        }
        return temp;

    }

    /**
    * Method RGBtoHSV
    * converts given RGB value to a HSV value
    * @param array  array to convert values from
    * @return array with values in HSV format
    */
    public static int[] RGBtoHSV(int[] array) {
        //initialize return array and temporary array
        int[] hsv = {0,0,0};
        double[] hsv_t = {0,0,0};

        // convert the 0-255 rgb values to 0-1
        double r = (double) array[0] / 255;
        double g = (double) array[1] / 255;
        double b = (double) array[2] / 255;

        // calculate max, min and delta
        double cmax = (double) arrayMax(array) / 255;
        double cmin = (double) arrayMin(array) / 255;
        double delta = cmax - cmin;

        if (cmax <= 0) { // if max is 0, then everything is 0 and HSV values are 0,0,0
            return hsv;
        }
        else { // if not, calculate hsv values
            if (r >= cmax)
                hsv_t[0] = (g - b) / delta;
            else if (g >= cmax)
                hsv_t[0] = ((b - r) / delta) + 2.0;
            else
                hsv_t[0] = ((r - g) / delta) + 4.0;

            hsv_t[0] *= 60;
            if (hsv_t[0] < 0)
                hsv_t[0] += 360;

            hsv_t[1] = (delta / cmax) * 100;
            hsv_t[2] = cmax * 100;
        }

        // dump the temp values into int array
        hsv[0] = (int) Math.round(hsv_t[0]);
        hsv[1] = (int) Math.round(hsv_t[1]);
        hsv[2] = (int) Math.round(hsv_t[2]);

        return hsv;
    }

    /**
    * Main program
    * @param args user input, not used
    */
    public static void main(String args[]) {

        int[] colour = { 255,0,128 }; //the prettiest of colours
        int[] colourHSV = RGBtoHSV(colour);
        System.out.print("H: " + colourHSV[0] + "\n");
        System.out.print("S: " + colourHSV[1] + "\n");
        System.out.print("V: " + colourHSV[2] + "\n");
    }
}

At least that one is somewhat interesting but it's still java psyduck

Bonus, maximum hacker IDE

Offline

^ #17471 2017-10-11 14:12:30

InsectProxy
a moskito made it for a stig
Registered: 2015-10-28
Posts: 406

Re: ITT: Pretend we are still writing in osu! OT

That reminds me that I want to learn vim to become a keyboard wizard but I need a good excuse to use it so that I don't look like a complete idiot hipster.

Hoo boy I'm rusty I need to get some practice in.


LJHcm9k.png?1

Offline

^ #17472 2017-10-11 23:08:21

zertap
Backend Oni
From: #tuuba
Registered: 2015-10-19
Posts: 621
Website

Re: ITT: Pretend we are still writing in osu! OT

>nano
>hacker
:----------D

meanwhile:

def checkSudoku(fName):
	sudokuNumbers = []
	with open(fName, 'r', encoding="utf-8") as f:
		for line in f:
			for char in line:
				if char.isnumeric():
					sudokuNumbers.append(int(char))

	sudokuRows = [sudokuNumbers[i:i + 9] for i in range(0, len(sudokuNumbers), 9)]
	sudokuColumns = [[] for i in range(9)]
	for row in sudokuRows:
		for i,col in enumerate(row):
			sudokuColumns[i].append(col)

	sudokuSubgrids = [[] for i in range(9)]
	offset = 0
	for i,row in enumerate(sudokuRows):
		if i % 3 == 0 and i != 0:
			offset += 3
		subgridparts = [row[x:x + 3] for x in range(0, len(row), 3)]
		for j, subgridpart in enumerate(subgridparts):
			for number in subgridpart:
				sudokuSubgrids[j+offset].append(number)

	sudokuSubgridRows = [sudokuSubgrids[i:i + 3] for i in range(0, len(sudokuSubgrids), 3)]

	illegalRows = []
	illegalCols = []
	illegalSubgrids = []
	
	for i,row in enumerate(sudokuRows):
		if len(row) != len(set(row)):
			illegalRows.append(str(i+1))

	for i,col in enumerate(sudokuColumns):
		if len(col) != len(set(col)):
			illegalCols.append(str(i+1))

	for x,subgridRow in enumerate(sudokuSubgridRows):
		for y,subgrid in enumerate(subgridRow):
			if len(subgrid) != len(set(subgrid)):
				illegalSubgrids.append(str([x+1, y+1]))

	if not illegalRows and not illegalCols and not illegalSubgrids:
		print("The sudoku solution is legal")
	else:
		if illegalRows:
			print("Illegal rows: {0}".format(' '.join(illegalRows)))
		if illegalCols:
			print("Illegal columns: {0}".format(' '.join(illegalCols)))
		if illegalSubgrids:
			print("Illegal subgrids: {0}".format(' '.join(illegalSubgrids)))

(takes files with content like: https://u.nya.fi/Te0QMN.txt )

Offline

^ #17473 2017-10-12 04:11:56

fittan
nup.pw/rPApJe.webm
From: irc://
Registered: 2015-10-30
Posts: 1,537
Website

Re: ITT: Pretend we are still writing in osu! OT

delet java



fittan.gif

Offline

^ #17474 2017-10-12 05:57:19

IppE
Complaints Department
From: Funland
Registered: 2015-10-19
Posts: 2,410
Website

Re: ITT: Pretend we are still writing in osu! OT

zertap wrote:

>nano
>hacker
:----------D

thejoke

Offline

^ #17475 2017-10-13 15:55:22

IppE
Complaints Department
From: Funland
Registered: 2015-10-19
Posts: 2,410
Website

Re: ITT: Pretend we are still writing in osu! OT

Moving blog:

HEHJME.jpeg

priorities

Offline

Board footer

Cookie policy

Powered by Maki (r-e 139/git:b8267ee)

mascot