Skip to content

Instantly share code, notes, and snippets.

View AnAverageBeing's full-sized avatar
👽
I am rock

AnAverageBeing AnAverageBeing

👽
I am rock
View GitHub Profile
@AnAverageBeing
AnAverageBeing / attack.c
Created February 27, 2024 14:10
TCP FLOOD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <getopt.h>
@AnAverageBeing
AnAverageBeing / Project.md
Last active October 29, 2023 06:05
Project

1. Rearrange

Define a class in java to modify a word by bringing all the vowels in the word at the beginning followed by the consonants.

Answer :=

public class Rearrange {
    private String word;
@AnAverageBeing
AnAverageBeing / bitarr.go
Created August 17, 2023 13:25
The bitsarr package facilitates manipulation of arrays of bits in a Big-Endian manner. It enables creation, setting, and retrieval of individual bits within an array, along with generating binary string representations.
package bitsarr
import (
"bytes"
"errors"
)
type bit byte
const (

1. 2D Array Operations

Write a Java program to perform the following operations on a given 2D array:

  • Find the sum of all elements in the array.
  • Find the maximum element in the array.
  • Find the minimum element in the array.
  • Calculate the average of all elements in the array.
public class ArrayOperations {
@AnAverageBeing
AnAverageBeing / wow.go
Created March 11, 2023 18:29
super cool code if u can read
This file has been truncated, but you can view the full file.
package main
func ok() {
{
{
{
{
{
{
{
// Cleary did not used Chat GPT to generate comments for this code
package main
import (
"bytes" // Package for working with byte buffers
"fmt" // Package for formatted I/O
"os" // Package for working with the operating system
)
const (
package Arrays.Sorting;
public class BubbleSort {
/*
* This method takes a int array as input
* Then sorts the array using BUBBLE SORT algorithm
* Then returns the sorted array
*/
public static int[] sort(int[] arr) {
int n = arr.length;