Categories > Coding > C# >
Add tabs to monaco
Posted
Does anyone know how to add tabs to Monaco? And execute the selected tab.
Cancel
Post
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
Cancel
Post
Replied
heres how you do it
public void AddTab()
{
// do it yourself dumbahh
}
Cancel
Post
https://cdn.discordapp.com/attachments/1023423265160560745/1132948683747500092/Frame_12x.png
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Comments
TERIHAX 30 Reputation
Commented
@Astronemi ty
0