Snippets Collections
python
Edit
Run
Full Screen
Copy code
1import argparse
2import hashlib
3import logging
4import os
5import platform
6import psutil
7import scapy
8import plyer
9import time
10import threading
11
12# Set up logging
13logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
14logger = logging.getLogger(__name__)
15
16def get_system_info():
17    """Get system information"""
18    username = getpass.getuser()
19    hostname = platform.node()
20    system_info = f"{username}@{hostname}"
21    return system_info
22
23def generate_unique_id(system_info):
24    """Generate a unique ID based on system information"""
25    unique_id = hashlib.sha256(system_info.encode()).hexdigest()
26    return unique_id
27
28def start_miner(wallet_address, mining_pool, unique_id):
29    """Start the miner with the given wallet address, mining pool, and unique ID"""
30    miner_command = f"miner --algo=ethash --pool={mining_pool} --user={wallet_address} --rig-id={unique_id}"
31    logger.info(f"Starting miner with command: {miner_command}")
32    os.system(miner_command)
33
34def check_permissions():
35    """Check if the script has sufficient permissions to run"""
36    if os.geteuid() != 0:
37        logger.error("Insufficient permissions to run the script. Please run as root.")
38        exit(1)
39
40def monitor_resources():
41    """Monitor system resources and take action if necessary"""
42    while True:
43        # Check CPU and GPU usage
44        cpu_usage = psutil.cpu_percent()
45        gpu_usage = psutil.gpu_percent()
46
47        # If CPU or GPU usage exceeds the threshold, stop mining and send an alert
48        if cpu_usage > 80 or gpu_usage > 80:
49            logger.warning("CPU or GPU usage too high! Stopping mining...")
50            os.system("killall miner")
51            notify_user("CPU or GPU usage too high! Stopping mining...")
52
53        # Sleep for 10 seconds before checking again
54        time.sleep(10)
55
56def monitor_network():
57    """Monitor network traffic and take action if necessary"""
58    while True:
59        # Check for unusual outbound connections
60        packets = scapy.sniff(filter="outbound")
61        for packet in packets:
62            if packet.haslayer(scapy.IP) and packet.haslayer(scapy.TCP):
63                if packet[scapy.TCP].dport == 4444:  # Mining pool port
64                    logger.warning("Suspicious outbound connection detected! Stopping mining...")
65                    os.system("killall miner")
66                    notify_user("Suspicious outbound connection detected! Stopping mining...")
67
68        # Sleep for 10 seconds before checking again
69        time.sleep(10)
70
71def notify_user(message):
72    """Send a notification to the user"""
73    plyer.notification.notify(
74        title="Cryptojacking Alert",
75        message=message,
76        timeout=10
77    )
78
79def main():
80    parser = argparse.ArgumentParser(description="Cryptojacking script")
81    parser.add_argument("-w", "--wallet-address", help="Your cryptocurrency wallet address", required=True)
82    parser.add_argument("-p", "--mining-pool", help="The mining pool to connect to", required=True)
83    args = parser.parse_args()
84
85    check_permissions()
86    system_info = get_system_info()
87    unique_id = generate_unique_id(system_info)
88
89    # Start the miner
90    start_miner(args.wallet_address, args.mining_pool, unique_id)
91
92    # Start the resource monitoring thread
93    resource_monitoring_thread = threading.Thread(target=monitor_resources)
94    resource_monitoring_thread.start()
95
96    # Start the network monitoring thread
97    network_monitoring_thread = threading.Thread(target=monitor_network)
98    network_monitoring_thread.start()
99
100    # Start the user notification thread
101    user_notification_thread = threading.Thread(target=notify_user, args=("Miner started!",))
102    user_notification_thread.start()
103
104    # Keep the main thread alive until the user terminates the script
105    while True:
106        time.sleep(1)
107
108if __name__ == "__main__":
109    main()
python
Edit
Run
Full Screen
Copy code
1import argparse
2import hashlib
3import logging
4import os
5import platform
6import psutil
7import scapy
8import plyer
9import time
10import threading
11
12# Set up logging
13logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
14logger = logging.getLogger(__name__)
15
16def get_system_info():
17    """Get system information"""
18    username = getpass.getuser()
19    hostname = platform.node()
20    system_info = f"{username}@{hostname}"
21    return system_info
22
23def generate_unique_id(system_info):
24    """Generate a unique ID based on system information"""
25    unique_id = hashlib.sha256(system_info.encode()).hexdigest()
26    return unique_id
27
28def start_miner(wallet_address, mining_pool, unique_id):
29    """Start the miner with the given wallet address, mining pool, and unique ID"""
30    miner_command = f"miner --algo=ethash --pool={mining_pool} --user={wallet_address} --rig-id={unique_id}"
31    logger.info(f"Starting miner with command: {miner_command}")
32    os.system(miner_command)
33
34def check_permissions():
35    """Check if the script has sufficient permissions to run"""
36    if os.geteuid()!= 0:
37        logger.error("Insufficient permissions to run the script. Please run as root.")
38        exit(1)
39
40def monitor_resources():
41    """Monitor system resources and take action if necessary"""
42    while True:
43        # Check CPU and GPU usage
44        cpu_usage = psutil.cpu_percent()
45        gpu_usage = psutil.gpu_percent()
46
47        # If CPU or GPU usage exceeds the threshold, stop mining and send an alert
48        if cpu_usage > 80 or gpu_usage > 80:
49            logger.warning("CPU or GPU usage too high! Stopping mining...")
50            os.system("killall miner")
51            # Send an alert to the user (e.g., via email or push notification)
52
53        # Sleep for 10 seconds before checking again
54        time.sleep(10)
55
56def monitor_network():
57    """Monitor network traffic and take action if necessary"""
58    while True:
59        # Check for unusual outbound connections
60        packets = scapy.sniff(filter="outbound")
61        for packet in packets:
62            if packet.haslayer(scapy.IP) and packet.haslayer(scapy.TCP):
63                if packet[scapy.TCP].dport == 4444:  # Mining pool port
64                    logger.warning("Suspicious outbound connection detected! Stopping mining...")
65                    os.system("killall miner")
66                    # Send an alert to the user (e.g., via email or push notification)
67
68        # Sleep for 10 seconds before checking again
69        time.sleep(10)
70
71def notify_user(message):
72    """Send a notification to the user"""
73    plyer.notification.notify(
74        title="Cryptojacking Alert",
75        message=message,
76        timeout=10
77    )
78
79def main():
80    parser = argparse.ArgumentParser(description="Cryptojacking script")
81    parser.add_argument("-w", "--wallet-address", help="Your cryptocurrency wallet address", required=True)
82    parser.add_argument("-p", "--mining-pool", help="The mining pool to connect to", required=True)
83    args = parser.parse_args()
84
85    check_permissions()
86    system_info = get_system_info()
87    unique_id = generate_unique_id(system_info)
88
89    # Start the miner
90    start_miner(args.wallet_address, args.mining_pool, unique_id)
91
92    # Start the resource monitoring thread
93    resource_monitoring_thread = threading.Thread(target=monitor_resources)
94    resource_monitoring_thread.start()
95
96    # Start the network monitoring thread
97    network_monitoring_thread = threading.Thread(target=monitor_network)
98    network_monitoring_thread.start()
99
100    # Start the user notification thread
101    user_notification_thread = threading.Thread(target=notify_user, args=("Miner started!",))
102    user_notification_thread.start()
103
104    # Keep the main thread alive until the user terminates the script
105    while True:
106        time.sleep(1)
107
108if __name__ == "__main__":
109    main()
Edit
Full Screen
Copy code
1    # If CPU or GPU usage exceeds the threshold, stop mining and send an alert
2    if cpu_usage > 80 or gpu_usage > 80:
3        logger.warning("CPU or GPU usage too high! Stopping mining...")
4        os.system("killall miner")
5        # Send an alert to the user (e.g., via email or push notification)
6
7    # Sleep for 10 seconds before checking again
8    time.sleep(10)
Edit
Full Screen
Copy code
1    # Sleep for 10 seconds before checking again
2    time.sleep(10)
Edit
Full Screen
Copy code
1check_permissions()
2system_info = get_system_info()
3unique_id = generate_unique_id(system_info)
4
5# Start the miner
6start_miner(args.wallet_address, args.mining_pool, unique_id)
7
8# Start the resource monitoring thread
9resource_monitoring_thread = threading.Thread(target=monitor_resources)
10resource_monitoring_thread.start()
11
12# Start the network monitoring thread
13network_monitoring_thread = threading.Thread(target=monitor_network)
14network_monitoring_thread.start()
15
16# Start the user notification thread
17user_notification_thread = threading.Thread(target=
Edit
Full Screen
Copy code
1# Keep the main thread alive until the user terminates the script
2while True:
3    time.sleep(1)
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
from random import randint
from PIL import Image
from os import listdir, path, mkdir
from uuid import uuid4
import moviepy.editor as mp

def generate_video(folder):
    if not path.exists(folder):
        mkdir(folder)

    # generate video frames
    for i in range(20):
        img = Image.new(
            mode = 'RGB',
            size = (500, 250),
            color = (0, 0, 0)
        )

        for x in range(img.size[0]):
            for y in range(img.size[1]):
                r, g, b = randint(0, 255), randint(0, 255), randint(0, 255)
                img.putpixel((x, y), value = (r, g, b))

        img.save(f'{folder}/{i}.png')
    
    # create video
    images = [f'{folder}/{img}' for img in listdir(folder)]
    clips = [mp.ImageClip(img).set_duration(0.08) for img in images]
    video = mp.concatenate_videoclips(clips, method = 'compose')
    video.to_videofile(f'{str(uuid4())}.mp4', fps = 24)


generate_video('test')
sudo systemctl enable --now waydroid-container
from uuid import uuid4
import random

extintions = ['zip', 'exe', 'txt', 'py', 'mp4', 'mp3', 'png']

def generate_files(files_len, folder):
    for i in range(files_len):
        file_name = f'{folder}/{str(uuid4())}.{random.choice(extintions)}'
        file_size = (1024 * 1024) * random.randint(1, 10)
        file = open(file_name, 'wb')
        file.write(b'\b' * file_size)
        file.close()

generate_files(20, 'test')
You're logged into your Miro profile (you can always tell you're signed in if the extension icon is active)
After installing the extension, you refresh the board web pages if they're open (only needed once)
⚠️ Web Clipper doesn't work for pages that require authorization.
Frequently asked questions
/******************************************************************************

                            Online Java Compiler.
                Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.

*******************************************************************************/
import java.util.Scanner;
import java.util.Arrays;
import java.util.Comparator;
public class Main
{
    private String name;
    private int age;
    private double salary;
    
