اذهب إلى المحتوى

E.Nourddine

الأعضاء
  • المساهمات

    1458
  • تاريخ الانضمام

  • تاريخ آخر زيارة

  • عدد الأيام التي تصدر بها

    18

كل منشورات العضو E.Nourddine

  1. هناك العديد من الطرق التي تجعلك تحصل على نفس الشكل بنفس المظهر من أسهلها وأكثرها استعمالا Smooth لتحصل على المظهر: من خلال نافذة Modifier Added غير في إعدادات الشكل كما توضح الصورة: هذا الفيديو للاستئناس به:
  2. Vertex وَ Edge هي المكونات الأساسية للمجسمات على برنامج Blender بل وعلى باقي البرامج المتخصصة في بناء 3D كـ 3D Max، حيث أن Vertex هي نقط التقاء الخطوط لتشكل بذلك أحد أهم المكونات والتي يمكن التحكم فيها حسب الضرورة، بينما Edge هي كل خط يربط بين عنصرين من Vertex. كإجابة عن سؤالك المتعلق بتحويل مجسم إلى أملس: سنفعل الخاصية Smooth لإعطاء تأثير الشكل الأملس: حيث يمكننا تفعيل الخاصية Smooth من خلال القائمة Properties Panel > Data: لنحصل على الشكل النهائي -أملس المظهر-:
  3. ليس بالضرورة عرض المقال كاملاً في بداية الأمر، يمكن إرفاق رابط لتتمة القراءة، حتى يتمكن المستخدم من ولوج صفحة المقال كاملا إن هو أراد ذلك -أعجبته المقدمة-، مع عدم إدراج ترقيم للصفحات، لأن ذلك ينقص من فعالية التصفح- في حالة المقال الواحد-، وإنما يجب التصفح من خلال فقرات المقال، على أن تضم كل صفحة فقرتين أو ثلاث، ليتم الانتقال إلى الفقرات المُوالية. والحل الأمثل من وجهة نظري هو إظهار محتوى المقال مع نزول الصفحة بعملية scroll، حيث يولّد المحتوى تلقائيا كلما اتجهنا نحو الأسف، وهذا يزيد أيضا من فعالية الموقع، حيث تستعمل تقنية ajax وهنا مما يمنح الموقع سعة في الموارد وعدم استخدامها بشكل كلي، واستغلال الذاكرة في أمور أخرى غير تخزين المقالات ذات الطول الكبير.
  4. يمكنك استعمال إضافة Share Buttons التي تمكنك من إضافة أزرار المشاركة، وبعد التثبيت والتفعيل، يمكنك اختيار ما تريد إضافته، بعد ذلك اضف الكود التالي إلى الصفحة المعنية بهذه الأزرار: <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ? الكود يجب أن يكون هكذا: <?php the_excerpt(); ?> <?php if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?>
  5. صمم كذلك لأسباب عدة، من بينها: الحماية: الزر لا يتحكم فقط بـ Wifi بل وبجميع طرق الاتصال اللاسلكية كـ Bluetooth،3G... وبالتالي فجعل الزر على Off يؤكد حماية وأمان الحاسوب من أي اتصال غير آمن، واختراق من أي جهة كيفما كانت. البطارية: يعتبر الزر متحكما في wifi بل أيضا في الجهاز المسؤول عن ذلك، مما يتيح توفير الكهرباء الموجود بالبطارية في حال عدم الاشتغال بأي من الاتصالات اللاسلكية المذكورة. قوانين على متن الطائرة: تنص قوانين ركوب الطائرة بوجوب توفر الأجهزة المحمولة على زر خارجي للتأكد من عدم تشغيل مثل هذه الاتصالات على مثنها، ذلك أنها تؤثر سلبا على عمل المركبة، مما يدفع المضيفات إلى تذكير المسافرين بذلك.
  6. من الجيد أن تبدو الرسائل الموجهة للمستخدم محترمة أكثر فأكثر، لأن ذلك يعكس طريقة تفكير إدارة الموقع وليس المبرمج، و بهذه الطريقة وإذا ما وجهنا إليه -المستخدم- كلمة اعتذار عن خطأ في نظام الموقع بشكل جيد وغير مبالغ فيه، نُظهر مدى احترامنا للمستخدم، الذي يعتبر غايتنا الأولى عند إنشاء الموقع. وهذه بعض النصائح المُتبعة في كتابة رسالة خطأ جيدة: تخلص من لغة التكنلوجيا الصارمة كـ' غير متوافق' 'غير مسموح'تجنب الكلمات السلبية.تحديد واضح ومبيّن للخطأ.إعطاء المستخدم إشارة تبين له كيفية حل المشكل.إرجاع سبب الخطأ للنظام -نظام الموقع- وليس للمستخدم.
  7. تصميم المؤشر مأخوذ من VLSI-81-1_The_Optical_Mouse.pdf، حيث أن المؤشر أُخترع من قبل Douglas Engelbart، وكان في بادئ الأمر عبارة عن سهم مرتفع، كما تبين الصورة: وعند بناء آلة XEROX PAR، حيث كانت الشاشات آنذاك يصعب التحديد بالمؤشر، اضطر إلى إمالته بزاية °45 للتحديد بدقة أكثر. السبب في إمالة المؤشر هو الدقة، للتحديد بدقة أكثر.
  8. باعتبار أن لدينا عنصر XElement يمكننا استخراج العقد الموجودة بداخله -أبناءه- Children باستعمال: string[] names = xElem.Elements().Select(e => e.Name.LocalName).ToArray();كمثال، ملف xml المُرفق في سؤالك، سيكون الجواب عليه: public static MyXExtensions { public static string[] ChildrenNames(this XElement xElem) { return xElem.Elements().Select(e => e.Name.LocalName).ToArray(); } } string[] names1 = xDoc.Root.ChildrenNames(); string[] names2 = xDoc.Root.Element("AChau").ChildrenNames(); string[] names3 = xDoc.XPathSelectElement("Location/AChau/ACity").ChildrenNames();لنحصل على النتائج التالية، وهي عبارة عن مصفوفات بها قيم ملف xml: ["AChau"] ["ACity", "BCity"] ["EHouse", "FHouse", "GHouse"]
  9. نعم يمكنك ذلك، عن طريق استعمال xsd.exe بهذه الطريقة : D:\temp>xsd test.xml Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation. All rights reserved. Writing file 'D:\temp\test.xsd'. D:\temp>xsd test.xsd /classes Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation. All rights reserved. Writing file 'D:\temp\test.cs'.
  10. يمكنك استعمال إحدى هذه الدوال، التي تسمح لك بالحصول على اسم الآلة -اسم الحاسوب -Machine Name: مثال بـ: 'System.Net.Dns.GetHostName': ' using System.Net; using System.Net.NetworkInformation; //... public static string GetFQDN() { string domainName = IPGlobalProperties.GetIPGlobalProperties().DomainName; string hostName = Dns.GetHostName(); domainName = "." + domainName; if(!hostName.EndsWith(domainName)) // name غير ضمني بـ hostnameفي حال كان { hostName += domainName; } return hostName; // nameارجاع }System.Environment.MachineNameHttpContext.Current.Server.MachineNameSystem.Net.Dns.GetHostName
  11. في ملف config.xml اضف التعديلات التالية: <global> <blocks> <adminhtml> <rewrite> <sales_order_view>Namespace_Module_Block_Adminhtml_Sales_Order_View</sales_order_view> </rewrite> </adminhtml> </blocks> </global>ثم من خلال ملف : "Namespace/Module/Block/Adminhtml/Sales/Order/View.php"، سنضيف كود الأزرار: class Namespace_Module_Block_Adminhtml_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View { public function __construct() { parent::__construct(); $this->_addButton('button_id', array( 'label' => Mage::helper('xxx')->__('Some action'), 'onclick' => 'jsfunction(this.id)', 'class' => 'go' ), 0, 100, 'header', 'header'); } }
  12. من خلال الرابط يمكن إيجاد هذا الحل: $formattedPrice = Mage::helper('core')->currency($_finalPrice,true,false); // أو $formattedPrice = Mage::helper('core')->formatPrice($_finalPrice, false) ولاستخراج الثمن دون رمز العملة: Mage::getModel('directory/currency')->formatTxt($_finalPrice, array('display' => Zend_Currency::NO_SYMBOL));
  13. نجد في الملف : "app/code/core/Mage/Page/Block/Html/Header.php": public function getWelcome() { if (empty($this->_data['welcome'])) { if (Mage::app()->isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) { $this->_data['welcome'] = $this->__('Welcome, %s!', Mage::getSingleton('customer/session')->getCustomer()->getName()); } else { $this->_data['welcome'] = Mage::getStoreConfig('design/header/welcome'); } } return $this->_data['welcome']; }حيث أنّ ()Mage::getSingleton('customer/session')->getCustomer تجلب لنا المستخدم الحالي للتطبيق. وللحصول على المستخدم المتصل الآن بحساب مدير الموقع Admin، نستعمل: Mage::getSingleton('admin/session')->getUser();
  14. يمكنك استعمال هذه الخصائص داخل السكريبت: Varien_Db_Ddl_Table هذا الكلاس لإنشاء جدول جديد على قاعدة البيانات.مثال: /* @var $this Mage_Core_Model_Resource_Setup */ $table = new Varien_Db_Ddl_Table(); $table->setName($this->getTable('module/table')); $table->addColumn('id', Varien_Db_Ddl_Table::TYPE_INT, 10, array('unsigned' => true, 'primary' => true)); $table->addColumn('name', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255); $table->addIndex('name', 'name'); $table->setOption('type', 'InnoDB'); $table->setOption('charset', 'utf8'); $this->getConnection()->createTable($table);استعمل ()this->getConnection$ لربط الاتصال بقاعدة البيانات. بعض الوظائف: addColumn() إضافة حقل.addConstraint() إضافة Constraint.addKey() إضافة مفتاح Key.dropColumn() حذف حقل.modifyColumn تغيير حقل.جمعتها هنا كلّها: addColumn() method adds new column to exiting table. It has such parameters: $tableName - the table name that should be modified $columnName- the name of the column, that should be added $definition - definition of the column (INT(10), DECIMAL(12,4), etc) addConstraint() method creates a new constraint foreign key. It has such parameters $fkName - the foreing key name, should be unique per database, if you don't specify FK_ prefix, it will be added automaticaly $tableName - the table name for adding a foreign key $columnName - the column name that should be refered to another table, if you have complex foreign key, use comma to specify more than one column $refTableName - the foreign table name, wich will be handled $refColumnName - the column name(s) in the foreign table $onDelete - action on row removing in the foreign table. Can be empty string (do nothing), cascade, set null. This field is optional, and if it is not specified, cascade value will be used. $onUpdate action on row key updating in the foreign table. Can be empty string (do nothing), cascade, set null. This field is optional, and if it is not specified, cascade value will be used. $purge - a flag for enabling cleaning of the rows after foreign key adding (e.g. remove the recodrs that are not referenced) addKey() method is used for adding of indexes to a table. It has such parameters: $tableName - the table name where the index should be added $indexName - the index name $fields - column name(s) used in the index $indexType - type of the index. Possible values are: index, unique, primary, fulltext. This parameter is optional, so the default value is index dropColumn() method is used for removing of columns from the existing table. It has such parameters: $tableName - the table name that should be modified $columnName- the name of the column, that should removed dropForeignKey() method is used for removing of foreing keys. It has such parameters: $tableName - the table name for removing a foreign key $fkName - the foreing key name dropKey() method is used for removing of the table indexes. It has such parameters: $tableName - the table name where the index should be removed $keyName - the index name modifyColumn method is used to modify existing column in the table. It has such parameters: $tableName - the table name that should be modified $columnName- the name of the column, that should be renamed $definition - a new definition of the column (INT(10), DECIMAL(12,4), etc) changeColumn method is used to modify and rename existing column in the table. It has such parameters: $tableName - the table name that should be modified $oldColumnName- the old name of the column, that should be renamed and modified $newColumnName- a new name of the column $definition - a new definition of the column (INT(10), DECIMAL(12,4), etc) changeTableEngine method is used to change table engine, from MyISAM to InnoDB for instance. It has such parameters: $tableName - the table name $engine - new engine name (MEMORY, MyISAM, InnoDB, etc)
  15. عند استعمال : System > Configuration > Advanced > Disable لا يبطل مفعول Module، لأنه يبقى مستمراً في العمل، فقط جزء Output يبطل عن العمل.وعند ملاحظة abstract class Mage_Core_Block_Abstract داخل الملف: final public function toHtml() { Mage::dispatchEvent('core_block_abstract_to_html_before', array('block' => $this)); if (Mage::getStoreConfig('advanced/modules_disable_output/' . $this->getModuleName())) { return ''; } }عند استعمال app/etc/modules يبطل مفعول Module كلياً.
  16. من خلال الموقع الرسمي لـ Gimp الخاصة بـ Edit > Stroke Selection: The Stroke Selection command strokes a selection in the image. There are two ways you can stroke the selection, either by using a paint tool or without using one. This means that the selection border, which is emphasized in the image with a dotted line, can be drawn with a stroke. There are various options which you can use to specify how this stroke should look.وخلاصة الشرح أنه يمكن إنشاء إطار متقطع للصور أو الأشكال بالطريقة التالية: ننشئ طبقة .تحديد جزء مربع الشكل . نذهب إلى القائمة Edit > Stroke Selection ثم نعين عرض الإطار: لنحصل في آخر الأمر على إطار بالشكل المرغوب به.
  17. يبقى برنامج photoshop شبه محدود بالمقارنة مع Illustrator أو Blender في كل ما يتعلق بالرسم و3D، لكنه يتيح أيضا بعض الأدوات التي تمكّنك من رسم أشكال ثلاثية الأبعاد، مثل الموجودة في الصور: حاولت إدراج مكعبين باللونين المذكورين في سؤالك (الأحمر و الأزرق): الشكل الثاني:
  18. من خلال القائمة Select->Color Range، قم بتحديد اللون المرغوب بإزالته. كما يمكن تحديد اللون من خلال القائمة المُنسدلة. كما يجب أن تكون قيمة Fuzziness مساوية للصفر 0. بعد ذلك في حال ضغطت على الزر Shift مع تحديد اللون سيتبين أماكن وجود اللون على الصورة. تمكنك هذه النافذة من إخفاء اللون، أوالتغيير في إعداداته على الصورة. https://www.youtube.com/watch?v=6MMxn9u6R8I
  19. نستعمل خصائص الدمج Option fusion: كما يمكن فعل ذلك عن طريق فصل طبقة الظل:
  20. برنامج Illustrator يوفر هذه الإمكانية بسهولة، بينما على Photoshop عليك باتباع الخطوات التالية: قم برسم خط عمودي أو أفقي وانسخه.حدد الخط المنسوخ.سنستعمل تقنية التغيير الحر على الشكل Free Transform وندخل قيمة الزاوية بالدرجة.لنحصل في الأخير على زاوية بالمقاس المرغوب به.تقدم الصورة المُتحركة التالية الخطوات السالفة الذكر بشكل أوضح:
  21. عند تشغيل الملف التجريبي التالي: \documentclass{article} \usepackage{lmodern} \begin{document} \showoutput $n=2$ \end{document}ستلاحظ في ملف log التالي: ....\mathon ....\OML/lmm/m/it/10 n ....\glue(\thickmuskip) 2.77771 plus 2.77771 ....\OT1/lmr/m/n/10 = ....\penalty 500 ....\glue(\thickmuskip) 2.77771 plus 2.77771 ....\OT1/lmr/m/n/10 2 ....\mathoffستلاحظ استعمال OML/lmm/m/it/10\ وَOT1/lmr/m/n/10\ وهما خطين مختلفين تم استعمالهما معاً. وهذا الأمر لإظهار نوع الخط المستعمل في الوثيقة: cat $(kpsewhich omllmm.fd)ستُظهر لنا التالي: % This file belongs to the Latin Modern package. The work is released % under the GUST Font License. See the MANIFEST-Latin-Modern.txt and % README-Latin-Modern.txt files for the details. For the most recent version of % this license see http://www.gust.org.pl/fonts/licenses/GUST-FONT-LICENSE.txt % or http://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt \ProvidesFile{omllmm.fd}[2009/10/30 v1.6 Font defs for Latin Modern] \DeclareFontFamily{OML}{lmm}{\skewchar\font127 } \DeclareFontShape{OML}{lmm}{m}{it}% {<-5.5> lmmi5 <5.5-6.5> lmmi6 <6.5-7.5> lmmi7 <7.5-8.5> lmmi8 <8.5-9.5> lmmi9 <9.5-11> lmmi10 <11-> lmmi12 }{} \DeclareFontShape{OML}{lmm}{b}{it}{% <-6> lmmib5 <6-8> lmmib7 <8-> lmmib10 }{} \DeclareFontShape{OML}{lmm}{bx}{it}% {<->ssub*lmm/b/it}{} \endinputلاحظ {OML}{m}{it}، ثم lmmi10 التي يُقصد بها حجم الخط. ولتبين خصائص الخط: cat $(kpsewhich ot1lmr.fd)لنحصل على: \DeclareFontShape{OT1}{lmr}{m}{n}% {<-5.5> rm-lmr5 <5.5-6.5> rm-lmr6 <6.5-7.5> rm-lmr7 <7.5-8.5> rm-lmr8 <8.5-9.5> rm-lmr9 <9.5-11> rm-lmr10 <11-15> rm-lmr12 <15-> rm-lmr17 }{}الخط المستعمل في المعادلات هو : rm-lmr10.
  22. المشكلة في خلط tkz مع tikz. التنسيق very thin مخصص لـ pgflinewidth\، وtkz-euclide تحدد قيمة size على pgflinewidth\. الوصول إلى النتيجة المرغوب فيها باتباع الخطوات: نرسم جميع الخطوط بـ {tikzset{thin\ لإعادة تعيين قيم pgflinewidth\.نحدد تنسيق جديد، abssize والذي يستعمل قيم افتراضية بقيمة 0.4pt.\documentclass{article} \usepackage{tkz-euclide} \usetkzobj{all} \pgfkeys{ /drawpoint/.cd, abssize/.code = { \tikzset{ point style/.append style={ minimum size = #1*0.4pt } } }, } \begin{document} \begin{tikzpicture} \tkzDefPoints{0/0/o,1/0/a,-1/0/b} \tkzDrawPoints[fill=white, size=8](o,a) \tkzDrawLine[very thin](a,b) \end{tikzpicture} \begin{tikzpicture} \tkzDefPoints{0/0/o,1/0/a,-1/0/b} \tkzDrawLine[very thin](a,b) \tikzset{thin} \tkzDrawPoints[fill=white, size=8](o,a) \end{tikzpicture} \begin{tikzpicture} \tkzDefPoints{0/0/o,1/0/a,-1/0/b} \tkzDrawLine[very thin](a,b) \tkzDrawPoints[fill=white, size=16](o,a) \end{tikzpicture} \begin{tikzpicture} \tkzDefPoints{0/0/o,1/0/a,-1/0/b} \tkzDrawLine[very thin](a,b) \tkzDrawPoints[fill=white, abssize=8](o,a) \end{tikzpicture} \end{document}ليكون الشكل النهائي:
  23. حمّل أولًا حزمة textcomp واستعملها ضمن موارد الوثيقة للحصول على مظهر أكثر تناسقاً لرمز Copyright، كما تُستعمل نفس الحزمة لرسم الخطوط، بهذه الطريقة : \documentclass{article} \usepackage{helvet} \usepackage{textcomp} \usepackage[T1]{fontenc} \begin{document} \textcircled{c}~\textcopyright~\textsf{\textcircled{c}~\textcopyright} \end{document}
  24. هناك حل باستعمال حزمة TiKZ، وذلك باستخدام الجدول matrix/ ووضع محتواه متوسطا للخانات عن طريق 0pt، مع استعمال أسهم موجهة نحو القيم الموجودة بالجدول، ثم رسم إطار جدول بشكل عريض، بهذه الطريقة: \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{arrows,matrix,positioning} \begin{document} \begin{tikzpicture}[>=stealth'] \matrix (tape) [matrix of math nodes, inner sep=0pt, nodes={draw, inner sep=3pt, fill=blue!40, outer sep=0pt}, column sep=-\pgflinewidth, inner sep=0pt] {a_1 & o_1 & a_2 & o_2 & a_3 & o_3 & a_4 & o_4 & a_5 & o_5 \\}; \node[draw, minimum width=12mm, above = 6mm of tape-1-5.north east, fill=blue!40] (P) {\rule{0cm}{1cm}P}; \node[draw, minimum width=12mm, below = 6mm of tape-1-5.south east, fill=blue!40] (Q) {\rule{0cm}{1cm}Q}; \draw[<-, shorten <=-2pt] (tape-1-5.north)--(tape-1-5|-P.south); \draw[->, shorten >=-2pt] (tape-1-5.south)--(tape-1-5|-Q.north); \draw[->, shorten >=-2pt] (tape-1-6.north)--(tape-1-6|-P.south); \draw[<-, shorten <=-2pt] (tape-1-6.south)--(tape-1-6|-Q.north); \draw[shorten <=-1mm, shorten >=-1mm] ([xshift=2mm]tape-1-10.north east) to [bend left] ([xshift=2mm]tape-1-10.east) to [bend right] ([xshift=2mm]tape-1-10.south east); \draw[shorten <=-1mm, shorten >=-1mm] ([xshift=3mm]tape-1-10.north east) to [bend left] ([xshift=3mm]tape-1-10.east) to [bend right] ([xshift=3mm]tape-1-10.south east); \draw[fill=blue!40] (tape-1-10.north east)--([xshift=2mm]tape-1-10.north east) to [bend left] ([xshift=2mm]tape-1-10.east) to [bend right] ([xshift=2mm]tape-1-10.south east)--(tape-1-10.south east)--cycle; \draw[thick] ([xshift=2mm]tape-1-10.north east)-|(tape-1-1.west)|-([xshift=2mm]tape-1-10.south east); \end{tikzpicture} \end{document}لتكون النتيجة بالشكل التالي:
  25. باستعمال مكتبة usetikzlibrary سنحاول استعمال طريقة أخرى للوصول إلى النتيجة المُرتقبة، بهذه الشيفرة: \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \tikzstyle{bordered} = [draw,thick,inner sep=5,minimum size=10,minimum width=100,font=\sffamily] \tikzstyle{arrow} = [thick,-latex,font=\sffamily] \node [] (init) {}; \node [bordered,below=of init] (image) {App Image}; \node [bordered,below=of image] (running) {Running Container}; \node [bordered,below=of running] (stopped) {Persisted Container}; \draw [arrow] (init) -- (image) node [midway,right] {Install}; \draw [arrow] (image) -- (running) node [midway,right] {Start}; \draw [arrow] (running) -- (stopped) node [midway,right] {Terminate or Kill}; \draw [arrow] ($(stopped.west)+(0,2pt)$) -- ++(-1em,0) -- ($(running.west)+(-1em,0)$) node [midway,right] {Start} -- (running.west); \draw [arrow] ($(stopped.west)+(0,-2pt)$) -- ++(-2em,0) -- ($(image.west)+(-2em,0)$) node [midway,left] {Reset} -- (image.west) ; \end{tikzpicture} \end{document}وذلك من أجل جعل المسافة الفاصلة بين العقد، وكذا ربطها بخط به سهم، كما توضح هذه الصورة:
×
×
  • أضف...