Mohammed Coding
441 subscribers
116 photos
4 videos
5 files
69 links
Download Telegram
بايثون و"عقدة المسافات":

المبرمجين دايمًا متعصبين ويا بايثون لأنها تشدد على المسافات، يعني تخطي مسافة وحدة والبرنامج كله يتخربط. يگولون "بايثون تريدك تعوف كل مشاكلك وتستثمر بمقياس المسافات"! 😂
😁4💯1
🚨 "معركة Google و Oracle حول استخدام Java API - ما رأيكم؟" 🚨

📅 القصة بدأت منذ سنوات، لما Oracle رفعت دعوى ضد Google بسبب استخدامها أجزاء من واجهة برمجة Java في نظام Android بدون إذن. القضية كانت تخص مليارات الدولارات وتعتبر من أكبر القضايا في مجال البرمجيات!

⚖️ الحكم النهائي: في 2021، قررت المحكمة العليا لصالح Google، وقالت إن استخدامهم لأجزاء من Java API كان "استخدامًا عادلًا" بهدف الابتكار والتطوير.

📝 أسئلة للنقاش:

هل واجهات برمجة التطبيقات (APIs) لازم تكون محمية كحقوق ملكية فكرية؟ 🤔
أو تعتبر جزء من المعرفة المفتوحة اللي ممكن أي مبرمج يستخدمها بحرية؟ 🌐
شاركنا رأيك في التعليقات!

🔹 هل القرار صائب ويدعم الابتكار؟ 💡 🔹 أو تشوفون إن حقوق الشركات مثل Oracle لازم تكون محمية بشكل أكبر؟ 🛡

👥 نريد نسمع آراء المبرمجين ورواد التقنية - شاركنا أفكارك!
في واحدة من أغرب القضايا، اتهمت Oracle شركة SAP بالتجسس عليها وسرقة بياناتها. SAP وافقت على دفع تسوية بمئات الملايين من الدولارات، بعد أن اعترفت بتحميل وثائق سرية من مواقع Oracle. هذه القضية تبرز الصعوبات في حماية الأسرار التجارية بين الشركات المنافسة.
في عام 2017، رفعت شركة وايمو (Waymo)، التابعة لجوجل، دعوى قضائية ضد أوبر، متهمةً إياها بسرقة أسرار تجارية تتعلق بتكنولوجيا القيادة الذاتية. تضمنت الدعوى اتهام موظف سابق في جوجل، أنتوني ليفاندوفسكي، بنقل معلومات سرية إلى أوبر بعد انضمامه إليها. في عام 2018، تم التوصل إلى تسوية بين الشركتين، حيث منحت أوبر حصة صغيرة من أسهمها لوايمو كتعويض
الأخوان Winklevoss ادعيا أن مارك زوكربيرج سرق فكرة إنشاء شبكة تواصل اجتماعي عند تأسيس فيسبوك، بعد أن كان يعمل على مشروع مشابه لهم يُسمى ConnectU. القضية انتهت بتسوية خارج المحكمة، حيث حصل الأخوان على تعويض كبير بالدولار وأسهم في الشركة.
📶 في عام 2019، توصلت Apple و Qualcomm إلى تسوية بعد معركة طويلة حول براءات اختراع تتعلق بتقنيات الاتصال اللاسلكي المستخدمة في هواتف iPhone. في هذه التسوية، وافقت Apple على دفع تعويض مالي لـ Qualcomm، وتم تجديد اتفاقية الترخيص بين الشركتين.
for (int i = 0; i < 100; i += 10) {
for (int j = i; j < i + 10; ++j) {
for (int k = j + 1; k < i + 10; ++k) {
bool shouldSwap = ((i / 10) % 2 == 0 && arr[j] > arr[k]) || ((i / 10) % 2 != 0 && arr[j] < arr[k]);
if (shouldSwap) {
int temp = arr[j];
arr[j] = arr[k];
arr[k] = temp;
}
}
}
}
1
السلام عليكم ....راح انزل الكم بعض اساسيات c++ الي يحب يشارك القناة مع طلبة المرحلة الاولى او المراحل الاخرى لتعم الفائدة
3👍3🙊1
Q1/Write a C++ program that defines two classes, Circle and Square, along with a friend function that compares the areas of objects from each class. The Circle class should have a private double member variable radius, initialized through a constructor. Similarly, the Square class should have a private double member variable side, also initialized through a constructor. Define a friend function called hasLargerArea that takes one Circle object and one Square object as parameters. This function should calculate the area of the Circle as π * radius^2 and the area of the Square as side * side, then compare the two areas and print which shape has a larger area or if they are equal. Make sure to declare hasLargerArea as a friend function in both classes so it can access their private members, and use 3.14159 as an approximation for π in the area calculation.
👍1🔥1👾1
Q2/
Write a C++ program with two classes, Account and Transaction, and a friend function that checks if a transaction amount can be completed with the current balance. The Account class should have a private member variable balance of type double to store the account’s balance. It should also include a constructor to initialize the balance and a method displayBalance to print the current balance. The Transaction class should have a private member variable amount of type double, representing the transaction amount, and a constructor to initialize this amount. Create a friend function named canCompleteTransaction that takes both an Account object and a Transaction object as parameters. This function should check if the Transaction amount is less than or equal to the Account balance. If the transaction can be completed, it should print "Transaction Approved," and if not, it should print "Insufficient Funds."
Q3/
Write a C++ program with three classes: Rectangle, Circle, and Triangle. Create a friend function that calculates the combined perimeter of the three shapes. The Rectangle class should contain two private member variables, length and width, both of type float, representing the dimensions of the rectangle. The Circle class should contain a private member variable radius of type float for the circle's radius. The Triangle class should contain three private member variables, side1, side2, and side3, of type float, representing the lengths of the triangle's sides. Each class should have a constructor to initialize these values. Create a friend function named calculateTotalPerimeter that takes one Rectangle, one Circle, and one Triangle object as parameters. This function should calculate the perimeter of the rectangle as 2 * (length + width), the circumference of the circle as 2 * π * radius (using 3.14159f as an approximation for π), and the perimeter of the triangle as side1 + side2 + side3. The function should return the sum of these three perimeters as the total perimeter.
تحبون انزل الحل مالتهن لو تجربون تحلوهن؟
Q4/
Write a C++ program with three classes: BankAccount, CreditCard, and Loan, and a friend function to calculate the total debt of an individual. The BankAccount class should have a private float member balance, initialized via constructor, representing the account balance. The CreditCard class should have two private float members, creditLimit and currentDebt, initialized via constructor to represent the card’s credit limit and current outstanding debt. The Loan class should contain two private float members, principal and remainingDebt, also initialized via constructor, representing the loan’s principal amount and remaining debt. Define a friend function called calculateTotalDebt that takes objects of each class as parameters, computes the total debt by adding the CreditCard's currentDebt and Loan's remainingDebt, then subtracts the BankAccount balance to offset the debt. The function should return the net debt, which could be positive (net debt) or negative (net surplus). Each class should include a display method for its information, and the main program should demonstrate creating instances of each class, displaying their details, and printing the total debt calculated by calculateTotalDebt.
😱1
Q5/
Write a C++ program with three classes: Employee, Salary, and Leave, and a friend function to assess an employee’s financial and leave status. The Employee class should have private members name (a string), basicSalary (a float), and daysWorked (an int), initialized via constructor, with a displayInfo method to print these details. The Salary class should have private members bonus and deductions (both float), initialized via constructor, representing the employee's monthly bonus and deductions, with a displaySalaryInfo method. The Leave class should have private int members totalLeaveDays and usedLeaveDays, representing total annual leave and days used, with a displayLeaveInfo method. Define a friend function calculateFinancialStatus that takes one object from each class to calculate: (1) remaining leave days as totalLeaveDays - usedLeaveDays, (2) monthly earnings as (basicSalary / 30) * daysWorked + bonus, and (3) net pay after deductions by subtracting deductions from monthly earnings. Each class should display its data, and calculateFinancialStatus should output the remaining leave days, total monthly earnings, and net pay.
❤‍🔥1😐1
هذه 5 اسئلة تخص Friend Function
2
مواصفات جيدة و تفيد طالب العلوم
شنو توقعكم لنتيجة العراق و الاردن؟
👎1