Category: private

  • Ukraine drone attack sparks fire at Sochi oil depot, Russian authorities say

    Ukraine drone attack sparks fire at Sochi oil depot, Russian authorities say

    At least seven civilians were reported injured in the city, which has been repeatedly shelled by Russian forces. Ukraine’s State Emergency Service said three of the wounded were being treated in hospital.

    Russian authorities said the drone attack on the Sochi refinery was one of several launched by Ukraine over the weekend, targeting installations in the southern Russian cities of Ryazan, Penza and Voronezh. The governor of Voronezh said four people were injured in one drone strike.

    Ukraine has not commented on the strikes. It has been targeting Russia’s energy infrastructure in retaliation to Russia’s sustained bombardment of Ukraine’s energy grid throughout the war.

    Russia’s defence ministry said its air defences intercepted 93 Ukrainian drones overnight, 60 of which were over the Black Sea region.

    Ukraine’s air force said Russia fired 83 drones or 76 drones and seven missiles overnight, 61 of which were shot down. It added that 16 drones and six missiles struck targets in eight locations.

    It comes after a particularly deadly week for civilians in Ukraine, including an attack on Kyiv on Thursday that killed at least 31 people.

    More than 300 drones and eight cruise missiles were launched in the assault, Ukrainian officials said, making the attack one of the deadliest on the capital since Russia launched its full-scale invasion in February 2022.

    Following the strikes, Ukrainian President Volodymyr Zelensky called for stronger international sanctions on Russia this week, while US President Donald Trump condemned Russia’s actions in Ukraine and suggested new sanctions against Moscow were coming.

    In July, Trump said Putin had 50 days to end the war, or Russia would face severe tariffs targeting its oil and other exports.

    On Monday, Trump set a new “10 or 12” day deadline. He later set a new deadline, which would expire on 8 August.

    0:25Watch: Explosion rocks Russian oil facility in Novokuybyshevsk, Russia, on Saturday

  • JavaScript

    JavaScript

    إليك Crash Course في JavaScript — مبسط وسريع، مناسب للمبتدئين والمطورين القادمين من Java أو لغات أخرى. سأشرح من خلال أمثلة وتعليقات:


    🚀 مقدمة: ما هي JavaScript؟

    • لغة برمجة ديناميكية تُستخدم غالبًا في تطوير الويب.
    • تعمل في المتصفح (Frontend) وأيضًا في السيرفر (Backend) باستخدام Node.js.
    • تدعم البرمجة الكائنية (OOP) والوظيفية (Functional).

    📦 الأساسيات

    🔸 المتغيرات

    let name = "John";     // يمكن التغيير<br>const age = 30;        // ثابت لا يمكن تغييره<br>var oldVar = "Legacy"; // قديم وغير موصى به<br>
    JavaScript

    🔸 الأنواع (Types)

    let str = "Hello";      // String
    let num = 42;           // Number
    let bool = true;        // Boolean
    let nothing = null;     // Null
    let notDefined;         // Undefined
    let obj = { a: 1 };     // Object
    let arr = [1, 2, 3];    // Array
    
    JavaScript

    🔸 الدوال

    // Function Declaration
    function greet(name) {
      return "Hello " + name;
    }
    
    // Arrow Function
    const add = (a, b) => a + b;
    
    console.log(add(2, 3)); // 5
    
    JavaScript

    🧰 التحكم بالتدفق

    🔸 if / else

    if (age > 18) {
      console.log("Adult");
    } else {
      console.log("Minor");
    }
    
    JavaScript

    🔸 switch

    switch (day) {
      case "Mon": console.log("Monday"); break;
      default: console.log("Other");
    }
    
    JavaScript

    🔁 الحلقات

    for (let i = 0; i < 3; i++) {
      console.log(i);
    }
    
    let arr = ["a", "b", "c"];
    arr.forEach(item => console.log(item)); // أفضل
    
    JavaScript

    🧱 الكائنات (Objects)

    let user = {
      name: "Alice",
      age: 25,
      greet() {
        console.log("Hi " + this.name);
      }
    };
    
    user.greet(); // Hi Alice
    
    JavaScript

    📦 المصفوفات (Arrays)

    let nums = [1, 2, 3];
    
    nums.push(4);             // [1,2,3,4]
    let doubled = nums.map(n => n * 2); // [2,4,6,8]
    let filtered = nums.filter(n => n > 2); // [3,4]
    
    JavaScript

    📚 الشروط القصيرة (Ternary Operator)

    let access = age >= 18 ? "Allowed" : "Denied";
    
    JavaScript

    🔄 Destructuring

    const person = { name: "Bob", age: 28 };
    const { name, age } = person;
    
    const [a, b] = [1, 2];
    
    JavaScript

    🌐 التعامل مع الـ DOM (Browser)

    document.getElementById("myBtn").addEventListener("click", () => {
      alert("Button clicked!");
    });
    
    JavaScript

    ⏳ Asynchronous JavaScript

    1. setTimeout

    setTimeout(() => {
      console.log("Runs after 1 second");
    }, 1000);
    
    JavaScript

    2. Promises

    const fetchData = () => {
      return new Promise((resolve, reject) => {
        setTimeout(() => resolve("Done"), 1000);
      });
    };
    
    fetchData().then(result => console.log(result));
    
    JavaScript

    3. async / await

    async function getData() {
      let data = await fetchData();
      console.log(data);
    }
    
    JavaScript

    🔐 Classes (OOP)

    class Animal {
      constructor(name) {
        this.name = name;
      }
    
      speak() {
        console.log(this.name + " makes a sound");
      }
    }
    
    let cat = new Animal("Cat");
    cat.speak(); // Cat makes a sound
    
    JavaScript

    ✅ ملخص سريع

    المفهومالمثال
    متغيرlet, const
    دالةfunction greet() {}
    كائن{name: "Ali"}
    مصفوفة[1,2,3].map(...)
    شرطif, ? :
    حلقةfor, forEach
    برمجة غير متزامنةasync, await, Promise
    فئة (Class)class Dog {}

    هل ترغب أن أرسل لك:

    • نسخة PDF لهذه الدورة؟
    • تمارين قصيرة للممارسة؟
    • مشروع عملي صغير لتطبيق هذه المفاهيم (مثل ToDo App)؟

    أخبرني كيف تحب أن نكمل.