From 397014136e7cf344698c45860c81151545c0f8d0 Mon Sep 17 00:00:00 2001
From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Date: Thu, 20 Jun 2019 13:35:05 -0700
Subject: [PATCH] fix: converted single to triple backticks14 (#36241)
---
guide/arabic/react-native/touchables/index.md | 48 +++---
guide/arabic/redux/index.md | 39 +++--
guide/arabic/redux/redux-actions/index.md | 5 +-
guide/arabic/redux/redux-thunk/index.md | 19 +--
.../arabic/ruby/classes-and-objects/index.md | 5 +-
.../arabic/ruby/common-array-methods/index.md | 140 +++++++++-------
guide/arabic/ruby/index.md | 35 ++--
.../ruby/managing-ruby-versions/index.md | 26 +--
guide/arabic/ruby/rubocop/index.md | 34 ++--
guide/arabic/ruby/ruby-arrays/index.md | 41 +++--
guide/arabic/ruby/ruby-comments/index.md | 56 ++++---
guide/arabic/ruby/ruby-hash/index.md | 36 +++--
guide/arabic/ruby/ruby-hashes/index.md | 48 +++---
guide/arabic/ruby/ruby-methods/index.md | 27 ++--
guide/arabic/ruby/ruby-on-rails/index.md | 30 ++--
.../ruby/ruby-string-interpolation/index.md | 25 +--
.../arabic/ruby/ruby-string-methods/index.md | 5 +-
guide/arabic/ruby/ruby-symbols/index.md | 108 +++++++------
guide/arabic/rust/hello-world/index.md | 21 +--
guide/arabic/rust/index.md | 15 +-
guide/arabic/rust/loops/index.md | 49 +++---
guide/arabic/security/oauth2/index.md | 114 +++++++-------
.../security/query-parameterization/index.md | 50 +++---
guide/arabic/security/scanning/index.md | 30 ++--
guide/arabic/security/steganography/index.md | 11 +-
guide/arabic/semantic-ui/index.md | 29 ++--
.../semantic-ui/semantic-ui-buttons/index.md | 77 +++++----
.../design-patterns/builder/index.md | 119 +++++++-------
.../design-patterns/decorator/index.md | 59 +++----
.../design-patterns/factory/index.md | 23 +--
.../design-patterns/singleton/index.md | 48 +++---
.../functional-programming/index.md | 9 +-
.../software-engineering/unit-tests/index.md | 26 +--
guide/arabic/sql/sql-aliases/index.md | 72 +++++----
guide/arabic/sql/sql-and-operator/index.md | 21 +--
guide/arabic/sql/sql-avg-function/index.md | 18 ++-
.../arabic/sql/sql-between-operator/index.md | 24 +--
.../arabic/sql/sql-check-constraint/index.md | 79 +++++-----
guide/arabic/sql/sql-count-function/index.md | 21 +--
.../sql/sql-create-index-statement/index.md | 14 +-
guide/arabic/sql/sql-create-index/index.md | 48 +++---
.../sql/sql-create-table-statement/index.md | 22 +--
guide/arabic/sql/sql-create-table/index.md | 5 +-
.../sql/sql-create-view-statement/index.md | 9 +-
guide/arabic/sql/sql-date-functions/index.md | 39 ++---
.../arabic/sql/sql-delete-statement/index.md | 26 +--
.../sql/sql-drop-view-statement/index.md | 12 +-
.../sql/sql-foreign-key-constraint/index.md | 92 ++++++-----
.../sql/sql-group-by-statement/index.md | 42 ++---
guide/arabic/sql/sql-having-clause/index.md | 42 ++---
guide/arabic/sql/sql-in-operator/index.md | 66 ++++----
guide/arabic/sql/sql-injection/index.md | 7 +-
.../sql/sql-inner-join-keyword/index.md | 14 +-
.../sql-insert-into-select-statement/index.md | 11 +-
.../sql/sql-insert-into-statement/index.md | 14 +-
.../sql/sql-interview-questions/index.md | 60 +++----
guide/arabic/sql/sql-joins/index.md | 65 ++++----
.../arabic/sql/sql-left-join-keyword/index.md | 12 +-
guide/arabic/sql/sql-like-operator/index.md | 97 ++++++------
guide/arabic/sql/sql-not-operator/index.md | 9 +-
guide/arabic/sql/sql-or-operator/index.md | 18 ++-
.../arabic/sql/sql-order-by-keyword/index.md | 76 ++++-----
.../sql/sql-primary-key-constraint/index.md | 20 +--
.../sql/sql-replace-view-statement/index.md | 100 ++++++------
.../sql/sql-right-join-keyword/index.md | 54 ++++---
.../sql-select-distinct-statement/index.md | 62 ++++----
.../arabic/sql/sql-select-statement/index.md | 38 ++---
guide/arabic/sql/sql-sum-function/index.md | 42 ++---
guide/arabic/sql/sql-syntax/index.md | 5 +-
guide/arabic/sql/sql-union-operator/index.md | 45 +++---
guide/arabic/sql/sql-update-query/index.md | 149 +++++++++---------
.../arabic/sql/sql-update-statement/index.md | 44 +++---
guide/arabic/sql/sql-where-clause/index.md | 72 +++++----
.../ssh/managing-multiple-ssh-keys/index.md | 121 +++++++-------
guide/arabic/svg/index.md | 94 +++++------
75 files changed, 1782 insertions(+), 1506 deletions(-)
diff --git a/guide/arabic/react-native/touchables/index.md b/guide/arabic/react-native/touchables/index.md
index 08bc830570..401cc228b4 100644
--- a/guide/arabic/react-native/touchables/index.md
+++ b/guide/arabic/react-native/touchables/index.md
@@ -8,38 +8,42 @@ localeTitle: ملموس
React Native ships مع عنصر `Button` يعمل مع العديد من تفاعلات `onPress` القياسية. بشكل افتراضي ، فإنه يعطي ملاحظات المستخدم عن طريق تغيير العتامة لإظهار الضغط على الزر. الاستعمال:
- `
-`
+```js
+
+```
لحالات الاستخدام الأكثر تعقيدًا ، قام React Native بإنشاء واجهات برمجة التطبيقات للتعامل مع التفاعلات الصحفية المسماة `Touchables` .
- `TouchableHighlight
- TouchableNativeFeedback
- TouchableOpacity
- TouchableWithoutFeedback
-`
+```
+TouchableHighlight
+TouchableNativeFeedback
+TouchableOpacity
+TouchableWithoutFeedback
+```
يمكن تصميم واستخدام كل من هذه المكونات القابلة للتشابك مع مكتبة ، مثل `Animated` المدمجة ، مما يتيح لك إنشاء أنواع خاصة بك من تعليقات المستخدمين المخصصة.
بعض الأمثلة على استخدام هذه المكونات:
- `// with images
-
-
-
-
- // with text
-
- Hello
-
-`
+```js
+// with images
+
+
+
+
+// with text
+
+ Hello
+
+```
يمكنك التعامل مع أنواع مختلفة من الضغط على الزر أيضًا. بشكل افتراضي ، يتم تكوين الأزرار و touchables للتعامل مع الصنابير العادية ، ولكن يمكنك أيضا أن تشير إلى وظيفة لاستدعاء اضغط مع الاستمرار على التفاعلات على سبيل المثال.
- `
-`
+```js
+
+```
للاطلاع على جميع الأدوات المتوفرة المتوفرة وكيفية عمل هذه المكونات ، يمكنك الاطلاع على [شفرة مصدر جافا سكريبت لـ Touchables هنا](https://github.com/facebook/react-native/tree/master/Libraries/Components/Touchable) .
\ No newline at end of file
diff --git a/guide/arabic/redux/index.md b/guide/arabic/redux/index.md
index ba7b2190cf..fc30a9e9ee 100644
--- a/guide/arabic/redux/index.md
+++ b/guide/arabic/redux/index.md
@@ -20,8 +20,9 @@ Redux هو حاوية حالة يمكن التنبؤ بها لتطبيقات Jav
#### أين يتم تخزين هذه الحالة؟ Redux يوفر لك وظيفة يدوية تسمى
- `createStore()
-`
+```js
+createStore()
+```
حيث يمكنك إنشاء المتجر الذي سيحافظ على كل حالتك.
@@ -29,8 +30,9 @@ Redux هو حاوية حالة يمكن التنبؤ بها لتطبيقات Jav
#### لا يمكن تغيير الحالة إلا من خلال وظيفة نقية تعرف بالمخفّض حتى نتمكن من إنشاء هذا الاتصال سنمرر في المخفض إلى CreateStore () مثل
- `var store = createStore(reducer)
-`
+```js
+var store = createStore(reducer)
+```
يصبح الأمر أكثر تعقيدا عندما يكون لديك مخفضات أكثر ولكن في الصميم ، يحتوي المخزن الآن على مخفض متصل به
@@ -40,20 +42,22 @@ Redux هو حاوية حالة يمكن التنبؤ بها لتطبيقات Jav
تستطيع أن ترى أين يحدث هذا.
- `store.dispatch(action)
-`
+```js
+store.dispatch(action)
+```
قبل أن أتناول ما هو المخفض والعمل الذي أقوم به ، أعتقد أن عرض تطبيق أساسي ومحدود للغاية لـ CreateStore () من Redux سوف يساعد بشكل كبير.
- `createStore = (reducer) => {
- let state;
- //dispatch method
- dispatch = (action) => {
- state = reducer(state, action)
- }
- return {dispatch}
- }
-`
+```js
+createStore = (reducer) => {
+ let state;
+//dispatch method
+ dispatch = (action) => {
+ state = reducer(state, action)
+ }
+ return {dispatch}
+}
+```
انظر كيف نمرر في المخفض إلى createStore ويصبح مضبوطًا في طريقة إرسالنا ؛ وعندما نطلق على طريقة الإرسال فإنه يأخذ في عمل ويضع حالة جديدة على أساس ما سوف يعود المخفض.
@@ -61,8 +65,9 @@ Redux هو حاوية حالة يمكن التنبؤ بها لتطبيقات Jav
الإجراء في المستوى الأساسي هو كائن له خاصية تسمى النوع. يمكن أن يكون لها أيضًا خصائص أخرى ، ولكن ببساطة ستتمتع بالنوع.
- `var someAction = {type:'doSomething'}
-`
+```js
+var someAction = {type:'doSomething'}
+```
المخفض هو مجرد وظيفة:
diff --git a/guide/arabic/redux/redux-actions/index.md b/guide/arabic/redux/redux-actions/index.md
index 83bf4de990..8ad8fc0e0a 100644
--- a/guide/arabic/redux/redux-actions/index.md
+++ b/guide/arabic/redux/redux-actions/index.md
@@ -8,8 +8,9 @@ localeTitle: إجراءات Redux
فمثلا
- `const ADD_ITEM = 'ADD_ITEM'
-`
+```javascript
+const ADD_ITEM = 'ADD_ITEM'
+```
`{
type: ADD_ITEM,
diff --git a/guide/arabic/redux/redux-thunk/index.md b/guide/arabic/redux/redux-thunk/index.md
index 94dcbc6439..b5ef870f3a 100644
--- a/guide/arabic/redux/redux-thunk/index.md
+++ b/guide/arabic/redux/redux-thunk/index.md
@@ -51,15 +51,16 @@ Redux Thunk هي برامج وسيطة تسمح لك بإعادة الوظائف
يمكن تثبيت Redux Thunk باستخدام `npm install redux-thunk --save` أو `yarn add redux-thunk` مع سطر الأوامر. لأنها أداة Redux ، ستحتاج أيضًا إلى إعداد Redux. بمجرد تثبيته ، يتم تمكينه باستخدام `applyMiddleware()` :
- `import { createStore, applyMiddleware } from 'redux';
- import thunk from 'redux-thunk';
- import rootReducer from './reducers/index';
-
- const store = createStore(
- rootReducer,
- applyMiddleware(thunk)
- );
-`
+```javascript
+import { createStore, applyMiddleware } from 'redux';
+import thunk from 'redux-thunk';
+import rootReducer from './reducers/index';
+
+const store = createStore(
+ rootReducer,
+ applyMiddleware(thunk)
+);
+```
### المراجع
diff --git a/guide/arabic/ruby/classes-and-objects/index.md b/guide/arabic/ruby/classes-and-objects/index.md
index b96db1504c..bfc26fd4c1 100644
--- a/guide/arabic/ruby/classes-and-objects/index.md
+++ b/guide/arabic/ruby/classes-and-objects/index.md
@@ -45,8 +45,9 @@ localeTitle: الطبقات والكائنات
الآن ، لإنشاء مثيل لهذا الفصل ، تحتاج فقط إلى استدعاء الدالة `.new` .
- `mazda3 = Car.new('Mazda', 'Mazda3', 'White')
-`
+```Ruby
+mazda3 = Car.new('Mazda', 'Mazda3', 'White')
+```
هذا شيء عظيم ، لكن في بعض الأحيان قد تحتاج إلى تغيير بعض هذه السمات! معظم هذه الصفات في هذا المثال ستكون ثابتة. ومع ذلك ، تخيل أنك قررت الحصول على طلاء جديد. كيف ستذهب حول تحديث حالة هذا الشيء من `Car` ؟
diff --git a/guide/arabic/ruby/common-array-methods/index.md b/guide/arabic/ruby/common-array-methods/index.md
index a9e68d6983..40823fe00b 100644
--- a/guide/arabic/ruby/common-array-methods/index.md
+++ b/guide/arabic/ruby/common-array-methods/index.md
@@ -10,96 +10,111 @@ localeTitle: طرق المصفوفة المشتركة
\`\` \`روبي الصفيف = \[0 ، 1 ، 2 ، 3 ، 4\]
- `#### .length
- The .length method tallies the number of elements in your array and returns the count:
-`
+```
+#### .length
+The .length method tallies the number of elements in your array and returns the count:
+```
ياقوت array.length => 5
- `#### .first
- The .first method accesses the first element of the array, the element at index 0:
-`
+```
+#### .first
+The .first method accesses the first element of the array, the element at index 0:
+```
ياقوت array.first => 0
- `#### .last
- The .last method accesses the last element of the array:
-`
+```
+#### .last
+The .last method accesses the last element of the array:
+```
ياقوت array.last => 4
- `#### .take
- The .take method returns the first n elements of the array:
-`
+```
+#### .take
+The .take method returns the first n elements of the array:
+```
ياقوت array.take (3) => \[0 ، 1 ، 2\]
- `#### .drop
- The .drop method returns the elements after n elements of the array:
-`
+```
+#### .drop
+The .drop method returns the elements after n elements of the array:
+```
ياقوت array.drop (3) => \[3 ، 4\]
- `#### array index
- You can access a specific element in an array by accessing its index. If the index does not exist in the array, nil will be returned:
-`
+```
+#### array index
+You can access a specific element in an array by accessing its index. If the index does not exist in the array, nil will be returned:
+```
ياقوت مجموعة \[2\] => 2
مجموعة \[5\] => لا شيء
- `#### .pop
- The .pop method will permantently remove the last element of an array:
-`
+```
+#### .pop
+The .pop method will permantently remove the last element of an array:
+```
ياقوت array.pop => \[0 ، 1 ، 2 ، 3\]
- `#### .shift
- The .shift method will permantently remove the first element of an array and return this element:
-`
+```
+#### .shift
+The .shift method will permantently remove the first element of an array and return this element:
+```
ياقوت array.shift => 0
مجموعة مصفوفة => \[1 ، 2 ، 3 ، 4\]
- `#### .push
- The .push method will allow you to add an element to the end of an array:
-`
+```
+#### .push
+The .push method will allow you to add an element to the end of an array:
+```
ياقوت array.push (99) => \[0 ، 1 ، 2 ، 3 ، 4 ، 99\]
- `#### .unshift
- The .unshift method will allow you to add an element to the beginning of an array:
-`
+```
+#### .unshift
+The .unshift method will allow you to add an element to the beginning of an array:
+```
الصفيف = \[2 ، 3\] array.unshift (1) => \[1 ، 2 ، 3\]
- `#### .delete
- The .delete method removes a specified element from an array permanently:
-`
+```
+#### .delete
+The .delete method removes a specified element from an array permanently:
+```
ياقوت array.delete (1) => \[0 ، 2 ، 3 ، 4\]
- `#### .delete_at
- The .delete_at method allows you to permanently remove an element of an array at a specified index:
-`
+```
+#### .delete_at
+The .delete_at method allows you to permanently remove an element of an array at a specified index:
+```
ياقوت array.delete\_at (0) => \[1 ، 2 ، 3 ، 4\]
- `#### .reverse
- The .reverse method reverses the array but does not mutate it (the original array stays as is):
-`
+```
+#### .reverse
+The .reverse method reverses the array but does not mutate it (the original array stays as is):
+```
ياقوت array.reverse => \[4 ، 3 ، 2 ، 1 ، 0\]
- `#### .select
- The .select method iterates over an array and returns a new array that includes any items that return true to the expression provided.
-`
+```
+#### .select
+The .select method iterates over an array and returns a new array that includes any items that return true to the expression provided.
+```
ياقوت الصفيف = \[1 ، 2 ، 3 ، 4 ، 5 ، 6 ، 7 ، 8 ، 9 ، 10\] array.select {| number | رقم> 4} => \[5 ، 6 ، 7 ، 8 ، 9 ، 10\] مجموعة مصفوفة => \[5 ، 6 ، 7 ، 8 ، 9 ، 10\]
- `#### .include?
- The include? method checks to see if the argument given is included in the array:
-`
+```
+#### .include?
+The include? method checks to see if the argument given is included in the array:
+```
ياقوت الصفيف = \[1 ، 2 ، 3 ، 4 ، 5\] => \[1 ، 2 ، 3 ، 4 ، 5\] array.include؟ (3) => صحيح
@@ -109,33 +124,38 @@ localeTitle: طرق المصفوفة المشتركة
\`\` \`روبي صفيف = \[1 ، 2 ، \[3 ، 4 ، 5\] ، \[6 ، 7\]\] array.flatten => \[1 ، 2 ، 3 ، 4 ، 5 ، 6 ، 7\]
- `#### .join
- The .join method returns a string of all the elements of the array separated by a separator parameter. If the separator parameter is nil, the method uses an empty string as a separator between strings.
-`
+```
+#### .join
+The .join method returns a string of all the elements of the array separated by a separator parameter. If the separator parameter is nil, the method uses an empty string as a separator between strings.
+```
ياقوت array.join => "1234" array.join (" _") => "1_ 2 _3_ 4"
- `#### .each
- The .each method iterates over each element of the array, allowing you to perform actions on them.
-`
+```
+#### .each
+The .each method iterates over each element of the array, allowing you to perform actions on them.
+```
ياقوت array.each do | element | يضع العنصر النهاية => 0 1 2 3 4
- `#### .map
- The .map method is the same as the .collect method. The .map and .collect methods iterate over each element of the array, allowing you to perform actions on them. The .map and .collect methods differ from the .each method in that they return an array containing the transformed elements.
-`
+```
+#### .map
+The .map method is the same as the .collect method. The .map and .collect methods iterate over each element of the array, allowing you to perform actions on them. The .map and .collect methods differ from the .each method in that they return an array containing the transformed elements.
+```
ياقوت array.map {| عنصر | العنصر \* 2} يضع العنصر النهاية => 0 2 4 6 8
- `#### .uniq
- The .uniq method takes in an array containing duplicate elements, and returns a copy of the array containing only unique elements--any duplicate elements are removed from the array.
-`
+```
+#### .uniq
+The .uniq method takes in an array containing duplicate elements, and returns a copy of the array containing only unique elements--any duplicate elements are removed from the array.
+```
ياقوت الصفيف = \[1 ، 1 ، 2 ، 2 ، 3 ، 3 ، 3 ، 4 ، 4 ، 4 ، 4 ، 5 ، 6 ، 7 ، 8\] array.uniq => \[1 ، 2 ، 3 ، 4 ، 5 ، 6 ، 7 ، 8\]
- `#### .concat
- The .concat method appends the elements from an array to the original array. The .concat method can take in multiple arrays as an argument, which will in turn append multiple arrays to the original array.
-`
+```
+#### .concat
+The .concat method appends the elements from an array to the original array. The .concat method can take in multiple arrays as an argument, which will in turn append multiple arrays to the original array.
+```
ياقوت الصفيف = \[0 ، 1 ، 2 ، 3 ، 4\] array.concat (\[5 ، 6 ، 7\] ، \[8 ، 9 ، 10\]) => \[0 ، 1 ، 2 ، 3 ، 4 ، 5 ، 6 ، 7 ، 8 ، 9 ، 10\] \`\` \`
diff --git a/guide/arabic/ruby/index.md b/guide/arabic/ruby/index.md
index 26f9d5d8a2..163085e9e3 100644
--- a/guide/arabic/ruby/index.md
+++ b/guide/arabic/ruby/index.md
@@ -18,23 +18,24 @@ localeTitle: ياقوت
إذا كنت غير معتاد على بعض المفاهيم أعلاه ، فاقرأ ، ولا تقلق. يركز روبي على البساطة والإنتاجية من خلال تركيبه الأنيق الذي يكون طبيعيًا للقراءة والكتابة بسهولة ، مثل:
- `# Quick example of Ruby with Object Oriented Programming
- class Greeter
- def initialize(name)
- @name = name.capitalize
- end
-
- def salute
- puts "Hello #{@name}!"
- end
- end
-
- # Create a new object
- g = Greeter.new("world")
-
- # Output "Hello World!"
- g.salute
-`
+```ruby
+# Quick example of Ruby with Object Oriented Programming
+class Greeter
+ def initialize(name)
+ @name = name.capitalize
+ end
+
+ def salute
+ puts "Hello #{@name}!"
+ end
+end
+
+# Create a new object
+g = Greeter.new("world")
+
+# Output "Hello World!"
+g.salute
+```
## الإصدار
diff --git a/guide/arabic/ruby/managing-ruby-versions/index.md b/guide/arabic/ruby/managing-ruby-versions/index.md
index 2f77be0eee..956797abf9 100644
--- a/guide/arabic/ruby/managing-ruby-versions/index.md
+++ b/guide/arabic/ruby/managing-ruby-versions/index.md
@@ -30,8 +30,9 @@ localeTitle: إدارة إصدارات روبي
هناك نوعان من الأدوات التي تحظى بشعبية كبيرة ، لكن كلاهما وافق على ذلك مشاركة ملف مشترك. العديد من مشاريع Ruby (أو Rails) ستشمل بسيطة ملف `.ruby-version` ، الذي يحدد ببساطة رقم إصدار ، على _سبيل المثال_ :
- `2.4.2
-`
+```
+2.4.2
+```
الأدوات الشائعة لمساعدتك في إدارة إصدار روبي هي:
@@ -46,15 +47,16 @@ localeTitle: إدارة إصدارات روبي
على سبيل المثال ، قد يكون لديك هذا التسلسل:
- `% cd ~/projects/older-project
- % ruby --version
-
- ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-darwin16]
-
- % cd ~/projects/newer-project
- % ruby --version
-
- ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
-`
+```shell
+% cd ~/projects/older-project
+% ruby --version
+
+ruby 2.3.5p376 (2017-09-14 revision 59905) [x86_64-darwin16]
+
+% cd ~/projects/newer-project
+% ruby --version
+
+ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
+```
(هذه الأمثلة من جهاز MacOS)
\ No newline at end of file
diff --git a/guide/arabic/ruby/rubocop/index.md b/guide/arabic/ruby/rubocop/index.md
index 7b10094785..6242e2803c 100644
--- a/guide/arabic/ruby/rubocop/index.md
+++ b/guide/arabic/ruby/rubocop/index.md
@@ -14,10 +14,11 @@ localeTitle: Rubocop
يتم تسليم Rubocop كما جوهرة ، لذلك في مشروع نموذجي يستخدم Bundler لك `Gemfile` إلى قسم التطوير في `Gemfile` الخاص بك:
- `group :development do
- gem rubocop
- end
-`
+```
+group :development do
+ gem rubocop
+end
+```
وهذا يعني أن أي شخص يستخدم مشروعك سيكون له نفس الإصدار من Rubocop ، و سيتفق الجميع على أفضل الممارسات الحالية.
@@ -25,15 +26,17 @@ localeTitle: Rubocop
قبل كل التزام ، أرغب في التحقق من أن الشفرة المعدلة حديثًا تتوافق معها معيار commmunity ، ببساطة عن طريق تشغيل:
- `rubocop
-`
+```
+rubocop
+```
سيؤدي ذلك إلى إخراج قائمة بالتحذيرات حول شفرتك.
يمكن أن يكون من المفيد طلب Rubocop للحصول على مزيد من المساعدة:
- `rubocop --extra-details --display-cop-names
-`
+```
+rubocop --extra-details --display-cop-names
+```
(يمكنك إضافة هذه الملفات إلى ملف `.rubocop` لجعلها افتراضية.)
@@ -43,20 +46,23 @@ localeTitle: Rubocop
لنفترض أنني كتبت رمزًا جديدًا ؛ قبل أن ألتزم بها ، قد أقرر ذلك تأكد من أنها تلتزم بالمبادئ التوجيهية:
- `rubocop
-`
+```shell
+rubocop
+```
يمكنني تحرير التغييرات المقترحة يدويًا ، أو يمكنني أن أطلب من Rubocop إصلاحها مشاكل طفيفة تلقائيا:
- `rubocop --auto-correct
-`
+```
+rubocop --auto-correct
+```
### تشغيل بعض رجال الشرطة فقط
يتم تنفيذ كل المبادئ التوجيهية للمجتمع في "شرطي" Rubocop. عند العمل على قاعدة البيانات القديمة قد تغرق مع التحذيرات عند تقديم Rubocop. في هذه الحالة ، يمكن أن يكون من المفيد تشغيل شرطي واحد فقط عبر مصدر البرنامج ، وتحقق من هذه التغييرات قبل الانتقال إلى المبدأ التوجيهي التالي ، من أجل مثال:
- `rubocop --auto-correct --only 'Layout/EmptyLineAfterMagicComment'
-`
+```
+rubocop --auto-correct --only 'Layout/EmptyLineAfterMagicComment'
+```
### تكامل محرر النصوص
diff --git a/guide/arabic/ruby/ruby-arrays/index.md b/guide/arabic/ruby/ruby-arrays/index.md
index b51d3a820a..e493a2723e 100644
--- a/guide/arabic/ruby/ruby-arrays/index.md
+++ b/guide/arabic/ruby/ruby-arrays/index.md
@@ -6,43 +6,50 @@ localeTitle: روبي أرايس
يمثل الصفيف قائمة بالقيم. غالباً ما تسمى القيم الفردية "عناصر" الصفيف. لإنشاء صفيف في Ruby ، استخدم الأقواس المربعة والقيم المنفصلة باستخدام الفواصل:
- `my_array = [1, 2, 3, 4, 5]
-`
+```ruby
+my_array = [1, 2, 3, 4, 5]
+```
المثال الأول هو مجموعة من الأرقام ، لكن مصفوفة Ruby يمكن أن تحتوي على قيم من أنواع مختلفة ، حتى المصفوفات الأخرى:
- `mixed_array = [5, "Hello World", true, [1,2,3]]
-`
+```ruby
+mixed_array = [5, "Hello World", true, [1,2,3]]
+```
يمكنك الوصول إلى عناصر صفيف يحتوي على أقواس مربعة وفهارس رقمية. لاحظ أن العنصر الأول في index 0 ، وليس 1:
- `mixed_array[0] # 5
- mixed_array[1] # "Hello World"
- mixed_array[2] # true
-`
+```ruby
+mixed_array[0] # 5
+mixed_array[1] # "Hello World"
+mixed_array[2] # true
+```
يمكنك التحقق من عدد العناصر التي تحتوي عليها المصفوفة باستخدام طريقة `length` :
- `mixed_array.length # 3
- [].length # 0
-`
+```ruby
+mixed_array.length # 3
+[].length # 0
+```
يمكنك التحقق من العنصر الأول في مصفوفة باستخدام الطريقة `first` :
- `mixed_array.first # 5
-`
+```ruby
+mixed_array.first # 5
+```
يمكنك التحقق من آخر عنصر في مصفوفة باستخدام الطريقة `last` :
- `mixed_array.last # true
-`
+```ruby
+mixed_array.last # true
+```
#### روبي لامدا
كما يشار إلى lambda على أنها وظيفة مجهولة. لإنشاء لامدا في Ruby ، يمكنك استخدام البنية التالية:
- `lambda = lambda {}
-`
+```ruby
+lambda = lambda {}
+```
#### معلومات اكثر:
diff --git a/guide/arabic/ruby/ruby-comments/index.md b/guide/arabic/ruby/ruby-comments/index.md
index 980a3b1b13..8acce2868e 100644
--- a/guide/arabic/ruby/ruby-comments/index.md
+++ b/guide/arabic/ruby/ruby-comments/index.md
@@ -8,38 +8,42 @@ localeTitle: روبي التعليقات
في روبي ، يبدأ تعليق سطر واحد بالحرف `#` ويمتد إلى نهاية السطر. يمكن أن يكون التعليق على السطر الخاص به أو بعد الكود.
- `puts "Learning to code is fun!"
-
- # I am a single line comment.
-
- puts "Ruby is a great language!" # Me too - I am a trailing comment.
-`
+```Ruby
+puts "Learning to code is fun!"
+
+# I am a single line comment.
+
+puts "Ruby is a great language!" # Me too - I am a trailing comment.
+```
عند التنفيذ ، ينتج البرنامج أعلاه ما يلي:
- `Learning to code is fun!
- Ruby is a great language!
-`
+```
+Learning to code is fun!
+Ruby is a great language!
+```
يمكنك إجراء عدة تعليقات سطر من خلال وضع التعليقات بين `=begin` و `=end` . `=begin` start و `=end` يجب أن تبدأ في بداية السطر ويجب أن يكون `=end` على خط خاص به.
- `=begin
- I am a multi-line comment
- and I can be as long as I please.
- See, still going!
- =end
-
- puts "Hello World!"
-
- =begin It's ok to start the comment on the same
- line as "=begin" (though it's more readable if
- you don't) but you can't put a space or any
- text before "=begin" or "=end" and you can't put
- anything on the same line after "=end".
- =end
-`
+```ruby
+=begin
+I am a multi-line comment
+and I can be as long as I please.
+See, still going!
+=end
+
+puts "Hello World!"
+
+=begin It's ok to start the comment on the same
+line as "=begin" (though it's more readable if
+you don't) but you can't put a space or any
+text before "=begin" or "=end" and you can't put
+anything on the same line after "=end".
+=end
+```
عند التنفيذ ، ينتج البرنامج أعلاه ما يلي:
- `Hello World!
-`
\ No newline at end of file
+```
+Hello World!
+```
\ No newline at end of file
diff --git a/guide/arabic/ruby/ruby-hash/index.md b/guide/arabic/ruby/ruby-hash/index.md
index fd77569391..83d7525bee 100644
--- a/guide/arabic/ruby/ruby-hash/index.md
+++ b/guide/arabic/ruby/ruby-hash/index.md
@@ -6,33 +6,39 @@ localeTitle: روبي هاش
تمثل التجزئة مجموعة من أزواج القيم الرئيسية المميزة. ويسمى أيضا المصفوفات الترابطية. لإنشاء تجزئة في Ruby ، استخدم الأقواس المتعرجة وفصل كل زوج من قيم المفاتيح باستخدام الفاصلة.
- `my_hash = {:key1 => "value", :key2 => "value2"}
-`
+```ruby
+my_hash = {:key1 => "value", :key2 => "value2"}
+```
يمكنك إنشاء تجزئة بالطرق التالية
- `my_hash = Hash.new # with empty hash
- my_hash = {:key1 => "value", :key2 => "value2"} # with key's and value's defined
-`
+```ruby
+my_hash = Hash.new # with empty hash
+my_hash = {:key1 => "value", :key2 => "value2"} # with key's and value's defined
+```
يمكنك الوصول إلى قيمة المفتاح في تجزئة مع الأقواس المربعة والمراجع الرئيسية
- `my_hash[:key1] # value
- my_hash[:key2] # value2
-`
+```ruby
+my_hash[:key1] # value
+my_hash[:key2] # value2
+```
يمكنك تعيين مفتاح جديد وقيمة لتجزئة محددة بالفعل
- `my_hash[:key3] = "value3" # {:key1=>"value", :key2=>"value2", :key3=>"value3"}
-`
+```ruby
+my_hash[:key3] = "value3" # {:key1=>"value", :key2=>"value2", :key3=>"value3"}
+```
يمكنك التحقق من عدد عناصر التجزئة في طريقة `length` :
- `my_hash.length # 2
-`
+```ruby
+my_hash.length # 2
+```
يمكنك أيضًا إنشاء أعداد صحيحة كمفتاح هاش ، لكن بناء الجملة يختلف عن الصيغة المعتادة
- `my_hash = {1: "value"} # will raise an exception
- my_hash = {1 => "value"} # will create hash with corresponding key value pair
-`
\ No newline at end of file
+```ruby
+my_hash = {1: "value"} # will raise an exception
+my_hash = {1 => "value"} # will create hash with corresponding key value pair
+```
\ No newline at end of file
diff --git a/guide/arabic/ruby/ruby-hashes/index.md b/guide/arabic/ruby/ruby-hashes/index.md
index 7d0d9d3445..403e5989b9 100644
--- a/guide/arabic/ruby/ruby-hashes/index.md
+++ b/guide/arabic/ruby/ruby-hashes/index.md
@@ -6,42 +6,48 @@ localeTitle: روبي هاشز
التجزئة هي مجموعة من المفاتيح والقيم. يشبه ما يسمى عادةً قاموسًا بلغات أخرى. في روبي ، تشبه التجزئة [صفيفًا](https://raw.githubusercontent.com/freeCodeCamp/guides/master/src/pages/ruby/ruby-arrays/index.md) ، ولكن بدلاً من تخزين قيمة تخزن زوجًا رئيسيًا ذا قيمة.
- `array = ["value"]
- hash = { "key" => "value" }
-`
+```ruby
+array = ["value"]
+hash = { "key" => "value" }
+```
هناك طريقتان مختلفتان لإنشاء تجزئة جديدة:
- `hash1 = {a: 100, b: "200"}
- hash2 = Hash.new
- hash3 = Hash.new(0) # with default value set to 0
-`
+```ruby
+hash1 = {a: 100, b: "200"}
+hash2 = Hash.new
+hash3 = Hash.new(0) # with default value set to 0
+```
يمكن للمبرمج بعد ذلك الوصول إلى قيمة تجزئة باستخدام مفتاحه ، بدلاً من الفهرس.
- `array[0] # => "value"
- hash["key"] # => "value"
-`
+```ruby
+array[0] # => "value"
+hash["key"] # => "value"
+```
وبهذه الطريقة ، يعمل تجزئة مثل القاموس حيث يمكنك البحث عن قيمة من خلال مفتاحه.
- `dictionary = { "Aardvark" => "a large, nocturnal, burrowing mammal",
- "Zyzzyva" => "a genus of tropical weevils" }
- dictionary["Aardvark"] # => "a large, nocturnal, burrowing mammal"
- dictionary["Zyzzyva"] # => "a genus of tropical weevils"
-`
+```ruby
+dictionary = { "Aardvark" => "a large, nocturnal, burrowing mammal",
+ "Zyzzyva" => "a genus of tropical weevils" }
+dictionary["Aardvark"] # => "a large, nocturnal, burrowing mammal"
+dictionary["Zyzzyva"] # => "a genus of tropical weevils"
+```
يمكنك أيضًا إنشاء تجزئة باستخدام [الرموز](#) كمفاتيح.
- `hash = { :symbol => "value" }
- hash[:symbol] # => "value"
-`
+```ruby
+hash = { :symbol => "value" }
+hash[:symbol] # => "value"
+```
بالإضافة إلى ذلك ، إذا كانت جميع المفاتيح الخاصة بك هي [رموز](#) ، فيمكنك كتابة التجزئة في هذا التنسيق البديل ، ولكن يمكنك الوصول إليها بنفس الطريقة:
- `hash = { symbol: "value" }
- hash[:symbol] # => "value"
-`
+```ruby
+hash = { symbol: "value" }
+hash[:symbol] # => "value"
+```
#### معلومات اكثر:
diff --git a/guide/arabic/ruby/ruby-methods/index.md b/guide/arabic/ruby/ruby-methods/index.md
index b361b4f1d9..5dbf360af6 100644
--- a/guide/arabic/ruby/ruby-methods/index.md
+++ b/guide/arabic/ruby/ruby-methods/index.md
@@ -16,24 +16,27 @@ localeTitle: طرق روبي
#### طريقة بسيطة
- `def my_method
- code goes here
- end
-`
+```
+def my_method
+ code goes here
+end
+```
#### معلمة قبول الطريقة
- `def my_method (param1, param2)
- param1 + param2
- end
-`
+```
+def my_method (param1, param2)
+ param1 + param2
+end
+```
#### طريقة paramter المعرفة مسبقًا (تُستخدم المعلمات المحددة مسبقًا عند عدم تقديم أي منها)
- `def my_method (param1 = parameter1, param2 = parameter2)
- parm1 + parm2
- end
-`
+```
+def my_method (param1 = parameter1, param2 = parameter2)
+ parm1 + parm2
+end
+```
## العودة في أساليب
diff --git a/guide/arabic/ruby/ruby-on-rails/index.md b/guide/arabic/ruby/ruby-on-rails/index.md
index b0be3c05d1..b49f319b74 100644
--- a/guide/arabic/ruby/ruby-on-rails/index.md
+++ b/guide/arabic/ruby/ruby-on-rails/index.md
@@ -10,8 +10,9 @@ localeTitle: روبي على القضبان
يتم تنزيل القضبان بنفس الطريقة مثل أي جوهرة روبي أخرى: باستخدام الأمر `gem install` . قبل تنزيله ، سنحتاج إلى [تنزيل Ruby](https://www.ruby-lang.org) . بعد ذلك ، نحن على بعد 3 كلمات فقط من بداية روبي أون ريلز:
- `$ gem install rails
-`
+```shell
+$ gem install rails
+```
## إعداد قاعدة البيانات
@@ -21,31 +22,36 @@ localeTitle: روبي على القضبان
1. بعد تثبيت Ruby on Rails ، من السهل جدًا إنشاء تطبيق جديد تمامًا ، سنحتاج إلى 3 كلمات أخرى:
- `$ rails new your_application_name
-`
+```shell
+$ rails new your_application_name
+```
* إذا كنت ترغب في استخدام MySQL `shell $ rails new -d mysql`
* إذا كنت ترغب في استخدام بوستجرس `shell $ rails new -d postgresql`
1. سيقوم هذا الأمر بإنشاء مجلد _باسم _التطبيق_ الخاص بك_ الذي أبلغته في الأمر الأخير. الخطوة التالية هي الانتقال إلى الدليل الجديد الذي أنشأته للتو:
- `$ cd your_application_name
-`
+```shell
+$ cd your_application_name
+```
3. احصل على الجواهر والحزم اللازمة قبل تشغيل التطبيق الخاص بك:
- `$ bundle install
-`
+```shell
+$ bundle install
+```
4. لتشغيل خادم سكك الحديد ومعرفة ما إذا كان كل شيء يسير على هذا النحو سريعًا أيضًا:
- `$ rails server
-`
+```shell
+$ rails server
+```
لا يمكن أن يكون الأمر بسيطا بعد الآن! حسنًا ، هذا ليس صحيحًا بنسبة 100٪ ، يمكننا جعله أصغر من خلال تقليل أمر `rails server` إلى:
- `$ rails s
-`
+```shell
+$ rails s
+```
5. الآن ، مع المتصفح المفضل لديك ، انتقل إلى `http://localhost:3000` وستشاهد: "Yay! أنت على القضبان!"
diff --git a/guide/arabic/ruby/ruby-string-interpolation/index.md b/guide/arabic/ruby/ruby-string-interpolation/index.md
index e602f5c7db..acd19ce3dd 100644
--- a/guide/arabic/ruby/ruby-string-interpolation/index.md
+++ b/guide/arabic/ruby/ruby-string-interpolation/index.md
@@ -6,22 +6,25 @@ localeTitle: روبي السلسلة الاستيفاء
يوفر الاستيفاء سلسلة صيغة أكثر قابلية للقراءة وموجزة لبناء السلاسل. قد تكون على دراية بالتسلسل عبر الطرق `+` أو `<<` :
- `"Hello " + "World!" #=> Hello World
- "Hello " << "World!" #=> Hello World
-`
+```ruby
+"Hello " + "World!" #=> Hello World
+"Hello " << "World!" #=> Hello World
+```
يوفر الاستيفاء سلسلة طريقة لتضمين رمز Ruby مباشرة في سلسلة:
- `place = "World"
- "Hello #{place}!" #=> Hello World!
-
- "4 + 4 is #{4 + 4}" #=> 4 + 4 is 8
-`
+```ruby
+place = "World"
+"Hello #{place}!" #=> Hello World!
+
+"4 + 4 is #{4 + 4}" #=> 4 + 4 is 8
+```
يتم تقييم كل شيء بين `#{` و `}` برمز روبي. للقيام بذلك ، يجب أن يكون محاطًا بالسلسلة علامات اقتباس مزدوجة ( `"` ).
ستقوم علامات الاقتباس المفردة بإرجاع السلسلة الصحيحة داخل علامات الاقتباس:
- `place = "World"
- 'Hello #{place}!' #=> Hello #{place}!
-`
\ No newline at end of file
+```ruby
+place = "World"
+'Hello #{place}!' #=> Hello #{place}!
+```
\ No newline at end of file
diff --git a/guide/arabic/ruby/ruby-string-methods/index.md b/guide/arabic/ruby/ruby-string-methods/index.md
index ea91c648a0..29961d957e 100644
--- a/guide/arabic/ruby/ruby-string-methods/index.md
+++ b/guide/arabic/ruby/ruby-string-methods/index.md
@@ -92,8 +92,9 @@ _لاحظ أن الحرف الأول يتم تكبيره فقط إذا كان ف
* يستبدل `gsub` كل مرجع للمعلمة الأولى للمعلمة الثانية في سلسلة.
- `"ruby is cool".gsub("cool", "very cool") #=> "ruby is very cool"
-`
+```ruby
+"ruby is cool".gsub("cool", "very cool") #=> "ruby is very cool"
+```
* يقبل `gsub` أيضًا الأنماط (مثل _regexp_ ) كمعلمة أولى ، مما يسمح بأشياء مثل:
diff --git a/guide/arabic/ruby/ruby-symbols/index.md b/guide/arabic/ruby/ruby-symbols/index.md
index ee4d500d1a..7bd78b5a71 100644
--- a/guide/arabic/ruby/ruby-symbols/index.md
+++ b/guide/arabic/ruby/ruby-symbols/index.md
@@ -10,22 +10,23 @@ localeTitle: روبي الرموز
على سبيل المثال: إذا كان Fred ثابتًا في سياق واحد ، وطريقة في أخرى ، وفئة في الثلث ، فسيكون الرمز: Fred هو نفس الكائن في جميع السياقات الثلاثة.
- `module One
- class Fred
- end
- $f1 = :Fred
- end
- module Two
- Fred = 1
- $f2 = :Fred
- end
- def Fred()
- end
- $f3 = :Fred
- $f1.object_id #=> 2514190
- $f2.object_id #=> 2514190
- $f3.object_id #=> 2514190
-`
+```ruby
+module One
+ class Fred
+ end
+ $f1 = :Fred
+end
+module Two
+ Fred = 1
+ $f2 = :Fred
+end
+def Fred()
+end
+$f3 = :Fred
+$f1.object_id #=> 2514190
+$f2.object_id #=> 2514190
+$f3.object_id #=> 2514190
+```
## العمل مع الرموز
@@ -33,31 +34,34 @@ localeTitle: روبي الرموز
حتى الآن رأيناهم كمفتاح في هاش (العمل مع الزنانير في روبي):
- `person = {:name => "Philip"}
-`
+```ruby
+person = {:name => "Philip"}
+```
لذا ، فإن أول شيء يمكننا القيام به هو فحص الرمز لمعرفة الفئة التي يستخدمها:
- `:hello.class
- => Symbol
-
- "hello".class
- => String
-`
+```ruby
+:hello.class
+=> Symbol
+
+"hello".class
+=> String
+```
حتى يمكننا أن نرى أن الرموز والسلاسل هي أمثلة لكائنين مختلفين.
يمكنك الاتصال بأساليب شبيهة `upcase` ، مثل `upcase` ، و `downcase` ، `capitalize` الرموز:
- `:hello.upcase
- => :HELLO
-
- :HELLO.downcase
- => :hello
-
- :hello.capitalize
- => :Hello
-`
+```ruby
+:hello.upcase
+=> :HELLO
+
+:HELLO.downcase
+=> :hello
+
+:hello.capitalize
+=> :Hello
+```
## لماذا تستخدم رمزًا بدلاً من سلسلة؟
@@ -89,16 +93,17 @@ localeTitle: روبي الرموز
فمثلا:
- `philip".object_id
- => 70288511587360
- "philip".object_id
- => 70288504327720
-
- :philip.object_id
- => 539368
- :philip.object_id
- => 539368
-`
+```ruby
+philip".object_id
+=> 70288511587360
+"philip".object_id
+=> 70288504327720
+
+:philip.object_id
+=> 539368
+:philip.object_id
+=> 539368
+```
عند إنشاء كائنين سلسلة بنفس القيمة ، يتم التعامل مع هذين العنصرين ككائنين مختلفين. عند إنشاء رمز ، سيستخدم الرجوع إلى الرمز دائمًا نفس الكائن.
@@ -108,14 +113,15 @@ localeTitle: روبي الرموز
all\_symbols => نقر المصفوفة لتبديل المصدر لإرجاع مجموعة من الرموز الموجودة حاليًا في جدول رمز Ruby.
- `Symbol.all_symbols.size #=> 903
- Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
- :chown, :EOFError, :$;, :String,
- :LOCK_SH, :"setuid?", :$<,
- :default_proc, :compact, :extend,
- :Tms, :getwd, :$=, :ThreadGroup,
- :wait2, :$>]
-`
+```ruby
+Symbol.all_symbols.size #=> 903
+Symbol.all_symbols[1,20] #=> [:floor, :ARGV, :Binding, :symlink,
+ :chown, :EOFError, :$;, :String,
+ :LOCK_SH, :"setuid?", :$<,
+ :default_proc, :compact, :extend,
+ :Tms, :getwd, :$=, :ThreadGroup,
+ :wait2, :$>]
+```
#### معلومات اكثر:
diff --git a/guide/arabic/rust/hello-world/index.md b/guide/arabic/rust/hello-world/index.md
index e7b7ac58df..b17b6e9989 100644
--- a/guide/arabic/rust/hello-world/index.md
+++ b/guide/arabic/rust/hello-world/index.md
@@ -8,10 +8,11 @@ localeTitle: مرحبا بالعالم
بعد إنشاء `main.rs` ، قم بإضافة التعليمة البرمجية التالية داخل:
- `fn main() {
- println!("Hello, world!");
- }
-`
+```rust
+fn main() {
+ println!("Hello, world!");
+}
+```
نجاح باهر كان ذلك سهلاً ، أليس كذلك؟ داخل الملف `main.rs` الجديد ، ما يلي صحيح:
@@ -20,14 +21,16 @@ localeTitle: مرحبا بالعالم
لتنفيذ البرنامج ، يجب عليك أولاً تجميعه:
- `$ rustc main.rs
-`
+```bash
+$ rustc main.rs
+```
ستقوم هذه العملية بإنشاء ملف قابل للتنفيذ في نفس الدليل ، والذي يمكنك بعد ذلك تشغيله:
- `$ ./main
- Hello, world!
-`
+```bash
+$ ./main
+Hello, world!
+```
تهانينا! لقد كتبت للتو برنامج الصدأ الخاص بك!
diff --git a/guide/arabic/rust/index.md b/guide/arabic/rust/index.md
index c167d5d8af..3880104ad5 100644
--- a/guide/arabic/rust/index.md
+++ b/guide/arabic/rust/index.md
@@ -20,8 +20,9 @@ Rust هي لغة برمجة أنظمة تركز على ثلاثة أهداف: ا
إذا كنت تستخدم نظام التشغيل Linux أو Mac ، فمن الأفضل إجراء عملية تثبيت `rustup` من خلال المحطة الطرفية:
- `$ curl https://sh.rustup.rs -sSf | sh
-`
+```bash
+$ curl https://sh.rustup.rs -sSf | sh
+```
سيقوم هذا بتنزيل وتشغيل برنامج نصي على جهازك يقوم بتثبيت الأداة. يضيف برنامج التثبيت تلقائيًا خاصية Rust إلى نظام `PATH` بعد تسجيل الدخول التالي.
@@ -33,8 +34,9 @@ Rust هي لغة برمجة أنظمة تركز على ثلاثة أهداف: ا
بمجرد تثبيت `rustup` ، يكون التحديث إلى إصدارات أحدث بسيطًا. كل ما تحتاجه للتشغيل هو:
- `$ rustup update
-`
+```bash
+$ rustup update
+```
لعرض رقم الإصدار الحالي ، والتزام التجزئة ، وتاريخ التزام مترجم الصدأ ، قم بتشغيل الأمر التالي:
@@ -46,5 +48,6 @@ Rust هي لغة برمجة أنظمة تركز على ثلاثة أهداف: ا
إلغاء تثبيت الصدأ من النظام سهل كما هو مثبت عليه:
- `$ rustup self uninstall
-`
\ No newline at end of file
+```bash
+$ rustup self uninstall
+```
\ No newline at end of file
diff --git a/guide/arabic/rust/loops/index.md b/guide/arabic/rust/loops/index.md
index dfae1d80b8..a936024ffc 100644
--- a/guide/arabic/rust/loops/index.md
+++ b/guide/arabic/rust/loops/index.md
@@ -12,12 +12,13 @@ localeTitle: الحلقات
في ما يلي مثال على برنامج باستخدام `loop` لطباعة الكلمة "مرة أخرى" باستمرار إلى المحطة:
- `fn main() {
- loop {
- println!("again!");
- }
- }
-`
+```rust
+fn main() {
+ loop {
+ println!("again!");
+ }
+}
+```
## حلقات شرطية مع `while`
@@ -25,15 +26,16 @@ localeTitle: الحلقات
في ما يلي مثال لبرنامج يستخدم `while` العد التنازلي من 5:
- `fn main() {
- let mut number = 5;
-
- while number != 0 {
- println!("{}", number);
- number = number - 1;
- }
- }
-`
+```rust
+fn main() {
+ let mut number = 5;
+
+ while number != 0 {
+ println!("{}", number);
+ number = number - 1;
+ }
+}
+```
قم بتشغيل الكود [هنا](https://play.rust-lang.org/?gist=62677371a8590be27c84dcae7068de57&version=stable) .
@@ -43,14 +45,15 @@ localeTitle: الحلقات
هنا هو برنامج سبيل المثال أن يطبع كل رقم في صفيف إلى المحطة باستخدام `for` :
- `fn main() {
- let collection = [15, 7, 2, 6, 9];
-
- for element in collection.iter() {
- println!("the value is: {}", element);
- }
- }
-`
+```rust
+fn main() {
+ let collection = [15, 7, 2, 6, 9];
+
+ for element in collection.iter() {
+ println!("the value is: {}", element);
+ }
+}
+```
قم بتشغيل الكود [هنا](https://play.rust-lang.org/?gist=0c2acf21b96a81ebd411e4a7dc5a19fd&version=stable) .
diff --git a/guide/arabic/security/oauth2/index.md b/guide/arabic/security/oauth2/index.md
index 1047bd61fb..8fd35264a5 100644
--- a/guide/arabic/security/oauth2/index.md
+++ b/guide/arabic/security/oauth2/index.md
@@ -64,42 +64,46 @@ localeTitle: بروتوكول OAuth2
طلب تفويض
- `GET /oauth2/authorize?response_type=code
- &client_id=client123&scope=profile
- &redirect_uri=https://client.com/callback HTTP/1.1
- Host: auth.server.com
-`
+```
+GET /oauth2/authorize?response_type=code
+&client_id=client123&scope=profile
+&redirect_uri=https://client.com/callback HTTP/1.1
+Host: auth.server.com
+```
- `HTTP/1.1 302 Found
- Location: https://client.com/callback#code=sb8s6doy9bsd9sd&state=abcde
-`
+```
+HTTP/1.1 302 Found
+Location: https://client.com/callback#code=sb8s6doy9bsd9sd&state=abcde
+```
بعد تلقي رمز التفويض ، تقديم طلب خادم التفويض مع رمز ،
- `POST /oauth2/token HTTP/1.1
- Host: auth.server.com
- Content-Type: application/x-www-form-urlencoded
-
- grant_type=authorization_code
- &code=sb8s6doy9bsd9sd
- &redirect_uri=https://client.com/callback
- &client_id=client123
- &client_secret=secret
- &scope=profile
-`
+```
+POST /oauth2/token HTTP/1.1
+Host: auth.server.com
+Content-Type: application/x-www-form-urlencoded
+
+grant_type=authorization_code
+&code=sb8s6doy9bsd9sd
+&redirect_uri=https://client.com/callback
+&client_id=client123
+&client_secret=secret
+&scope=profile
+```
استجابة
- `HTTP/1.1 200 OK
- Content-Type: application/json;charset=UTF-8
- Cache-Control: no-store
- Pragma: no-cache
- {
- "access_token":"gsi8d6fosb9d6fos6df",
- "token_type":"bearer",
- "expires_in":3600
- }
-`
+```
+HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Cache-Control: no-store
+Pragma: no-cache
+{
+ "access_token":"gsi8d6fosb9d6fos6df",
+ "token_type":"bearer",
+ "expires_in":3600
+}
+```
#### التدفق الضمني
@@ -115,15 +119,17 @@ localeTitle: بروتوكول OAuth2
نموذج الكود:
- `GET /oauth2/authorize?response_type=token
- &client_id=client123
- &redirect_uri=https://client.com/callback HTTP/1.1
- Host: auth.server.com
-`
+```
+GET /oauth2/authorize?response_type=token
+&client_id=client123
+&redirect_uri=https://client.com/callback HTTP/1.1
+Host: auth.server.com
+```
- `HTTP/1.1 302 Found
- Location: https://client.com/callback#access_token=98y2b38&token_type=bearer&expires_in=3600&state=abcde
-`
+```
+HTTP/1.1 302 Found
+Location: https://client.com/callback#access_token=98y2b38&token_type=bearer&expires_in=3600&state=abcde
+```
#### بيانات اعتماد مالك المورد
@@ -139,14 +145,15 @@ localeTitle: بروتوكول OAuth2
نموذج الكود:
- `POST /oauth2/token HTTP/1.1
- Host: auth.server.com
- Content-Type: application/x-www-form-urlencoded
-
- grant_type=password
- &username=john
- &password=abcde
-`
+```
+POST /oauth2/token HTTP/1.1
+Host: auth.server.com
+Content-Type: application/x-www-form-urlencoded
+
+grant_type=password
+&username=john
+&password=abcde
+```
#### بيانات اعتماد العميل التدفق
@@ -162,14 +169,15 @@ localeTitle: بروتوكول OAuth2
نموذج الكود:
- `POST /oauth2/token HTTP/1.1
- Host: auth.server.com
- Content-Type: application/x-www-form-urlencoded
-
- grant_type=client_credentials
- &client_id=client123
- &client_secret=xyz123
-`
+```
+POST /oauth2/token HTTP/1.1
+Host: auth.server.com
+Content-Type: application/x-www-form-urlencoded
+
+grant_type=client_credentials
+&client_id=client123
+&client_secret=xyz123
+```
### المراجع
diff --git a/guide/arabic/security/query-parameterization/index.md b/guide/arabic/security/query-parameterization/index.md
index b4335f7075..908bce6e52 100644
--- a/guide/arabic/security/query-parameterization/index.md
+++ b/guide/arabic/security/query-parameterization/index.md
@@ -12,33 +12,36 @@ _(يتم كتابة القصاصات التالية في C # لـ MySQL ، لك
### المشكلة
- `public void RetrieveEmployeeInfo(string username)
- {
- using (var connection = new MySqlConnection("valid_connection_string"))
- {
- var query = "SELECT * FROM EMPLOYEES WHERE USERNAME = '" + username + "'";
-
- using (var command = new MySqlCommand(query, connection))
- {
- var reader = command.ExecuteReader();
- while (reader.Read())
- {
- // do something with the results of your query, like display the employee
- }
- }
- }
- }
-`
+```csharp
+public void RetrieveEmployeeInfo(string username)
+{
+ using (var connection = new MySqlConnection("valid_connection_string"))
+ {
+ var query = "SELECT * FROM EMPLOYEES WHERE USERNAME = '" + username + "'";
+
+ using (var command = new MySqlCommand(query, connection))
+ {
+ var reader = command.ExecuteReader();
+ while (reader.Read())
+ {
+ // do something with the results of your query, like display the employee
+ }
+ }
+ }
+}
+```
للوهلة الأولى ، قد يبدو ذلك غير مؤذٍ. إذا قام المستخدم بكتابة "JDOE" في برنامجك ، وتم تمريره إلى هذه الوظيفة ، فسوف ينتهي بك الأمر تنفيذ استعلام كالتالي:
- `SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE';
-`
+```sql
+SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE';
+```
تصبح المشكلة أكثر وضوحًا عندما تفكر في ما يحدث إذا _لم يقم_ المستخدم بكتابة ما تتوقعه. ماذا لو `JDOE'; DROP TABLE EMPLOYEES; --` شيئًا مثل `JDOE'; DROP TABLE EMPLOYEES; --` ؟ تبدو سلسلة "طلب البحث" الآن مثل هذه ، والتي ستحدد معلومات الموظف ، ثم تحذف جدول EMPLOYEES بأكمله!
- `SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE'; DROP TABLE EMPLOYEES; --'
-`
+```sql
+SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE'; DROP TABLE EMPLOYEES; --'
+```
### الحل
@@ -66,7 +69,8 @@ _(يتم كتابة القصاصات التالية في C # لـ MySQL ، لك
الآن ما يحدث إذا كان المستخدم `JDOE'; DROP TABLE EMPLOYEES; --` في `JDOE'; DROP TABLE EMPLOYEES; --` ؟ وينتهي برنامجنا بتنفيذ استعلام مثل هذا ، والعثور على أي موظف اسمه الحقيقي يطابق هذا الإدخال ، ببساطة إرجاع أية سجلات.
- `SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE\'; DROP TABLE EMPLOYEES; --'
-`
+```sql
+SELECT * FROM EMPLOYEES WHERE USERNAME = 'JDOE\'; DROP TABLE EMPLOYEES; --'
+```
بغض النظر عن اللغة أو قاعدة البيانات التي تستخدمها ، إذا كنت تفكر في الاستعلام عن قاعدة البيانات باستخدام مدخلات المستخدم ، فتحقق من الوثائق لمعرفة الطريقة المناسبة لإضفاء طابع المعلمة على الاستعلامات.
\ No newline at end of file
diff --git a/guide/arabic/security/scanning/index.md b/guide/arabic/security/scanning/index.md
index 1d5618b147..11f84ac6e7 100644
--- a/guide/arabic/security/scanning/index.md
+++ b/guide/arabic/security/scanning/index.md
@@ -45,23 +45,25 @@ localeTitle: مسح
فمثلا:
- `ping -c
- ping 10.10.0.1 -c 4
-`
+```
+ping -c
+ping 10.10.0.1 -c 4
+```
إذا كان النظام الهدف على قيد الحياة ، يجب أن تحصل على رد ظهر يبدو مشابهاً أدناه.
- `Pinging 10.10.0.1 with 32 bytes of data:
-
- Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
- Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
- Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
- Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
- Ping statistics for 10.10.0.1:
- Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
- Approximate round trip times in milliseconds:
- Minimum = 26ms, Maximum = 26ms, Average = 26ms
-`
+```
+Pinging 10.10.0.1 with 32 bytes of data:
+
+Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
+Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
+Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
+Reply from 10.0.0.1: bytes=32 time=26ms TTL=240
+Ping statistics for 10.10.0.1:
+ Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
+Approximate round trip times in milliseconds:
+ Minimum = 26ms, Maximum = 26ms, Average = 26ms
+```
* يشير **الرد من** أن حزمة طلب ارتداد ICMP الخاصة بنا قد تم استلامها في حزمة رد ICMP Echo تم إرسالها مرة أخرى.
* **Bytes = 32** يخبرنا أن حجم الحزمة التي تم إرسالها.
diff --git a/guide/arabic/security/steganography/index.md b/guide/arabic/security/steganography/index.md
index 912ee7b628..f71a70fa8f 100644
--- a/guide/arabic/security/steganography/index.md
+++ b/guide/arabic/security/steganography/index.md
@@ -20,11 +20,12 @@ localeTitle: إخفاء المعلومات
قد يبدأ بشيء مثل:
- `10010101 00001101 11001001
- 10010110 00001111 11001010
- 10011111 00010000 11001011
- ...
-`
+```
+10010101 00001101 11001001
+10010110 00001111 11001010
+10011111 00010000 11001011
+...
+```
ويطلق على أبسط طريقة لإخفاء البيانات داخل ملف الصورة إدخالاً بتات أقل دلالة (LSB). في هذه الطريقة ، يمكننا أخذ التمثيل الثنائي _للبيانات_ المخفية _والكتابة فوق LSB لكل بايت داخل_ صورة _الغلاف_ . إذا كنا نستخدم ألوان 24 بت ، فإن مقدار التغيير سيكون ضئيلاً ولا يمكن تمييزه عن العين البشرية.
diff --git a/guide/arabic/semantic-ui/index.md b/guide/arabic/semantic-ui/index.md
index 8ea97b626c..00649bcf40 100644
--- a/guide/arabic/semantic-ui/index.md
+++ b/guide/arabic/semantic-ui/index.md
@@ -62,28 +62,31 @@ UI الدلالي `1.x` صدر لأول مرة في نوفمبر 2014 مع كس
في دليل المشروع الخاص بك ، قم بتثبيت gulp عالميًا باستخدام npm
- `npm install -g gulp
-`
+```
+npm install -g gulp
+```
تثبيت واجهة المستخدم الدلالية
- `npm install semantic-ui --save
- cd semantic/
- gulp build
-`
+```
+npm install semantic-ui --save
+cd semantic/
+gulp build
+```
تضمين في HTML
- `
-
-
-
-`
+```html
+
+
+
+```
تحديث عن طريق npm
- `npm update
-`
+```
+npm update
+```
3. **التكامل مع الأطر الأخرى**
diff --git a/guide/arabic/semantic-ui/semantic-ui-buttons/index.md b/guide/arabic/semantic-ui/semantic-ui-buttons/index.md
index fc213c8820..826ed596cf 100644
--- a/guide/arabic/semantic-ui/semantic-ui-buttons/index.md
+++ b/guide/arabic/semantic-ui/semantic-ui-buttons/index.md
@@ -16,15 +16,17 @@ localeTitle: أزرار واجهة المستخدم الدلالية
معيار واجهة المستخدم الدلالي زر
- `
-`
+```
+
+```
* التركيز على زر
زر مع مستوى مختلف من التركيز
- `