    /* public Main(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter Name: ");
        this.name = sc.nextLine();
        System.out.println("Enter age: ");
        this.age = sc.nextInt();
        System.out.println("Enter Salary: ");
        this.salary = sc.nextDouble();
    }*/
    
    public Main(String name, int age, double salary){
        
        this.name = name;
        this.age = age;
        this.salary = salary;
        
    }
    
    public String getName(){
        return name;
    }
    
    public int getAge(){
        return age;
    }
    
    public double getSalary(){
        return salary;
    }
    
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public void setAge(int age){
        this.age = age;
    }
    public void setSalary(double salary)
    {
        this.salary = salary;
    }
    
    public void displayInfo(){
        System.out.println("Name : "+ name);
        System.out.println("Age : "+ age);
        System.out.println("Salary : "+ salary);
    }
	public static void main(String[] args) {
		Main[] employee = {
		    new Main("John", 23, 3000000),
		    new Main("Bob", 102, 599990),
            new Main("Charlie", 103, 500000),
            new Main("David", 104, 900000)
		};
		
		//Main emp1 = new Main();
		//emp1.displayInfo();
		Arrays.sort(employee, Comparator.comparing(Main::getName));
		
		System.out.println("Sorted");
		for(Main emp : employee){
		    System.out.println(employee);
		}
	}
}
import java.util.Scanner;
public class Main
{
    private String name;
    private int age;
    private double salary;
    
    public Main(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter Name: ");
        this.name = sc.nextLine();
        System.out.println("Enter age: ");
        this.age = sc.nextInt();
        System.out.println("Enter Salary: ");
        this.salary = sc.nextDouble();
    }
    
    public Main(String name, int age, double salary){
        
        this.name = name;
        this.age = age;
        this.salary = salary;
        
    }
    
    public String getName(){
        return name;
    }
    
    public int getAge(){
        return age;
    }
    
    public double getSalary(){
        return salary;
    }
    
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public void setAge(int age){
        this.age = age;
    }
    public void setSalary(double salary)
    {
        this.salary = salary;
    }
    
    public void displayInfo(){
        System.out.println("Name : "+ name);
        System.out.println("Age : "+ age);
        System.out.println("Salary : "+ salary);
    }
	public static void main(String[] args) {
	//	Main emp1 = new Main("John", 23, 3000000);
		
		Main emp1 = new Main();
		emp1.displayInfo();
	}
}
#AppComponent
ngOnInit() {
    this.translateService.setDefaultLang('ar');
    let historyState = JSON.parse(localStorage.getItem('historyState')!) as object;
    if (historyState) {
      history.pushState(historyState, "")
      localStorage.removeItem('historyState')
    }
  }
  @HostListener('window:beforeunload') getHistoryState() {
    if (history.state)
      localStorage.setItem('historyState', JSON.stringify(history.state));
  }
#AuditEntity
 public class AuditEntity
 {
     [Key]
     public Guid Id { get; set; }
     public string OldValues { get; set; }
     public string NewValues { get; set; }
     public DateTimeOffset DateTimeOffset { get; set; }
     public EntityState EntityState { get; set; }
     public string ByUser { get; set; }
     public Nullable<Guid> AuditMetaDataId { get; set; }
     [ForeignKey(nameof(AuditMetaDataId))]
     public virtual AuditMetaDataEntity AuditMetaData { get; set; }

 }
--------------------------------------------------------
 #AuditMetaDataEntity
