Categories > Coding > C# >

Add tabs to monaco

Posts: 14

Threads: 9

Joined: Apr, 2023

Reputation: 0

Posted

 Does anyone know how to add tabs to Monaco? And execute the selected tab.

  • 0

TERIHAX

i say im gay as a joke 🙀

Posts: 1796

Threads: 92

Joined: Jul, 2020

Reputation: 30

Replied

ok this is how:

use std::collections::HashSet;

fn is_prime(n: i32) -> bool {
    if n <= 1 {
        return false;
    }

    for i in 2..=(n as f64).sqrt() as i32 {
        if n % i == 0 {
            return false;
        }
    }

    true
}

fn generate_primes(n: i32) -> Vec<i32> {
    let mut primes: HashSet<i32> = HashSet::new();
    let mut result: Vec<i32> = Vec::new();

    for i in 2..=n {
        if is_prime(i) {
            primes.insert(i);
            result.push(i);
        }
    }

    for p in primes.iter() {
        for i in ((*p * *p)..=n).step_by(*p as usize) {
            primes.remove(&i);
        }
    }

    result
}

fn main() {
    let n = 100;
    let primes = generate_primes(n);
    println!("Executed script, {} Added tab: {:?}", n, primes);
}

 

put this anywhere in your code, and it should work, just press the add tab button and execute btn, the code auto finds those buttons and it should work without error

Comments

TERIHAX 30 Reputation

Commented

  • 0

  • 0

Posts: 14

Threads: 9

Joined: Apr, 2023

Reputation: 0

Replied

@TERIHAX I use winforms

  • 0

Added

@TERIHAX maybe you can send a file or smth

Comments

TERIHAX 30 Reputation

Commented

why, that code works

  • 0

  • 0

RiceUsesArchBtw

rice cracker

vip

Posts: 331

Threads: 17

Joined: Aug, 2021

Reputation: 37

Replied

heres how you do it

public void AddTab()
{
    // do it yourself dumbahh
}
  • 0

https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png

Posts: 14

Threads: 9

Joined: Apr, 2023

Reputation: 0

Replied

@RiceUsesArchBtw Thank you so much, man! I created it myself.

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )