diff --git a/content/classic/text/ar/hopfield_networks.yaml b/content/classic/text/ar/hopfield_networks.yaml
index 76ba0032..58c41ab6 100644
--- a/content/classic/text/ar/hopfield_networks.yaml
+++ b/content/classic/text/ar/hopfield_networks.yaml
@@ -11,7 +11,7 @@
"Clear Memory": "امسح الذاكرة"
"Number of patterns memorized: 0": "عدد الأنماط المحفوظة: 0"
"Number of patterns memorized: {0}": "عدد الأنماط المحفوظة: {0}"
-"Memory capacity (theoretical): 0.14 N2 = approx. 170 patterns": "سعة الذاكرة (نظريًا): 0.14 N2 = نحو 170 نمطًا"
+"Memory capacity (theoretical): 0.14 N = approx. 6 patterns": "سعة الذاكرة (نظريًا): 0.14 N = نحو 6 أنماط"
"Memorize": "احفظ"
"Recall": "استرجع"
"Description": "الوصف"
diff --git a/content/classic/text/ar/quantum_logic.yaml b/content/classic/text/ar/quantum_logic.yaml
index 7df52962..5425e681 100644
--- a/content/classic/text/ar/quantum_logic.yaml
+++ b/content/classic/text/ar/quantum_logic.yaml
@@ -24,7 +24,7 @@
"Both amplitudes should be between -1 and 1": "يجب أن تكون السعتان بين -1 و1"
"Description": "الوصف"
"Every qubit": "كل كيوبت"
-"resides on a point on a Block sphere. It can be represented by two numbers": "يقع عند نقطة على كرة بلوخ، ويمكن التعبير عنه برقمين"
+"resides on a point on a Bloch sphere. It can be represented by two numbers": "يقع عند نقطة على كرة بلوخ، ويمكن التعبير عنه برقمين"
"such that:": "بحيث إن:"
"Here,": "هنا،"
"and": "و"
diff --git a/content/classic/text/ar/sorting_algos.yaml b/content/classic/text/ar/sorting_algos.yaml
index f56ff763..fafcf80d 100644
--- a/content/classic/text/ar/sorting_algos.yaml
+++ b/content/classic/text/ar/sorting_algos.yaml
@@ -23,9 +23,9 @@
"Bubble sort: A simple sorting algorithm that just goes through the list comparing adjacent elements and swapping them if they are not in order. It's performance and utiity are very poor, and is primarily taught for educational purposes. It has an average time complexity of O(n2). However, if the machine performing the sort has a sizeable probability of not comparing elements properly, then bubble sort is the most fault tolerant algorithm in this list (since it makes frequent comparisons, and can detect mistakes made previously).": "فرز الفقاعة: خوارزمية بسيطة تمر على القائمة وتقارن كل عنصرين متجاورين، وتبدّل مكانهما إن لم يكونا بالترتيب الصحيح. أداؤها ضعيف جدًا، وتُدرَّس غالبًا لأغراض تعليمية فقط. متوسط تعقيدها الزمني O(n2). لكن إن كان الجهاز الذي يجري الفرز يخطئ أحيانًا في المقارنة، فهذه الخوارزمية هي الأكثر تحمّلًا للأخطاء بين كل ما في هذه القائمة، لأنها تكرر المقارنة كثيرًا فتكتشف الأخطاء السابقة."
"Selection sort: Another simple sorting algorithm. It scans all N elements, finds the largest one, and puts it at the Nth position. Then, it scans all N-1 elements, finds the largest one, puts it at the (N-1)th position, and so on. It is as worse as bubble sort, with an average time complexity of O(n2). It doesn't use the advantages from an approimately sorted list. However, it is noted for it's simplicity.": "فرز الاختيار: خوارزمية بسيطة أخرى. تمر على العناصر الـ N كلها وتجد أكبرها وتضعه في الموضع N، ثم تمر على العناصر الـ N-1 الباقية وتجد أكبرها وتضعه في الموضع N-1، وهكذا. أداؤها سيئ كفرز الفقاعة، بمتوسط تعقيد زمني O(n2)، ولا يستفيد من كون القائمة شبه مرتبة أصلًا. رغم ذلك تشتهر ببساطتها."
"Insertion sort: An algorithm that most humans likely use unconsciously to sort things. It considers the first k elements to be sorted, and figures out where the (k+1)th element should be placed within the sorted portion. Although it's time complexity is still O(n2), insertion sort has significant advantages over the last two. It is extremely good to sorting lists that are already approximately sorted, nearing a time complexity of O(n) in this case. Even if a list is already sorted, it can readily accept another element and put it in it's correct place.": "فرز الإدراج: خوارزمية يستخدمها معظم الناس دون أن يشعروا حين يرتبون الأشياء. تفترض أن أول k عنصر مرتبة، وتبحث عن الموضع الصحيح للعنصر رقم k+1 داخل هذا الجزء المرتب. تعقيدها الزمني ما زال O(n2)، لكنها أفضل من الخوارزميتين السابقتين بوضوح، فهي ممتازة مع القوائم شبه المرتبة أصلًا، إذ يقترب تعقيدها من O(n) في هذه الحالة. وحتى لو كانت القائمة مرتبة تمامًا، تستطيع إضافة عنصر جديد ووضعه في مكانه الصحيح بسهولة."
-"Cocktail Shaker sort: A variation of selection sort that scans for the maximum element while going forward, and the minimum element while going backwards. It is useful for electromechanical machines that use a physical data reader to scan and sort through values sorted in a tape.": "فرز الكوكتيل: نسخة من فرز الاختيار تبحث عن أكبر عنصر وهي ذاهبة إلى الأمام، وعن أصغر عنصر وهي عائدة إلى الخلف. تفيد في الآلات الكهروميكانيكية التي تقرأ القيم فعليًا من شريط وتفرزها."
-"Heap sort: A slightly complex sorting algorithm that uses a data structure called heaps. First algorithm on this list to have a time complexity of O(n log n), although it comes with a space complexity of O(n), and the only algorithm on this list to require explicit space. It is extremely good at keeping frequently updated lists sorted dynamically, an advantage conferred by the data structure that it is built on. For information on the heap data structure, please refer GeeksForGeeks website.": "فرز الكومة: خوارزمية أعقد قليلًا تعتمد على بنية بيانات تسمى الكومة (heap). أول خوارزمية في هذه القائمة تعقيدها الزمني O(n log n)، لكنها تحتاج مساحة إضافية بتعقيد O(n)، وهي الوحيدة هنا التي تحتاج ذاكرة إضافية صراحة. تمتاز بإبقاء القوائم المتغيّرة باستمرار مرتبة بكفاءة، بفضل بنية الكومة نفسها. لمعرفة المزيد عن بنية الكومة راجع موقع GeeksForGeeks."
-"Quick sort: As the name implies, it has the fastest time complexity of O(n log n) despite not requiring any explicit memory. It randomly choses an element as a pivot, and transports all elements lower than the pivot to the left, and the elements greater than the pivot to the right of the pivot. The same operation is repeated on the portion of the list to the left and right of the pivot, recursively. Despite it's charasmatic name, it is difficult to implement, and certain choices of pivots can be disastrous on it's runtime.": "الفرز السريع: كما يوحي اسمه، تعقيده الزمني O(n log n) وهو الأسرع في هذه القائمة، رغم أنه لا يحتاج ذاكرة إضافية. يختار عنصرًا عشوائيًا محورًا (pivot)، وينقل كل عنصر أصغر منه إلى يساره وكل عنصر أكبر منه إلى يمينه. تتكرر العملية نفسها على الجزأين يمين المحور ويساره. رغم اسمه اللافت، تنفيذه صعب، واختيار محور سيئ قد يبطئه كثيرًا."
+"Cocktail Shaker sort: A two-way variation of bubble sort that moves the maximum element while going forward, and the minimum element while going backwards. It is useful for electromechanical machines that use a physical data reader to scan and sort through values sorted in a tape.": "فرز الكوكتيل: نسخة من فرز الفقاعات تعمل في الاتجاهين: تدفع أكبر عنصر إلى آخر القائمة وهي ذاهبة إلى الأمام، وأصغر عنصر إلى أولها وهي عائدة إلى الخلف. تفيد في الآلات الكهروميكانيكية التي تقرأ القيم فعليًا من شريط وتفرزها."
+"Heap sort: A slightly complex sorting algorithm that uses a data structure called heaps. First algorithm on this list to have a time complexity of O(n log n), although it comes with an additional space complexity of O(1), and the only algorithm on this list to require explicit space. It is extremely good at keeping frequently updated lists sorted dynamically, an advantage conferred by the data structure that it is built on. For information on the heap data structure, please refer GeeksForGeeks website.": "فرز الكومة: خوارزمية أعقد قليلًا تعتمد على بنية بيانات تسمى الكومة (heap). أول خوارزمية في هذه القائمة تعقيدها الزمني O(n log n)، لكنها تحتاج مساحة إضافية بتعقيد O(1)، وهي الوحيدة هنا التي تحتاج ذاكرة إضافية صراحة. تمتاز بإبقاء القوائم المتغيّرة باستمرار مرتبة بكفاءة، بفضل بنية الكومة نفسها. لمعرفة المزيد عن بنية الكومة راجع موقع GeeksForGeeks."
+"Quick sort: As the name implies, it has the fastest average time complexity of O(n log n) despite not requiring any explicit memory. It randomly choses an element as a pivot, and transports all elements lower than the pivot to the left, and the elements greater than the pivot to the right of the pivot. The same operation is repeated on the portion of the list to the left and right of the pivot, recursively. Despite it's charasmatic name, it is difficult to implement, and certain choices of pivots can be disastrous on it's runtime.": "الفرز السريع: كما يوحي اسمه، تعقيده الزمني في المتوسط O(n log n) وهو الأسرع في هذه القائمة، رغم أنه لا يحتاج ذاكرة إضافية. يختار عنصرًا عشوائيًا محورًا (pivot)، وينقل كل عنصر أصغر منه إلى يساره وكل عنصر أكبر منه إلى يمينه. تتكرر العملية نفسها على الجزأين يمين المحور ويساره. رغم اسمه اللافت، تنفيذه صعب، واختيار محور سيئ قد يبطئه كثيرًا."
"Merge sort: The industrial standard for sorting huge lists. It recursively divides the list into smaller lists, sorts the smaller ones and merges them in the right way. It always has a time complexity of O(n log n). A merge sort routine with multithreading support can sort billions of numbers in no time. However, it uses some auxillary memory while merging, and is really difficult to implement.": "فرز الدمج: المعيار المعتمد صناعيًا لفرز القوائم الضخمة. يقسّم القائمة إلى قوائم أصغر فأصغر، ثم يفرز كل جزء صغير ويدمج الأجزاء بالترتيب الصحيح. تعقيده الزمني ثابت دائمًا عند O(n log n)، وبدعم تعدد الخيوط يستطيع فرز مليارات الأرقام في وقت قصير جدًا. لكنه يحتاج ذاكرة إضافية أثناء الدمج، وتنفيذه صعب فعلًا."
"Note:": "ملاحظة:"
"If the simulation freezes then please refresh the page": "إذا توقفت المحاكاة عن الاستجابة فأعد تحميل الصفحة"
diff --git a/content/classic/text/ar/special_relativity.yaml b/content/classic/text/ar/special_relativity.yaml
index 8d92a05d..abfa4bc8 100644
--- a/content/classic/text/ar/special_relativity.yaml
+++ b/content/classic/text/ar/special_relativity.yaml
@@ -15,9 +15,9 @@
"Length contraction": "تقلّص الطول"
"If the length of an object on Earth is measured to be 'l0'' by a stationary observer on Earth, then an observer aboard the satellite measured the same object's length to be 'l' as calculated above. Observe that l0 > l. This phenomenon is known as length contraction.": "إذا قاس راصد ثابت على الأرض طول جسم فوجده l0، فسيقيس راصد على متن القمر طول الجسم نفسه بالقيمة l المحسوبة أعلاه. ولاحظ أن l0 أكبر من l. تسمى هذه الظاهرة تقلّص الطول."
"Relativistic Doppler Effect": "تأثير دوبلر النسبي"
-"If the satellite transmits waves of frequency 'f0'', then a stationary receiver on the Earth will measure the same waves to have a frequency of 'f' as calculated above. This phenomenon is known as relativistic doppler effect.": "إذا أرسل القمر موجات ترددها f0، فسيقيس مستقبل ثابت على الأرض تردد الموجات نفسها بالقيمة f المحسوبة أعلاه. تسمى هذه الظاهرة تأثير دوبلر النسبي."
+"If the satellite transmits waves of frequency 'f0', then a stationary receiver on the Earth will measure the same waves to have a frequency of 'f' as calculated above. This phenomenon is known as relativistic doppler effect.": "إذا أرسل القمر موجات ترددها f0، فسيقيس مستقبل ثابت على الأرض تردد الموجات نفسها بالقيمة f المحسوبة أعلاه. تسمى هذه الظاهرة تأثير دوبلر النسبي."
"Note:": "ملاحظة:"
-"Speaking in a strict sense, a satellit orbiting the Earth won't exactly show these effects in the same manner. The orbiting satellite analogy has been provided to get a brief idea of speed. Instead, consider a spaceship going away from Earth at the same speed.": "بدقة، القمر الصناعي في مداره لن يُظهر هذه الظواهر تمامًا بهذه الطريقة، لأن مداره يتضمن تسارعًا. استخدمنا مثال القمر الصناعي فقط لتقريب فكرة السرعة. الأدق أن تتخيّل مركبة فضائية تبتعد عن الأرض بالسرعة نفسها في خط مستقيم."
+"Speaking in a strict sense, a satellit orbiting the Earth won't exactly show these effects in the same manner. The orbiting satellite analogy has been provided to get a brief idea of speed. Instead, consider a spaceship going away from Earth at the same speed. However, satellites do gain time (for example,the GPS satellites gain around 38 microseconds per day) which has to be corrected for accurate positioning.": "بدقة، القمر الصناعي في مداره لن يُظهر هذه الظواهر تمامًا بهذه الطريقة، لأن مداره يتضمن تسارعًا. استخدمنا مثال القمر الصناعي فقط لتقريب فكرة السرعة. الأدق أن تتخيّل مركبة فضائية تبتعد عن الأرض بالسرعة نفسها في خط مستقيم. ومع ذلك فساعات الأقمار الصناعية تتقدّم فعلًا (ساعات أقمار GPS مثلًا تتقدّم نحو 38 ميكروثانية كل يوم)، ويجب تصحيح ذلك ليكون تحديد المواقع دقيقًا."
"This simulation is compatible with SI units": "تستخدم هذه المحاكاة وحدات SI المعتادة."
"Gamma (γ)": "جاما (γ)"
"is defined as:": "تُعرَّف بأنها:"
diff --git a/content/classic/text/ar/trig_functions.yaml b/content/classic/text/ar/trig_functions.yaml
index 0b6c96e7..73fd38b5 100644
--- a/content/classic/text/ar/trig_functions.yaml
+++ b/content/classic/text/ar/trig_functions.yaml
@@ -42,14 +42,14 @@
"Cosine is an even function:": "جيب التمام دالة زوجية:"
"The Cosine of +θ is always positive since the projection on the X-axis is always along the positive X-direction": "جيب تمام +θ دائمًا موجب، لأن ظلها على المحور السيني يقع دائمًا في الاتجاه الموجب"
"The Cosine of -θ is always positive since the projection on the X-axis is always along the positive X-direction": "وجيب تمام -θ دائمًا موجب أيضًا، لأن ظلها على المحور السيني يقع في الاتجاه الموجب نفسه"
-"Hence, cos(-θ) = cos(θ): Cosine is even odd function": "إذن cos(-θ) = cos(θ)، أي أن جيب التمام دالة زوجية"
+"Hence, cos(-θ) = cos(θ): Cosine is even function": "إذن cos(-θ) = cos(θ)، أي أن جيب التمام دالة زوجية"
"The same also holds good for an angle θ having magnitude between 90 and 180 degrees: Cos(θ) and cos(-θ) are both negative": "والأمر نفسه صحيح لزاوية θ بين 90 و180 درجة: كل من Cos(θ) وcos(-θ) سالب"
"The Circle Grazers:
Tangent and Cotangent": "ملامسا الدائرة:
الظل وظل التمام"
"The word \"tangent\" comes from the Latin verb \"tangere\" which means \"to touch\"": "كلمة \"tangent\" مشتقة من الفعل اللاتيني \"tangere\" ومعناه \"يلمس\""
"Consider the same unit cirle with the same line segment OP. Consider a tangent drawn to the circle at point P. The length between the point P and the point where this tangent intersects the X-axis is equal to the tangent of the angle θ": "تخيّل الدائرة نفسها والقطعة OP نفسها. ارسم مماسًا للدائرة عند النقطة P. طول القطعة بين P والنقطة التي يقطع فيها هذا المماس المحور السيني هو ظل الزاوية θ"
"Tan(θ) = length of blue line = 1.0000": "Tan(θ) = طول الخط الأزرق = 1.0000"
"Cot(θ) = length of red line = 1.0000": "Cot(θ) = طول الخط الأحمر = 1.0000"
-"Relationship between Tangent and Cotangentt:": "العلاقة بين الظل وظل التمام:"
+"Relationship between Tangent and Cotangent:": "العلاقة بين الظل وظل التمام:"
"The length of the same tangent, but from the point P to its point of intersection with the Y-axis is equal to the Cotangent of θ": "طول المماس نفسه، لكن من النقطة P إلى نقطة تقاطعه مع المحور الصادي، هو ظل تمام الزاوية θ"
"Values of Tangents and Cotangents of multiples of 90 degrees": "قيم الظل وظل التمام عند مضاعفات 90 درجة"
"The Tangent of 0 degrees is 0, since the point P is already intersecting with the X-axis": "ظل الزاوية 0 يساوي 0، لأن النقطة P تقع أصلًا على المحور السيني"
@@ -57,7 +57,7 @@
"The Tangent of 90 degrees is infinite, since the tangent never meets the X-axis": "ظل الزاوية 90 لا نهائي، لأن المماس لا يلتقي المحور السيني أبدًا"
"The Cotangent of 90 degrees is 0, since the point P is already intersecting with the Y-axis": "وظل تمام الزاوية 90 يساوي 0، لأن النقطة P تقع أصلًا على المحور الصادي"
"The Inner Perpetrators:
Secant and Cosecant": "الفاعلان الخفيّان:
القاطع وقاطع التمام"
-"Etymology: The word \"secant\" is derived from the French verb \"secanter\" which means \"to cut\"
Visualization: Consider the same unit cirle with the same line segment OP and the tangent drawn to the circle at point P. The length between the Origin and the point where the tangent intersects the X-axis is equal to the Secant of θ
": "أصل الكلمة: كلمة \"secant\" مشتقة من الفعل الفرنسي \"secanter\" ومعناه \"يقطع\"
الرسم: تخيّل الدائرة نفسها والقطعة OP نفسها والمماس المرسوم عند النقطة P. طول القطعة بين المركز O والنقطة التي يقطع فيها هذا المماس المحور السيني هو قاطع الزاوية θ
"
+"Etymology: The word \"secant\" is derived from the Latin word \"secare\" which means \"to cut\"
Visualization: Consider the same unit cirle with the same line segment OP and the tangent drawn to the circle at point P. The length between the Origin and the point where the tangent intersects the X-axis is equal to the Secant of θ
": "أصل الكلمة: كلمة \"secant\" مشتقة من الكلمة اللاتينية \"secare\" ومعناه \"يقطع\"
الرسم: تخيّل الدائرة نفسها والقطعة OP نفسها والمماس المرسوم عند النقطة P. طول القطعة بين المركز O والنقطة التي يقطع فيها هذا المماس المحور السيني هو قاطع الزاوية θ
"
"Sec(θ) = length of blue line = 2.0000": "Sec(θ) = طول الخط الأزرق = 2.0000"
"Cosec(θ) = length of red line = 1.1547": "Cosec(θ) = طول الخط الأحمر = 1.1547"
"Relationship between Secant and Cosecant:": "العلاقة بين القاطع وقاطع التمام:"
@@ -68,7 +68,7 @@
"The Secant of 0 degrees is 1, since the point P coincides with the X-axis": "قاطع الزاوية 0 يساوي 1، لأن النقطة P تنطبق على المحور السيني"
"The Cosecant of 0 degrees is infinite, since the tangent never meets the Y-axis": "وقاطع تمام الزاوية 0 لا نهائي، لأن المماس لا يلتقي المحور الصادي أبدًا"
"The Secant of 90 degrees is infinite, since the tangent never meets the X-axis": "قاطع الزاوية 90 لا نهائي، لأن المماس لا يلتقي المحور السيني أبدًا"
-"The Cosecant of 0 degrees is 1, since the point P coincides with the Y-axis": "وقاطع تمام الزاوية 0 يساوي 1، لأن النقطة P تنطبق على المحور الصادي"
+"The Cosecant of 90 degrees is 1, since the point P coincides with the Y-axis": "وقاطع تمام الزاوية 90 يساوي 1، لأن النقطة P تنطبق على المحور الصادي"
"Developed by ChanRT | Fork me at Github": "طوّره ChanRT، وشفرته المصدرية على Github"
"θ = {0}o": "θ = {0}o"
"θ = {0}°": "θ = {0}°"
diff --git a/content/lessons/electromagnetism/lorentz-force/ar.md b/content/lessons/electromagnetism/lorentz-force/ar.md
index 0d24b698..d2596631 100644
--- a/content/lessons/electromagnetism/lorentz-force/ar.md
+++ b/content/lessons/electromagnetism/lorentz-force/ar.md
@@ -16,9 +16,9 @@ variables:
## Try it
-1. تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). أبقِ «الشحنة q» عند 1، و«السرعة v» عند 5، و«المجال المغناطيسي B» عند 1 T، و«المجال الكهربائي E» عند 0. ينحني الجسيم في قوس واسع ثم يخرج من الصورة، وتعرض القراءات نصف القطر (radius) 150 px والانحراف (deflects) إلى أعلى: up.
+1. تخيّل إلكترونًا ينحني داخل المجال المغناطيسي لأنبوب تلفاز قديم (CRT). أبقِ «الشحنة q» عند 1، و«السرعة v» عند 5، و«المجال المغناطيسي B» عند 1 T، و«المجال الكهربائي E» عند 0. ينحني الجسيم في قوس واسع ثم يخرج من الصورة، وتعرض القراءات «نصف القطر» 150 px و«الانحراف» إلى أعلى.
2. أبقِ «المجال الكهربائي E» عند 0 وأنزل منزلق «السرعة v» إلى 1. ينخفض نصف القطر إلى 30 px، فتصير الدورة كلها داخل الصورة ويدور الجسيم مرة بعد مرة.
-3. اسحب منزلق «الشحنة q» من 1 إلى −1. تتغيّر قراءة الانحراف (deflects) من up إلى down، أي إلى أسفل، وينحني الجسيم الآن في الاتجاه المعاكس.
+3. اسحب منزلق «الشحنة q» من 1 إلى −1. تتغيّر قراءة «الانحراف» من «إلى أعلى» إلى «إلى أسفل»، وينحني الجسيم الآن في الاتجاه المعاكس.
## Real-life examples
diff --git a/content/ui/ar/atom-shells.yaml b/content/ui/ar/atom-shells.yaml
new file mode 100644
index 00000000..6b93b38f
--- /dev/null
+++ b/content/ui/ar/atom-shells.yaml
@@ -0,0 +1,29 @@
+atom.element: العنصر
+atom.z: Z (البروتونات)
+atom.n: N (النيوترونات)
+atom.a: A (العدد الكتلي)
+atom.config: توزيع الإلكترونات
+atom.valence: إلكترونات التكافؤ
+atom.isotope: 'النظير {name}-{a}'
+atom.hint: اسحب أفقيًا لتغيير Z · إلكترونات الغلاف الخارجي (التكافؤ) ملوّنة
+atom.el.H: الهيدروجين
+atom.el.He: الهيليوم
+atom.el.Li: الليثيوم
+atom.el.Be: البريليوم
+atom.el.B: البورون
+atom.el.C: الكربون
+atom.el.N: النيتروجين
+atom.el.O: الأكسجين
+atom.el.F: الفلور
+atom.el.Ne: النيون
+atom.el.Na: الصوديوم
+atom.el.Mg: المغنيسيوم
+atom.el.Al: الألومنيوم
+atom.el.Si: السيليكون
+atom.el.P: الفوسفور
+atom.el.S: الكبريت
+atom.el.Cl: الكلور
+atom.el.Ar: الأرغون
+atom.el.K: البوتاسيوم
+atom.el.Ca: الكالسيوم
+atom.note: هذا نموذج الأغلفة للتوضيح — الإلكترونات الحقيقية تشغل مدارات تشبه السُّحب، لا مسارات دائرية.
diff --git a/content/ui/ar/lorentz-force.yaml b/content/ui/ar/lorentz-force.yaml
new file mode 100644
index 00000000..fe0c338f
--- /dev/null
+++ b/content/ui/ar/lorentz-force.yaml
@@ -0,0 +1,9 @@
+lorentz.hint: القوة المغناطيسية عمودية دائمًا على اتجاه الحركة، فهي تغيّر اتجاه الجسيم ولا تسرّعه أبدًا.
+lorentz.radius: نصف القطر
+lorentz.period: زمن الدورة
+lorentz.steps: خطوة
+lorentz.deflects: الانحراف
+lorentz.relUnits: (وحدات نسبية)
+lorentz.up: إلى أعلى
+lorentz.down: إلى أسفل
+lorentz.none: لا ينحرف
diff --git a/content/ui/ar/units.yaml b/content/ui/ar/units.yaml
new file mode 100644
index 00000000..fc650534
--- /dev/null
+++ b/content/ui/ar/units.yaml
@@ -0,0 +1,23 @@
+# Arabic for slider units that are words rather than symbols (ParamSlider looks up unit.Hopfield Networks
Number of patterns memorized: 0
- Memory capacity (theoretical): 0.14 N2 = approx. 170 patterns
+ Memory capacity (theoretical): 0.14 N = approx. 6 patterns
diff --git a/public/legacy/linear_transformations/simulation.html b/public/legacy/linear_transformations/simulation.html
index 4384d8f9..88f826e1 100644
--- a/public/legacy/linear_transformations/simulation.html
+++ b/public/legacy/linear_transformations/simulation.html
@@ -104,7 +104,7 @@ Description
matrix,
\(M = \begin{bmatrix} a & b \\ c & d
\end{bmatrix} \), its inverse is given by:
Clicking on the following button will lead to calculation of inverse of the current matrix and its application.
- Every qubit \( | \psi \gt \) resides on a point on a Block sphere. It can be represented by two + Every qubit \( | \psi \gt \) resides on a point on a Bloch sphere. It can be represented by two numbers \( (a, b)\) such that: \[ | \psi \gt = a | 0 \gt + b | 1 \gt \] - Here, \( | 0 \gt \) and \( b | 1 \gt \) are known as the basis states. The probability that a qubit is measured in + Here, \( | 0 \gt \) and \( | 1 \gt \) are known as the basis states. The probability that a qubit is measured in the \( | 0 \gt \) state is given by \( a^2 \). The probability that a qubit is measured in the \( | 1 \gt \) state is given by \( b^2 \). Following the postulates of probability, we require that: \[ a^2 + b^2 = 1 \] diff --git a/public/legacy/sorting_algos/cocktail_shaker_sort.js b/public/legacy/sorting_algos/cocktail_shaker_sort.js index 2e97eeac..9cbbdb59 100644 --- a/public/legacy/sorting_algos/cocktail_shaker_sort.js +++ b/public/legacy/sorting_algos/cocktail_shaker_sort.js @@ -8,33 +8,43 @@ let state_c; function updateCocktail() { if(left_sorted_index_c < right_sorted_index_c) { if(state_c == "max") { - if(scanning_index_c <= right_sorted_index_c) { - if(array[scanning_index_c] > num_interest_c) { - num_interest_c = array[scanning_index_c]; - num_position_c = scanning_index_c; + // Forward pass: bubble the largest unsorted value to the right + if(scanning_index_c < right_sorted_index_c) { + num_position_c = scanning_index_c + 1; // other element of the compared pair + + if(array[scanning_index_c] > array[scanning_index_c + 1]) { + swap(scanning_index_c, scanning_index_c + 1); + swapped_c = true; + swaps++; } scanning_index_c++; - array_access++; + comparisons++; + array_access += 2; } else { - swap(num_position_c, right_sorted_index_c); + // Largest value is now in its final place right_sorted_index_c--; + // No swaps during this pass -> array is sorted + if(!swapped_c) { + left_sorted_index_c = right_sorted_index_c; + } + swapped_c = false; + state_c = "min"; scanning_index_c = right_sorted_index_c; - - num_interest_c = num_numbers; - - swaps++; } - comparisons++; } else if(state_c == "min") { - if(scanning_index_c >= left_sorted_index_c) { - if(array[scanning_index_c] < num_interest_c) { - num_interest_c = array[scanning_index_c]; - num_position_c = scanning_index_c; + // Backward pass: bubble the smallest unsorted value to the left + if(scanning_index_c > left_sorted_index_c) { + num_position_c = scanning_index_c - 1; // other element of the compared pair + + if(array[scanning_index_c - 1] > array[scanning_index_c]) { + swap(scanning_index_c - 1, scanning_index_c); + swapped_c = true; + swaps++; } scanning_index_c--; @@ -42,15 +52,17 @@ function updateCocktail() { array_access += 2; } else { - swap(num_position_c, left_sorted_index_c); + // Smallest value is now in its final place left_sorted_index_c++; + // No swaps during this pass -> array is sorted + if(!swapped_c) { + left_sorted_index_c = right_sorted_index_c; + } + swapped_c = false; + state_c = "max"; scanning_index_c = left_sorted_index_c; - - num_interest_c = 0; - - swaps++; } } iterations++; diff --git a/public/legacy/sorting_algos/simulation.html b/public/legacy/sorting_algos/simulation.html index cd3a3555..5b73c144 100644 --- a/public/legacy/sorting_algos/simulation.html +++ b/public/legacy/sorting_algos/simulation.html @@ -7,7 +7,8 @@ - + @@ -132,14 +133,15 @@
If the satellite transmits waves of frequency 'f0'', then a stationary receiver on the Earth will + \[ f = f_0 \sqrt{\frac{c-v}{c+v}} \] +
If the satellite transmits waves of frequency 'f0', then a stationary receiver on the Earth will measure the same waves to have a frequency of 'f' as calculated above. This phenomenon is known as relativistic doppler effect.
@@ -105,7 +105,7 @@The length of the same tangent, but from the point P to its point of intersection with the Y-axis is equal to the Cotangent of θ @@ -218,7 +218,7 @@
- Etymology: The word "secant" is derived from the French verb "secanter" which means "to cut"
+ Etymology: The word "secant" is derived from the Latin word "secare" which means "to cut"
Visualization: Consider the same unit cirle with the same line segment OP and the tangent drawn to the
circle at point P. The length between the Origin and the point where the tangent intersects the X-axis is equal to
@@ -267,7 +267,7 @@