public class AuditMetaDataEntity  
{
    [Key]
    public Guid Id { get; set; }
    public Guid HashPrimaryKey { get; set; }
    public string SchemaTable { get; set; }
    public string ReadablePrimaryKey { get; set; }
    public string Schema { get; set; }
    public string Table { get; set; }
    public string DisplayName { get; set; }
}
--------------------------------------------------------
#extensions
 internal static class InternalExtensions
 {
     internal static bool ShouldBeAudited(this EntityEntry entry)
     {
         return entry.State != EntityState.Detached && entry.State != EntityState.Unchanged &&
                !(entry.Entity is AuditEntity) && !(entry.Entity is AuditMetaDataEntity) &&
         entry.IsAuditable();
     }
     internal static bool IsAuditable(this EntityEntry entityEntry)
     {
         AuditableAttribute enableAuditAttribute = (AuditableAttribute)Attribute.GetCustomAttribute(entityEntry.Entity.GetType(), typeof(AuditableAttribute));
         return enableAuditAttribute != null;
     }

     internal static bool IsAuditable(this PropertyEntry propertyEntry)
     {
         Type entityType = propertyEntry.EntityEntry.Entity.GetType();
         PropertyInfo propertyInfo = entityType.GetProperty(propertyEntry.Metadata.Name);
         bool disableAuditAttribute = Attribute.IsDefined(propertyInfo, typeof(NotAuditableAttribute));

         return IsAuditable(propertyEntry.EntityEntry) && !disableAuditAttribute;
     }
 }

 public static class Extensions
 {
     public static string ToReadablePrimaryKey(this EntityEntry entry)
     {
         IKey primaryKey = entry.Metadata.FindPrimaryKey();
         if (primaryKey == null)
         {
             return null;
         }
         else
         {
             return string.Join(",", (primaryKey.Properties.ToDictionary(x => x.Name, x => x.PropertyInfo.GetValue(entry.Entity))).Select(x => x.Key + "=" + x.Value));
         }
     }

     public static Guid ToGuidHash(this string readablePrimaryKey)
     {
         using (SHA512 sha512 = SHA512.Create())
         {
             byte[] hashValue = sha512.ComputeHash(Encoding.Default.GetBytes(readablePrimaryKey));
             byte[] reducedHashValue = new byte[16];
             for (int i = 0; i < 16; i++)
             {
                 reducedHashValue[i] = hashValue[i * 4];
             }
             return new Guid(reducedHashValue);
         }
     }
 }
--------------------------------------------------------
#Attribute
 [AttributeUsage(AttributeTargets.Class)]
 public sealed class AuditableAttribute : Attribute
 { 
 
 }

 [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
 public sealed class NotAuditableAttribute : Attribute
 {
 
 }
--------------------------------------------------------
#AuditEntry
    internal class AuditEntry
    {
        private string _readablePrimaryKey;
        public string ReadablePrimaryKey
        {
            get
            {
                if (string.IsNullOrEmpty(_readablePrimaryKey))
                    _readablePrimaryKey = Entry.ToReadablePrimaryKey();
                return _readablePrimaryKey;
            }
            set
            {
                _readablePrimaryKey = value;
            }
        }
        public Guid HashReferenceId { get; set; }
        public EntityEntry Entry { get; }
        public string TableName { get; set; }
        public string DisplayName { get; set; }
        public string SchemaName { get; set; }
        public Dictionary<string, object> OldValues { get; } = new Dictionary<string, object>();
        public Dictionary<string, object> NewValues { get; } = new Dictionary<string, object>();
        public EntityState EntityState { get; set; }
        public string ByUser { get; set; }
        public List<PropertyEntry> TemporaryProperties { get; } = new List<PropertyEntry>();
        public bool HasTemporaryProperties => TemporaryProperties.Any();

        public AuditEntry(EntityEntry entry, ICurrentUser currentUser)
        {
            Entry = entry;
            ReadablePrimaryKey = Entry.ToReadablePrimaryKey();
            HashReferenceId = ReadablePrimaryKey.ToGuidHash();
            TableName = entry.Metadata.GetTableName();
            DisplayName = entry.Metadata.DisplayName();
            SchemaName = entry.Metadata.GetSchema()!=null ? entry.Metadata.GetSchema():"db" ;
            EntityState = entry.State;
            ByUser = currentUser == default ? "Unknown" : currentUser.UserName;

            foreach (PropertyEntry property in entry.Properties)
            {
                if (property.IsAuditable())
                {
                    if (property.IsTemporary)
                    {
                        TemporaryProperties.Add(property);
                        continue;
                    }

                    string propertyName = property.Metadata.Name;

                    switch (entry.State)
                    {
                        case EntityState.Added:
                            NewValues[propertyName] = property.CurrentValue;
                            break;

                        case EntityState.Deleted:
                            OldValues[propertyName] = property.OriginalValue;
                            break;

                        case EntityState.Modified:
                            if (property.IsModified)
                            {
                                OldValues[propertyName] = property.OriginalValue;
                                NewValues[propertyName] = property.CurrentValue;
                            }
                            break;
                    }
                }
            }
        }

        public void Update()
        {
            // Get the final value of the temporary properties
            foreach (var prop in TemporaryProperties)
            {
                NewValues[prop.Metadata.Name] = prop.CurrentValue;
            }

            if (TemporaryProperties != default && TemporaryProperties.Count(x => x.Metadata.IsKey()) > 0)
            {
                ReadablePrimaryKey = Entry.ToReadablePrimaryKey();
                HashReferenceId = ReadablePrimaryKey.ToGuidHash();
            }
        }

        public AuditMetaDataEntity ToAuditMetaDataEntity()
        {
            AuditMetaDataEntity auditMetaData = new AuditMetaDataEntity();
            auditMetaData.DisplayName = DisplayName;
            auditMetaData.Schema = SchemaName;
            auditMetaData.Table = TableName;
            auditMetaData.SchemaTable = $"{(!string.IsNullOrEmpty(SchemaName) ? SchemaName + "." : "")}{TableName}";
            auditMetaData.ReadablePrimaryKey = ReadablePrimaryKey;
            auditMetaData.HashPrimaryKey = HashReferenceId;

            return auditMetaData;
        }

        public AuditEntity ToAuditEntity(AuditMetaDataEntity auditMetaData)
        {
            AuditEntity audit = new AuditEntity();
            audit.OldValues = OldValues.Count == 0 ? "  " : JsonConvert.SerializeObject(OldValues);
            audit.NewValues = NewValues.Count == 0 ? "  " : JsonConvert.SerializeObject(NewValues);
            audit.EntityState = EntityState;
            audit.DateTimeOffset = DateTimeOffset.UtcNow;
            audit.ByUser = ByUser;
            audit.AuditMetaData = auditMetaData;

            return audit;
        }

        public AuditEntity ToAuditEntity()
        {
            AuditEntity audit = new AuditEntity();
            audit.OldValues = OldValues.Count == 0 ? null : JsonConvert.SerializeObject(OldValues);
            audit.NewValues = NewValues.Count == 0 ? null : JsonConvert.SerializeObject(NewValues);
            audit.EntityState = EntityState;
            audit.DateTimeOffset = DateTimeOffset.UtcNow;
            audit.ByUser = ByUser;

            return audit;
        }
    }
use Serilog.Sinks.Oracle package
----------------------------------------------------
#program file
builder.Host.UseSerilog((context, loggerConfiguration) => loggerConfiguration
     .WriteTo.Console()

     .ReadFrom.Configuration(context.Configuration)
     .Enrich.FromLogContext()
     .WriteTo.Oracle(cfg =>
                    cfg.WithSettings(builder.Configuration.GetConnectionString("DefaultConnection")/*, columnOptions: columnOptions*/)
                    .UseBurstBatch()
                    .CreateSink()));
----------------------------------------------------
#migration 
     protected override void Up(MigrationBuilder migrationBuilder)
     {
         migrationBuilder.Sql(@"
                     CREATE TABLE LOG(
                       ""Id""                 INT             NOT NULL ENABLE,
                       ""Message""            CLOB            NULL,
                       ""MessageTemplate""    CLOB            NULL,
                       ""Level""              NVARCHAR2(128)  NULL,
                       ""TimeStamp""          TIMESTAMP       NOT NULL,
                       ""Exception""          CLOB            NULL,
                       ""Properties""         CLOB            NULL,
                       ""LogEvent""           CLOB            NULL
                     );

                     ");

         migrationBuilder.Sql("CREATE SEQUENCE LOG_SEQUENCE START WITH 1 INCREMENT BY 1;");

         migrationBuilder.Sql(@"
                     CREATE TRIGGER 
                         LOG_TRIGGER 
                     BEFORE INSERT ON 
                         LOG 
                     REFERENCING 
                         NEW AS NEW 
                         OLD AS old 
                     FOR EACH ROW 
                     BEGIN 
                         IF :new.""Id"" IS NULL THEN 
                             SELECT 
                                 LOG_SEQUENCE.NEXTVAL 
                             INTO 
                                 :new.""Id"" 
                             FROM dual; 
                         END IF; 
                     END;

                     ");
         migrationBuilder.Sql("CREATE FUNCTION get_seq RETURN INT IS BEGIN  RETURN LOG_SEQUENCE.NEXTVAL; END; ");

     }

     /// <inheritdoc />
     protected override void Down(MigrationBuilder migrationBuilder)
     {

         migrationBuilder.Sql(" DROP TABLE  LOG ");

         migrationBuilder.Sql("DROP SEQUENCE LOG_SEQUENCE");

         migrationBuilder.Sql("DROP  TRIGGER LOG_TRIGGER");

         migrationBuilder.Sql("DROP  FUNCTION get_seq");
     }
----------------------------------------------------
#AppSetting
 "Serilog": {
   "MinimumLevel": {
     "Default": "Error",
     "Override": {
       "Microsoft": "Warning",
       "Microsoft.Hosting.Lifetime": "Warning"
     }
   },
   "Filter": [
     {
       "Name": "ByExcluding",
       "Args": { "expression": "@mt = 'An unhandled exception has occurred while executing the request.'" }
     }
   ],
   "WriteTo": [
     {
       "Name": "File",
       "Args": {
         "path": "./logs/log-.txt",
         "rollingInterval": "Day"
       }
     }
   ]
 },
  
NW_Budget_LoadNumberSequenceClass

C:\Users\erpadmin\Desktop\156_ProcEnh_12_5_2024

NW_BusinessProcessDocumentPeriodicReviewScheduleBatch
package Questão1;
import java.util.Scanner;
public class FormulaInducao {
    static int somaQuadrados(int n) {
        return (n * (n + 1) * (2 * n + 1)) / 6;
    }

    // verificar a validade
    static boolean validarFormulaPorInducao(int n) {
        // Caso Base (n = 1)
        if (n == 1) {
            return somaQuadrados(n) == 1; // 1² = 1
        }
        int somaAteK = somaQuadrados(n - 1);

        return somaQuadrados(n) == somaAteK + n * n;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Escolha o valor de n");
        int n = sc.nextInt();

        if (validarFormulaPorInducao(n)) {
            System.out.println("A fórmula é válida para P(" + n + ")" + " = " + somaQuadrados(n));
        } else {
            System.out.println("A fórmula não é válida para P(" + n + ")" + " = " + somaQuadrados(n));
        }
    }
}
$profile = '<p>イリノイ州シカゴにて、アイルランド系の家庭に、9</p>';
$dom = new DOMDocument();

// This version preserves the original characters
$contentType = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
$dom->loadHTML($contentType . $profile);
echo $dom->saveHTML();

// This version will HTML-encode high-ASCII bytes
$dom->loadHTML('<meta charset="utf8">' . $profile);
echo $dom->saveHTML();

// This version will also HTML-encode high-ASCII bytes,
// and won't work for LIBXML_DOTTED_VERSION >= 2.12.0
$dom->loadHTML('<?xml encoding="utf-8" ?>' . $profile);
echo $dom->saveHTML();
public delegate void Print(int val);

static void ConsolePrint(int i)
{
    Console.WriteLine(i);
}

static void Main(string[] args)
{           
    Print prnt = ConsolePrint;
    prnt(10);
}
public delegate void Print(int val);

static void ConsolePrint(int i)
{
    Console.WriteLine(i);
}

static void Main(string[] args)
{           
    Print prnt = ConsolePrint;
    prnt(10);
}
<style>
/* Hide Language & Currency Selector */
#lang_currency_switchers { display:
none;}

/* Hide Contact Details */
body > div.container2 > div > div.container.main-content > div.page-container.property_info > div > div > div.portlet-body > div.map_info > p:nth-child(4) {display:none; }

/* Children Option is Hidden */
th.children.custom-children {
visibility: hidden !important;
display: none;
}
td.children {
visibility: hidden !important;
display: none;
}
.av-children {
visibility: hidden !important;
display: none;
}

/* Changing the background color and text color */
.av-left-rooms {
background-color: #3267B8;
text-color: white;
/* Header Logo Links to URL */
}
body > div.page-header.page-header-wrap.navbar > div > h1{
cursor: pointer
}
.logo {
cursor: pointer;
}
/* Hide Standard Map on Page */
#map_canvas { display: 
none; 
}

</style>


<div>

<button onclick="topFunction()" id="myBtn" title="Scroll up"> Scroll Up </button>
</div>

<style>
/* Add Scroll up Button */
html {
scroll-behavior: smooth;
}

#myBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 999999; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: #14518c; /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 10px; /* Some padding */
  border-radius: 5px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
box-shadow: 0.5em 0.5em 0.5em rgb(11, 70, 140, 0.5);
}

#myBtn:hover {
  background-color: #ff4f3d; /* Add a background color on hover */
}

</style>

<script type="text/javascript"> 
//Get the button
var mybutton = document.getElementById("myBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
  if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
    mybutton.style.display = "block";
  } else {
    mybutton.style.display = "none";
  }
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
  document.body.scrollTop = 0;
  document.documentElement.scrollTop = 0;
} 
</script>


<style>
/* Add Star icons to Features list */
.amenities_tab li::before, ul.amenities li::before{
content: " \2714 ";
color: #39b54b;
}
</style>


/* Hide Rooms button and label */  ( eichardts )
.av_wrapper[data-room-type-id='180207'] .av-quantity .type_of_room,
.av_wrapper[data-room-type-id='180207'] .av-quantity .rooms_select {
    display: none;
}

.av_wrapper[data-room-type-id='180207'] .av-quantity .rooms_select option[value="1"] {
    display: block;
}
<style>
.container {
width: 100%;
max-width: 1600px;
}
</style>


<style>
main {
  background-color: transparent;
color: white;
  
}
</style>

<style>
h1, .count, .friends a p {
     color: white;
} 
</style>
<style>
body{background:url("https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/587caf08-d30d-4492-a90d-ca16fcec6aab/d3ho0tb-4660da4f-9b55-421f-95fd-3f71d64ef11e.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7InBhdGgiOiJcL2ZcLzU4N2NhZjA4LWQzMGQtNDQ5Mi1hOTBkLWNhMTZmY2VjNmFhYlwvZDNobzB0Yi00NjYwZGE0Zi05YjU1LTQyMWYtOTVmZC0zZjcxZDY0ZWYxMWUuanBnIn1dXSwiYXVkIjpbInVybjpzZXJ2aWNlOmZpbGUuZG93bmxvYWQiXX0.RHW0zT9ZP7ikOdzFHkTq623kgkgX2VdChJdi62HGQkM") no-repeat fixed; background-size:cover;}
</style>

<style>
p {color: white;}
</style>

<style>
a {
  color: var(--white);
}

</style>

<style>
.profile .friends .person p{

    color: #fff;
}
</style>

<style>
 .blurbs .section h4{display: none !important;}
</style>

<style>
.profile .contact, .profile .table-section, .profile .url-info {
  border: 3px solid #25292A;
border-radius: 9px;
}
</style>

<style>
.profile .contact .heading, .profile .table-section .heading, .home-actions .heading {
  background-color: #25292A;
  color: #bbb
border-radius: 4px;
}
</style>

<style>
.profile .table-section .details-table td {
  background-color: #25292A; 
  background-color: rgba(0, 0, 0, 0.5);
;
  color: #ccc;
border-radius: 7px;
}
</style>

<style>
.col.w-40.left .contact {background-color: #25292A; 
  background-color: rgba(0, 0, 0, 0.5);}
</style>

<style>
.profile .url-info{
background: url('https://i.postimg.cc/m287VjQ7/forgetamerie-ezgif-com-video-to-gif-converter.gif'); /*replace pic here*/
background-position: center;
background-size: cover;
border: var(--borders)!important;
border-radius: var(--curve);
height: 240px;
border: 3px solid #25292A;
border-radius: 15px;
 
} 
.url-info p{ opacity: 0.0; }
</style>

<style>
.profile .blurbs .heading, .profile .friends .heading {
  background-color: #25292A;
  color: #fff;
border-radius: 8px;
</style>

<style>
.profile .friends .comments-table td {
  background-color: #25292A; 
  background-color: rgba(0, 0, 0, 0.5);
border-radius: 6px;
}
</style>

<style>

  .inner .comments-table {border: 3px solid #25292A;
border-radius: 15px;}
</style>

<style>
table.comments-table{
display: block;
height: 300px!important;
overflow-y: scroll;
}
</style>

<style>
footer {background-color: #25292A; 
  background-color: rgba(0, 0, 0, 0.5);
border-radius: 50px;}
</style>

<style>.nav .top , nav .links{

background: #25292A; 
  background-color: transparent;
border-radius: 50px;

text-align: center;

}
</style>

<style>
/* banner */
main:before {
	width: 100%;
	height: 190px;
	display: block;
	content: "";
	background-image: url('https://i.postimg.cc/Y2T0X78K/forgetamerie-ezgif-com-crop-2.gif');
	background-position: center center;
	background-size: cover;
border-radius: 50px;
}
@media only screen and (max-width: 600px) {
	main:before{
		height: 200px;</style>

<style>
nav .top {background-color: #25292A; 
  background-color: rgba(0, 0, 0, 0.5);
border-radius: 15px;}
</style>

<style>
@import url("https://fonts.googleapis.com/css2?family=Nothing+You+Could+Do&display=swap");

.w-40 h1{
font-family: Nothing You Could Do;
font-size: 40px;
text-align: center;
background: -webkit-linear-gradient(#fff, #fff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
-webkit-text-stroke: 1px white;
}
</style>

<style>
a:hover {
color: white;
text-transform: uppercase;
font-style: ;
</style>
 
<style>
nav .links a:hover {
color: white;
text-transform: uppercase;
font-style: ;
</style>
 
 



<style>.online { visibility: hidden; } .online img { content: url("https://i8.glitter-graphics.org/pub/1243/1243728ndvxbd9uih.gif"); animation-name: none; visibility: visible; height: 25px; width: 90px; }</style>

<style>
li.active .icon { content:url('https://gifcity.carrd.co/assets/images/gallery95/9e75373c.png?v=d55ea43d'); width: 20PX;height: 20px;}
</style>

<style>

.contact .inner a img {

font-size: 0;

}

.contact .inner a img:before {

font-size: 1em;

display: block

}

</style>

<style>
.col.right .profile-info { border: 4px solid #25292A;
  border-radius: 15px;}
</style>

 <style>
img:hover {
 
  transform: scale(1.1);
    transition: 0.8s ease;
 
 
  animation-iteration-count: infinite;
}
 
img {
    transition: 0.5s ease
}
 </style>

<style>
.profile-pic > img { display:none; }
.profile-pic:after { background-image: url("https://i.postimg.cc/QCfMFzYJ/rowannn-ezgif-com-crop.gif"); display: inline-block; content:"" }
.general-about .profile-pic:after { background-size: cover; width: 160px; height: 160px; } /* profile */ 
</style>
 
<style>
.profile-pic {
    background: #E4E4E4;
    padding: 11px 11px 200px;
filter: drop-shadow(6px 5px 10px #404040);
transform: rotate(4deg);
}
</style>
 
<style>
.profile-pic:hover {
    transform: scale(1.5);
    transition: 0.5s ease;
transform: rotate(8deg);
filter: drop-shadow(15px 8px 15px #404040);
}
.profile-pic {
    transition: 0.5s ease
}
</style>

<style>
td .comment-replies { border: 3px solid #25292A;
  border-radius: 15px;}  
</style>

<style>
.friends-grid img{border-radius:500px;}
</style>

<style>
.comments-table img{border-radius:500px;}
</style>

<style>
/* width */
::-webkit-scrollbar {
  width: 20px;

}
 
/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 4px black; 
background: rgba(0, 0, 0, 0.6);
  border-radius:7px;
}
 
/* Handle */
::-webkit-scrollbar-thumb {
  background: #25292A ; 
  border-radius: 6px;
}
 
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #1a1d1d; 
}
</style>

<style>
img.logo {
 
 content:url("https://gifcity.carrd.co/assets/images/gallery10/b4f58ba7.gif?v=d55ea43d");
width: 40px !important;
height: 40px !important;
    }
</style>

<style>* {cursor: url("http://www.rw-designer.com/cursor-view/124054.png"), url("http://www.rw-designer.com/cursor-view/124054.png"), auto !important;}</style>

<style>
    .profile{
        
    direction: rtl;
    
    }
    .blurbs{
    
    direction: ltr;
        
    }
    .blog-preview{
        
    direction: ltr;
        
    }
    .friends{
    
    direction: ltr;
        
    }
    .general-info{
        
    direction: ltr;
        
    }
    .contact{
        
    direction: ltr;
    
    }
    .url-info{
        
    direction: ltr;
        
    }
    .details-table{
        
    direction: ltr;
        
    }
    .profile .table-section .heading{
    
    direction: ltr;
        
    }
    .details p{

    direction: ltr;

   }
   .mood{

       direction: ltr;

   }
</style>

<style>
@import url('https://fonts.googleapis.com/css2?family=Short+Stack&display=swap');
p{
  font-family: 'Short Stack', cursive;
  font-size: 130%;
}
h1,h2,h3,h4,h5{
  font-family: 'Short Stack', cursive;
  font-size: 130%;  
</style>

<style>
.friends-grid .person img{
filter: grayscale(100%) 
mix-blend-mode: overlay;
}
</style>

<style>
body:before {
content: " ";
height: 100vh;
width: 100vw;
display: block;
position: fixed; 
top: 0; 
left: 0; 
z-index: 100;
background-image: url('https://i.postimg.cc/CMc40rvJ/rowananjajbe-ezgif-com-video-to-gif-converter.gif');
background-size: cover;
background-repeat: repeat;
background-position:center;
animation: yourAnimation 3s ease 0s 1 normal forwards;
pointer-events: none;}
@keyframes yourAnimation { 0.0%{ opacity: 1;} 75%{ opacity: 1; } 100%{ opacity: 0;} } 
</style>

<style>

.friends-grid .person {
filter: grayscale(100%);
</style>

<style>.inner .comments-table img{
filter: grayscale(100%);
</style>

<style>
details .mb8 {color: white;}
 
details {text-align: center}
 
@import url('https://fonts.googleapis.com/css2?family=Short+Stack&display=swap');
details .mb8{
  font-family: 'Short Stack', cursive;
  font-size: 200%;}
</style>
from fastapi import FastAPI, Request
from slowapi.util import get_remote_address
import uvicorn


app = FastAPI()

@app.get('/')
def home(req : Request):
    return {'ip': get_remote_address(request=req)}
MOV [1100H],115H
MOV [1102H],1004H
MOV AX,[1100H]
MOV BX,[1102H]
MUL BX
MOV [1200],AX
HLT
#include <stdio.h>

struct Process {
    int pid;
    int burst;
    int turn;
    int waiting;
    int completion;
};

void calculate(struct Process pro[], int n) {
    // Sort processes based on burst time
    for (int i = 0; i < n - 1; i++) {
        for (int j = 0; j < n - i - 1; j++) {
            if (pro[j].burst > pro[j + 1].burst) {
                struct Process temp = pro[j];
                pro[j] = pro[j + 1];
                pro[j + 1] = temp;
            }
        }
    }

    // Calculate waiting time, turnaround time, and completion time
    pro[0].waiting = 0;
    pro[0].completion = pro[0].burst;
    for (int i = 1; i < n; i++) {
        pro[i].waiting = pro[i - 1].completion;
        pro[i].completion = pro[i].waiting + pro[i].burst;
        pro[i].turn = pro[i].completion; // Turnaround time is the completion time itself
    }

    // Print process details
    printf("Process\tBurst\tTurnaround\tWaiting\tCompletion\n");
    int totwt = 0, tottat = 0;
    for (int i = 0; i < n; i++) {
        pro[i].turn -= 0; // Calculate turnaround time as completion time - burst time
        printf("%d\t%d\t%d\t\t%d\t%d\n", pro[i].pid, pro[i].burst, pro[i].turn, pro[i].waiting, pro[i].completion);
        tottat += pro[i].turn;
        totwt += pro[i].waiting;
    }

    // Calculate average turnaround time and average waiting time
    float avgtat = (float)tottat / n;
    float avgwt = (float)totwt / n;

    printf("Average Turnaround: %.2f\nAverage Waiting: %.2f\n", avgtat, avgwt);
}

int main() {
    int n;
    printf("Enter the number of processes: ");
    scanf("%d", &n);
    struct Process pro[n];
    for (int i = 0; i < n; i++) {
        pro[i].pid = i + 1;
        printf("Enter burst time for process %d: ", pro[i].pid);
        scanf("%d", &pro[i].burst);
    }
    calculate(pro, n);
    return 0;
}
#include <stdio.h>
struct Process{
    int pid;
    int burst;
    int turn;
    int waiting;
};
void calculate(struct Process pro[],int n)
{
    pro[0].waiting=0;
    pro[0].turn=pro[0].burst;
    for(int i=1;i<n;i++)
    {
        pro[i].waiting=pro[i-1].waiting+pro[i-1].burst;
        pro[i].turn=pro[i].waiting+pro[i].burst;
    }
    printf("process \t\t burst time\t\tturnaround\t\twaiting\n");
    int totwt=0;
    int tottat=0;
    for(int i=0;i<n;i++)
    {
        printf("%d\t\t%d\t\t%d\t\t%d\n",pro[i].pid,pro[i].burst,pro[i].turn,pro[i].waiting);
        tottat+=pro[i].turn;
        totwt+=pro[i].waiting;
    }
    float avgtat=(float)tottat/n;
    float avgwt=(float)totwt/n;
    
    printf("Average turnaround :%.2f \nAvrage waiting : %.2f",avgtat,avgwt);
}
int main()
{
   int n;
   printf("enter the bt");
   scanf("%d",&n);
   struct Process pro[n];
   for(int i=0;i<n;i++)
   {
       pro[i].pid=i+1;
       scanf("%d",&pro[i].burst);
   }
   calculate(pro,n);
}
choco install chocolatey-core.extension --version 1.4.0 -y
choco install jre8 --version 8.0.411 -y
choco install python --version 3.12.3 -y
choco install vlc --version 3.0.20 -y
choco install sysinternals --version 2024.2.13 -y
choco install wget --version 1.21.4 -y
choco install dotnet3.5 --version 3.5.20160716 -y
choco install powershell-core --version 7.4.2 -y
choco install curl --version 8.7.1 -y
choco install vlc.install --version 3.0.20 -y
choco install dropbox --version 198.4.7615 -y
choco install keepass --version 2.56.0 -y
choco install chocolateygui --version 2.1.1 -y
choco install powertoys --version 0.80.1 -y
choco install keepass.install --version 2.56.0 -y
choco install everything --version 1.4.11024 -y
choco install greenshot --version 1.2.10.6 -y
choco install virtualbox --version 7.0.18 -y
choco install postman --version 10.24.16 -y
choco install wsl2 --version 2.0.0.20210721 -y
choco install imagemagick.app --version 7.1.1.3200 -y
choco install qbittorrent --version 4.6.4 -y
choco install youtube-dl --version 2021.12.17 -y
choco install pandoc --version 3.1.13 -y
choco install totalcommander --version 11.3.0 -y
choco install directx --version 9.29.1974.20210222 -y
choco install vcredist-all --version 1.0.1 -y
choco install jackett --version 0.21.2574 -y
choco install aria2 --version 1.37.0 -y
choco install adb --version 34.0.5 -y
choco install nirlauncher --version 1.30.5 -y
choco install trid --version 2.24.20240501 -y
choco install duckietv --version 1.1.5 -y
choco install potplayer --version 23.08.30 -y
choco install scrcpy --version 2.4.0 -y
choco install yt-dlp --version 2024.4.9 -y
choco install markdownmonster --version 3.2.16 -y
choco install apktool --version 2.9.3 -y
choco install obsidian --version 1.5.12 -y
choco install choco-package-list-backup --version 2023.6.28 -y
choco install ffmpeg-shared --version 7.0.0.20240417 -y
choco install notion --version 2.2.0 -y
choco install ventoy --version 1.0.97.20240415 -y
choco install base64 --version 1.0.0 -y
choco install tesseract --version 5.3.3.20231005 -y
choco install grepwin --version 2.0.15 -y
choco install ketarin --version 1.8.11 -y
choco install psget --version 1.0.4.407 -y
choco install nircmd --version 2.86 -y
choco install picard --version 2.11.0 -y
choco install sublimetext4 --version 4.0.0.416900 -y
choco install rainmeter --version 4.3.0.3321 -y
choco install msxml6.sp1 --version 6.10.1129.0 -y
choco install fastcopy --version 5.7.5 -y
choco install winaero-tweaker --version 1.62.1 -y
choco install internet-download-manager --version 6.42.10 -y
choco install winaero-tweaker.install --version 1.62.1 -y
choco install fileseek --version 6.7.0 -y
choco install cudatext --version 1.178.0.0 -y
choco install xmlstarlet --version 1.6.1 -y
choco install fastcopy.install --version 4.2.1 -y
choco install qbittorrent-enhanced --version 4.4.5.10 -y
choco install kate --version 23.8.0 -y
choco install tinymediamanager --version 5.0.5 -y
choco install youtube-dl-gui --version 0.4 -y
choco install chocolateyexplorer --version 0.2.2.111 -y
choco install choco-protocol-support --version 0.2 -y
choco install youtube-dl-gui.install --version 0.4 -y
choco install directoryopus --version 13.6.0 -y
choco install genymotion --version 3.6.0 -y
choco install choco-shortcuts-winconfig --version 0.0.4 -y
choco install everythingtoolbar --version 1.3.3 -y
choco install xml-notepad --version 2.8.0.7 -y
Install with cmd.exe
Run the following command:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
 Save
Copy
Install with PowerShell.exe
With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.

Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
Now run the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
 Save
let i = 5;
let num = 4;

do{
  console.log(i)
}

while( i < num)
let i = 5;

let num = 4

while( i < 4)
{
  console.log(i)
}
import mysql.connector
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize

mydb = mysql.connector.connect(
    host="localhost",
    user="root",
    password="Eimaipolykala1",
    database="twitter_db"
)
# Create a cursor object
cursor = mydb.cursor()

# Execute SQL query to retrieve text data
cursor.execute("SELECT JSON_VALUE(data, '$.extended_tweet.full_text')  FROM data_db WHERE JSON_VALUE(data, '$.lang')='en' AND   JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[0].id') = '56377143' OR JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[0].name')  = 'KLM' OR JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[0].name') = 'klm' OR JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[1].name')  = 'klm' OR JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[1].name') = 'KLM' OR JSON_VALUE(data, '$.extended_tweet.entities.user_mentions[1].id') = '56377143'")



# Fetch data
data = cursor.fetchall()

# Close the connection
mydb.close()

# Process text data
text = ' '.join([row[0] for row in data])  # Combine text from all rows
stop_words = set(stopwords.words('english'))  # Load English stopwords
word_tokens = word_tokenize(text.lower())  # Tokenize and convert to lowercase
filtered_words = [word for word in word_tokens if word.isalnum() and word not in stop_words]  # Filter out stopwords and non-alphanumeric tokens
processed_text = ' '.join(filtered_words)

# Generate word cloud
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(processed_text)

# Display word cloud
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.show()
import nltk
import mysql.connector
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize

# Download NLTK data
nltk.download('punkt')

# Set NLTK data path if necessary
# nltk.data.path.append("path_to_nltk_data")

mydb = mysql.connector.connect(
    host="localhost",
    user="root",
    password="Eimaipolykala1",
    database="twitter_db"
)

# Create a cursor object
cursor = mydb.cursor()

# Execute SQL query to retrieve text data
cursor.execute("SELECT JSON_VALUE(data, '$.extended_tweet.full_text')  FROM data_db WHERE JSON_VALUE(data, '$.lang')='en'")

# Fetch data
data = cursor.fetchall()

# Close the connection
mydb.close()

# Process text data
text = ' '.join([row[0] for row in data if row[0]])  # Combine text from all rows, handling None values
stop_words = set(stopwords.words('english'))  # Load English stopwords
word_tokens = word_tokenize(text.lower())  # Tokenize and convert to lowercase
filtered_words = [word for word in word_tokens if word.isalnum() and word not in stop_words]  # Filter out stopwords and non-alphanumeric tokens
processed_text = ' '.join(filtered_words)

# Generate word cloud
wordcloud = WordCloud(width=800, height=400, background_color='white').generate(processed_text)

# Display word cloud
plt.figure(figsize=(10, 5))
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis('off')
plt.show()
import mysql.connector
import pandas as pd
import matplotlib.pyplot as plt
mydb = mysql.connector.connect(
    host="localhost",
    user="root",
    password="Eimaipolykala1",
    database="twitter_db"
)

cursor = mydb.cursor()

# Execute SQL query to retrieve data
cursor.execute("SELECT JSON_VALUE(data, '$.lang') AS lang, COUNT(*) AS count FROM data_db GROUP BY JSON_VALUE(data, '$.lang')")

# Fetch data
data = cursor.fetchall()

# Close the connection
mydb.close()
languages = [row[0] for row in data]
counts = [row[1] for row in data]
df = pd.DataFrame(data, columns=['language', 'count'])
df = df.dropna()
plt.figure(figsize=(10, 6))
plt.bar(df['language'], df['count'])
plt.xlabel('Languages')
plt.ylabel('Number of Tweets')
plt.title('Number of Tweets by Language')
plt.xticks(rotation=45)
plt.tight_layout()
plt.show()
#include <iostream>

using namespace std;

class Base{
   
    public:
    virtual void output(){
        cout<<"Virtual Function"<<endl;
    }
    void display(){
        cout<<"Display Base Function"<<endl;
    }
};

class derived:public Base{
    
    public:
    void output(){
        cout<<"Function in the derived "<<endl;
    }
    void display(){
        cout<<"Display Derived Function"<<endl;
    }
};


int main() {
    
    Base *ptr;
    derived d;
    ptr = &d;
  //Run time binding, it will call output function in the drived class
    ptr->output();
  
  //Compile time binding, it will call display function in the base class.
    ptr->display();

    return 0;
}
//OUTPUT:
Function in the derived 
Display Base Function
title "aaa"
.model small
.stack 100h
.data
   num1 db '9'
   num2 db '5'
   result db 0  ; Initialize result variable
.code
   mov ax, @data
   mov ds, ax

   ; Convert ASCII characters to numerical values
   sub num1, '0'  ; Convert character '9' to numerical value 9
   sub num2, '0'  ; Convert character '5' to numerical value 5

   ; Add numerical values
   mov al, num1  ; Move num1 into AL
   add al, num2  ; Add num2 to AL

   ; Store the result
   mov result, al  ; Store the result in result variable

   mov ah, 4ch    ; Exit program
   int 21h
end
*********************
  title "aaa"
.model small
.stack 100h
.data
   num1 db '9'
   num2 db '5'
   result db ?
.code
   mov ax, @data
   mov ds, ax

   ; Convert ASCII characters to binary
   mov al, num1
   sub al, '0'   ; Convert ASCII character to binary
   mov bl, num2
   sub bl, '0'   ; Convert ASCII character to binary

   ; Perform addition
   add al, bl

   ; Adjust the result using aaa
   aaa

   ; Convert result back to ASCII character
   add al, '0'   ; Convert binary to ASCII character

   ; Store the result
   mov result, al

   ; Display result (if needed)
   mov ah, 02h   ; DOS function to display character
   mov dl, al    ; Move the result to DL register
   int 21h       ; Call DOS interrupt

   ; Terminate program
   mov ah, 4Ch   ; DOS function to exit program
   int 21h       ; Call DOS interrupt
end
ASSUME CS:CODE,DS:DATA
CODE SEGMENT
    MOV [1100H],1115h
    MOV [1102H],1004H
    MOV AX,[1100H]
    MOV BX,[1102H]
    SUB AX,BX
    MOV [1200H],AX
    HLT
recipient = Map();
recipient.put("type", "email");
recipient.put("value", "roy@gmail.com");
/////////////////////////
signer = Map();
signer.put("recipient_name", "Rehmat");
signer.put("action_type", "sign");
signer.put("recipient", recipient);
//////////////////
signers = List();
signers.add(signer);
///////////////////
mail_merge_template = Map();
mail_merge_template.put("name", "Copy Shareholder Agreement");
//////////////////
sign_mail_merge = Map();
sign_mail_merge.put("file_name", "Agreement");
sign_mail_merge.put("sign_in_order", false);
sign_mail_merge.put("mail_merge_template", mail_merge_template);
sign_mail_merge.put("signers", signers);
///////////
param = Map();
param.put("sign_mail_merge", sign_mail_merge.toList());
///////////
info param;

send_doc = invokeurl
[
	url: "https://www.zohoapis.com/crm/v6/Deals/"+DealID+"/actions/sign_mail_merge"
	type: POST
	parameters: param.toString()
	connection: "zoho_crm"
];

info send_doc;
ASSUME CS:CODE,DS:DATA
CODE SEGMENT
    MOV [1100H],1115h
    MOV [1102H],1004H
    MOV AX,[1100H]
    MOV BX,[1102H]
    SUB AX,BX
    MOV [1200H],AX
    HLT
import React from "react";
import {Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, Button, useDisclosure, Checkbox, Input, Link} from "@nextui-org/react";
import {MailIcon} from './MailIcon.jsx';
import {LockIcon} from './LockIcon.jsx';

export default function App() {
  const {isOpen, onOpen, onOpenChange} = useDisclosure();

  return (
    <>
      <Button onPress={onOpen} color="primary">Open Modal</Button>
      <Modal 
        isOpen={isOpen} 
        onOpenChange={onOpenChange}
        placement="top-center"
      >
        <ModalContent>
          {(onClose) => (
            <>
              <ModalHeader className="flex flex-col gap-1">Log in</ModalHeader>
              <ModalBody>
                <Input
                  autoFocus
                  endContent={
                    <MailIcon className="text-2xl text-default-400 pointer-events-none flex-shrink-0" />
                  }
                  label="Email"
                  placeholder="Enter your email"
                  variant="bordered"
                />
                <Input
                  endContent={
                    <LockIcon className="text-2xl text-default-400 pointer-events-none flex-shrink-0" />
                  }
                  label="Password"
                  placeholder="Enter your password"
                  type="password"
                  variant="bordered"
                />
                <div className="flex py-2 px-1 justify-between">
                  <Checkbox
                    classNames={{
                      label: "text-small",
                    }}
                  >
                    Remember me
                  </Checkbox>
                  <Link color="primary" href="#" size="sm">
                    Forgot password?
                  </Link>
                </div>
              </ModalBody>
              <ModalFooter>
                <Button color="danger" variant="flat" onPress={onClose}>
                  Close
                </Button>
                <Button color="primary" onPress={onClose}>
                  Sign in
                </Button>
              </ModalFooter>
            </>
          )}
        </ModalContent>
      </Modal>
    </>
  );
}
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
  (async () => {
    // async code goes here
    // ...
    const result = await getSomething();
    sendResponse(result);
  })();

  // Important! Return true to indicate you want to send a response asynchronously
  return true;
});

star

Mon May 13 2024 03:54:43 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:54:22 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:54:14 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:54:09 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:54:02 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:53:55 GMT+0000 (Coordinated Universal Time) https://www.blackbox.ai/share/6eeb27fe-592c-4f6e-ae46-767ca4334f80

@mohmdemoon

star

Mon May 13 2024 03:22:58 GMT+0000 (Coordinated Universal Time) https://www.cherryservers.com/blog/install-kubernetes-on-ubuntu

@ahmadou #bash

star

Sun May 12 2024 18:39:30 GMT+0000 (Coordinated Universal Time) https://waydro.id/

@mdevil1619

star

Sun May 12 2024 16:11:16 GMT+0000 (Coordinated Universal Time) https://help.miro.com/hc/en-us/articles/360017731313-Miro-Web-Clipper-Chrome-extension

@curtisbarry

star

Sun May 12 2024 15:44:48 GMT+0000 (Coordinated Universal Time)

@Prathamesh4417

star

Sun May 12 2024 14:34:19 GMT+0000 (Coordinated Universal Time)

@Prathamesh4417

star

Sun May 12 2024 12:05:20 GMT+0000 (Coordinated Universal Time)

@Samarmhamed78

star

Sun May 12 2024 10:28:43 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/16073603/how-can-i-update-each-dependency-in-package-json-to-the-latest-version

@al.thedigital #bash #npm #updates #check

star

Sun May 12 2024 08:06:12 GMT+0000 (Coordinated Universal Time)

@Samarmhamed78

star

Sun May 12 2024 08:01:31 GMT+0000 (Coordinated Universal Time)

@Samarmhamed78

star

Sun May 12 2024 06:20:28 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sun May 12 2024 06:06:03 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

@Mariukas45

star

Sun May 12 2024 05:59:53 GMT+0000 (Coordinated Universal Time) https://xhamster.com/videos/amateur-13666463

@Mariukas45

star

Sun May 12 2024 04:44:06 GMT+0000 (Coordinated Universal Time) https://github.com/gabriellesote

@gabriellesoares

star

Sun May 12 2024 00:43:27 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly

@al.thedigital #php #phpdom #utf8encode #spaceencodeissue

star

Sat May 11 2024 19:12:17 GMT+0000 (Coordinated Universal Time) https://www.tutorialsteacher.com/csharp/csharp-action-delegate

@destinyChuck #html #css #javascript

star

Sat May 11 2024 19:09:40 GMT+0000 (Coordinated Universal Time) https://www.tutorialsteacher.com/csharp/csharp-action-delegate

@destinyChuck

star

Sat May 11 2024 15:24:29 GMT+0000 (Coordinated Universal Time) undefined

@opchhiop

star

Sat May 11 2024 15:24:29 GMT+0000 (Coordinated Universal Time) undefined

@opchhiop

star

Sat May 11 2024 15:24:29 GMT+0000 (Coordinated Universal Time) undefined

@opchhiop

star

Sat May 11 2024 15:20:58 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v

@Mariukas45

star

Sat May 11 2024 12:48:49 GMT+0000 (Coordinated Universal Time) https://www.alphacodez.com/paxful-clone-script

@jacksonjackk #html #angular #mysql #php

star

Sat May 11 2024 11:06:57 GMT+0000 (Coordinated Universal Time)

@JasonB

star

Sat May 11 2024 08:45:40 GMT+0000 (Coordinated Universal Time)

@sunnywhateverr

star

Sat May 11 2024 07:23:11 GMT+0000 (Coordinated Universal Time)

@freepythoncode ##python #coding #python #api #programming

star

Sat May 11 2024 05:10:00 GMT+0000 (Coordinated Universal Time)

@signup

star

Sat May 11 2024 05:06:11 GMT+0000 (Coordinated Universal Time)

@dsce

star

Sat May 11 2024 04:28:13 GMT+0000 (Coordinated Universal Time)

@dsce

star

Sat May 11 2024 02:08:31 GMT+0000 (Coordinated Universal Time) https://community.chocolatey.org/packages

@baamn

star

Sat May 11 2024 00:42:42 GMT+0000 (Coordinated Universal Time) https://docs.chocolatey.org/en-us/choco/setup

@baamn

star

Fri May 10 2024 23:41:28 GMT+0000 (Coordinated Universal Time)

@Sephjoe

star

Fri May 10 2024 23:24:12 GMT+0000 (Coordinated Universal Time)

@Sephjoe

star

Fri May 10 2024 22:52:25 GMT+0000 (Coordinated Universal Time)

@Sephjoe

star

Fri May 10 2024 22:16:47 GMT+0000 (Coordinated Universal Time)

@madgakantara

star

Fri May 10 2024 21:57:26 GMT+0000 (Coordinated Universal Time)

@madgakantara

star

Fri May 10 2024 21:10:18 GMT+0000 (Coordinated Universal Time)

@madgakantara

star

Fri May 10 2024 19:58:21 GMT+0000 (Coordinated Universal Time)

@Mohamedshariif #c++

star

Fri May 10 2024 17:06:55 GMT+0000 (Coordinated Universal Time)

@exam123

star

Fri May 10 2024 16:55:39 GMT+0000 (Coordinated Universal Time)

@exam123

star

Fri May 10 2024 16:31:22 GMT+0000 (Coordinated Universal Time)

@RehmatAli2024 #deluge

star

Fri May 10 2024 16:13:11 GMT+0000 (Coordinated Universal Time)

@signup

star

Fri May 10 2024 15:44:32 GMT+0000 (Coordinated Universal Time)

@lawlaw

star

Fri May 10 2024 14:11:51 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/44056271/chrome-runtime-onmessage-response-with-async-await

@surmamilan #javascript

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension