في هذا القسم ، أريد إضافة فكرة المتغيرات إلى الكود. متغير في الكمبيوتر هو مثل مربع. لذلك ، هنا ، إذا كان لدي رمز مثل هذا حيث أنا قل x يساوي 7 ، فاصلة منقوطة ، ماذا يعني ذلك هناك مربع في الكمبيوتر المسمى x ، كما قلت رسم هنا ، وهذا يخزن فقط 7 في هذا المربع. أو يمكننا تخزين أي قيمة أردناها. ثم في وقت لاحق في الكود ، إذا كان x يظهر ، الكمبيوتر يعرف استخدام 7 أو ما أضعه هناك. في الواقع ، يصبح المتغير نوعا من ، اختصار مناسب لأي قيمة أريد استخدامها. لذلك اسمحوا لي أن أريك كيف يعمل هذا بشكل نموذجي في CS101. سيكون لدي خط مثل هذا ، x يساوي 7 ، بحيث يضع فقط 7 في المربع. ثم في السطور اللاحقة ، سأستخدم هذا المتغير. لذلك سأقول ، هنا يقول print x أو محظوظ x أو في الواقع ، x هو x. لذلك اسمحوا لي أن أحاول تشغيل ذلك. وما تراه هو 7 فقط يظهر هنا لأن أي المكان الذي استخدمته x ، يقوم الكمبيوتر بسحب القيمة من الصندوق. هذا يجعلها مريحة للتغيير. لذلك على سبيل المثال ، إذا قمت بتغيير هذا إلى 4x يساوي 42 وتشغيله ، والآن 42 يظهر في كل مكان. أو يعمل للسلاسل أيضا. أستطيع أن أقول x يساوي اقتباس مرحبا اقتباس ، و تشغيله ، ونحن نحصل على كل شيء من خلال هناك. أود أن أذكر هذا الاستخدام للمساوين في الكمبيوتر فقط يضع قيمة في المربع. هذه هي الطريقة الوحيدة التي سنستخدمها بها. في الرياضيات ، علامة المساواة لها مختلفة ، ونوع من ، أقوى معنى. في الرياضيات ، تعني علامة المساواة أن القيمتين متساويتان في جميع الأوقات ، وهذا ليس ما يعنيه في الكمبيوتر. في هذا الاستخدام ، إنه أبسط ، فقط قم بتعيين القيمة في المربع. لذلك اسمحوا لي أن أحاول اسمحوا لي أن أعمل هذه المشكلة الصغيرة. هذا يقول أنك تعرف ، اكتب رمزًا لإنتاج هذا الإخراج ، أليس أليس أليس ، كان لي سحق أليس. وتقول ، نفعل ذلك بطريقة نحن يمكن تغيير الاسم بسهولة شديدة ، لذلك استخدم متغير. أضع رمزًا صغيرًا هنا لبدء فقط لتذكيرك بالصيغة ، لكن ، هذا لا يفعل أي شيء مثلنا ، نريد نريد ، لذلك سوف إصلاحه. لذا ، سأقول x يساوي اقتباس أليس. ثم في الداخل ، سأقول فقط x ، x. X سيحاول فقط ، هذا ليس حلاً كاملاً ، سنحاول ذلك أثناء تقدمنا. لذلك إذا قمت بتشغيل هذا ، صحيح ، سنحصل على أليس الثلاثة ثم أتيحت لي هذا ، كان لدي شيء رائع. لذلك أقول اقتباس الطباعة ، كان لي سحق ، فاصلة وسأقول ، س. بهذه الطريقة ، سوف تستخدم فقط كل ما لدينا في المربع هناك. لذلك إذا قمت بتشغيل هذا ، حسنًا ، يبدو ذلك صحيحًا. ثم هذا لديه ، الميزة المطلوبة أنه إذا لقد غيرت هذا لأحب ، إذا قلت x يساوي Zoe في الجزء العلوي ، ثم يقول Zoe فقط ، أو يمكنني قل ، أنت تعرف ، بوب أو أي شيء ، أو كما تعلم ، بلي ، دعنا نقول. ثم ، فإنه يظهر فقط كل [غير مسموع]. وهذا يدل على هذا النوع من الطبيعة المختصرة للمتغيرات وهذه هي الطريقة التي سنستخدمها في CS101. لذلك ، هذه هي كيفية استخدام المتغيرات في التعليمات البرمجية ، لذا جربها بنفسك الآن في التمارين. In this section, I want to add the idea of variables to code. A variable in the computer is sort of like a box. So, here, if I have code like this where I say x is equal to 7, semicolon, what that means is there's a box in the computer labeled x, as I've drawn here, and this just stores a 7 into that box. Or we could store any value we wanted. Then later in the code, if wherever an x appears, the computer knows to use 7 or whatever it is I put in there. So in effect, the variable becomes sort of a, a convenient shorthand for whatever value I want to use. So let me show you how this is going to work in typically in CS101. I'll have a line like this, x equals 7, so that just puts a 7 in the box. And then on the later lines, I will use that variable. So I'll say, here it says print x or lucky x or actually, x is x. So let me just try running that. And what you see is the 7 just shows up through here because any place I used x, the computer is pulling the value out of the box. This makes it convenient to change. So for example, if I change this to 4x equals 42 and run it, now the 42 shows up all over the place. Or works for strings too. I could say x equals quote hi quote, and run it, and we get the hi all through there. I should mention this use of equals to in the computer just puts a value in the box. That's the only way we are going to use it. In mathematics, the equals sign has a different, and kind of a, a stronger meaning. In mathematics, the equals sign means the two values are the same at all times, and that is not what it means in the computer. In, in this use it is a simpler, just assign value into box. So let me try let me work this little problem. So this says you know, write code to produce this output, Alice Alice Alice, I had a crush on Alice. And it says, do it in a way that we can change the name very easily, so use a variable. I put a little code here to start just to remind you of the syntax, but it, this doesn't do anything like we, want we wanted, so I'll fix it. So, I'm going to say x is equal to quote Alice. And then inside here, I'll just say x, x. X will just try, this is not a complete solution, we'll just try it as we go. So if I run that, right, we get the three Alices and then I had this, I had a crush on thing. So I'll say print quote, I had a crush on, comma and I'll say, x. So that way, it'll just use whatever we had in the box there. So if I run that, all right, that looks right. And then this has the, the the desired feature that if I changed this to like, if I just say x equals Zoe at the top, then it just says Zoe, or I could say, you know, Bob or whatever, or you know, bleh, let's say. Then like, it just shows up all [INAUDIBLE]. So this shows those kind of shorthand nature of variables and that's the way we're going to use them in CS101. So, that's how to use variables in code, so try it yourself now in the exercises. متغيرات الرمز في هذا القسم ، أريد إضافة فكرة المتغيرات في التعليمات البرمجية. يشبه "المتغير" المربع الذي يحمل قيمة س = 7 ؛ هذا يخزن القيمة 7 في المتغير (أي المربع) × في وقت لاحق س في رمز استرداد القيمة من المربع يصبح x اختصارًا لـ 7 (كل ما في الصندوق) باستخدام = بهذه الطريقة يسمى "الواجب المتغير" المتغير x كصندوق يحمل القيمة 7 المتغيرات في CS101 كيف نستخدم المتغيرات في CS101: -تخصيص قيمة إلى متغير مرة واحدة - ثم استخدم هذا المتغير عدة مرات أدناه اختصار مناسب في الكود س = 7 ؛ طباعة (خ)؛ print ("lucky"، x)؛ print ("x is"، x)؛ التجارب: حاول تعيين (=) هذه القيم إلى x: 8 ، "مرحبًا" تخزين قيمة مرة واحدة ، واستخدامها على عدة أسطر ، وتوفير التكرار = في الجبر مختلف ، شيئان متساويان إلى الأبد = في الكود بسيط ، فقط يضع قيمة في صندوق عند التشغيل تعمل المتغيرات بمثابة اختصار - نحن = نقوم بتعيين قيمة إلى متغير ، ثم نستخدم هذا المتغير في خطوط لاحقة لاسترداد تلك القيمة. في أبسط الحالات ، يعمل هذا فقط لتجنب تكرار قيمة: نقوم بتخزين القيمة مرة واحدة ، ثم يمكننا استخدامها عدة مرات. جميع لغات الكمبيوتر لديها شكل من أشكال المتغير مثل - تخزين واسترجاع القيم. مثال التعليمات البرمجية - لعنة قم بتغيير الكود أدناه بحيث ينتج المخرجات التالية. استخدم متغير لتخزين السلسلة "Alice" في متغير في السطر الأول مثل س = "أليس" ؛ ، ثم استخدم المتغير x على الأسطر اللاحقة. بهذه الطريقة ، يؤدي تغيير السطر الأول فقط إلى استخدام القيمة "Bob" أو "Zoe" أو أي شيء يغير ناتج البرنامج بالكامل. أليس أليس أليس كان لدي سحق أليس طباعة (1 ، 2 ، "مرحبا") ؛ عرض الحل التالي: هذا رمز مع المتغيرات ، والآن يمكنك تجربة ذلك. Code Variables In this section, I want to add the idea of variables in code. A "variable" is like a box that holds a value x = 7; This stores the value 7 into the variable (i.e. box) x Later x in the code retrieve the value from the box x becomes a shorthand for 7 (whatever is in the box) Using = in this way is called "variable assignment" variable x as a box holding the value 7 Variables in CS101 How we use variables in CS101: -Assign a value into a variable once -Then use that variable many times below A convenient shorthand in the code x = 7; print(x); print("lucky", x); print("x is", x); Experiments: try assigning (=) these values to x: 8, "hi" Store a value once, use it on several lines, saving repetition = in algebra is different, two things are equal forever = in code is simple, just puts a value in a box when run Variables work as a shorthand -- we = assign a value into a variable, and then use that variable on later lines to retrieve that value. In the simplest case, this just works to avoid repeating a value: we store the value once, and then can use it many times. All computer languages have some form of variable like this -- storing and retrieving values. Code Example - The Curse Change the code below so it produces the following output. Use a variable to store the string "Alice" in a variable on the first line like x = "Alice"; , then use the variable x on the later lines. In this way, changing just the first line to use the value "Bob" or "Zoe" or whatever changes the output of the whole program. Alice Alice Alice I had a crush on Alice print(1, 2, "hi"); Show Solution Next: that's code with variables, now you try it. أنت في الجولة الأخيرة من المقابلات الوظيفية لشغل وظيفة اتصال في شركة جديدة في مجال التكنولوجيا تركز على الأجهزة التي يمكن ارتداؤها والتي تتعقب نومك. تريد حقا الوظيفة. هذا هو البريد الإلكتروني الذي تلقيته قبل ثلاثة أيام من الشركة: "تهانينا! لقد استمتعنا بلقائك ونسمع عن خلفيتك التعليمية وإنجازاتك وخبراتك العملية. الآن ، نود أن نقدم لك للقاء مؤسس الشركة ، وكذلك نائب رئيس الاتصالات. نظرًا لأن الموقف يتطلب منك التواصل مع مجموعة متنوعة من الأشخاص - المستثمرين والعملاء ، وما إلى ذلك ، نود أن نرى مهارات الاتصال الخاصة بك في العمل. يرجى إعداد قصة عن نفسك. " لديك طريقتان يمكنك إكمال هذه المهمة (اختر واحدة فقط): (مستحسن) أشجعك على إنشاء مقطع فيديو مدته 3-4 دقائق لإكمال هذه المهمة. تظاهر أنك في مقابلة العمل ، وقد طُلب منك فقط سرد قصتك. فكر في من هو جمهورك في هذا السيناريو وما هو غرضك. يجب أن تعكس قصتك هذه الأهداف. يجب أن يكون صحيحا ويجب أن يكون قصتك. لا تستخدم الملاحظات. يجب أن تتحدث على الفور. ملاحظة: للحصول على إرشادات حول كيفية إنشاء الفيديو الخاص بك وتحميله ومشاركته ، يرجى زيارة صفحة تعليمات الفيديو الخاصة بنا. انشر الرابط الخاص بمقطع الفيديو الخاص بك في مربع نص التقديم أدناه. أنشئ بريدًا إلكترونيًا مكتوبًا للمؤسس يستجيب لهذه المطالبة. لا يوجد عدد الكلمات ؛ استخدم كمية الكلمات اللازمة للرد بشكل مناسب على ما يُطلب منك. لا تقلق بشأن تنسيق البريد الإلكتروني أو الترحيب ، وما إلى ذلك. فكر في من هو جمهورك في هذا السيناريو وما هو غرضك. يجب أن تعكس قصتك هذه الأهداف. يجب أن يكون صحيحا ويجب أن يكون قصتك. قم بتحميل بريدك الإلكتروني المكتوب كملف PDF في منطقة التقديم أدناه. راجع نموذج تقييم الدرجات هذا لفهم كيفية تصنيفك لهذا التقييم. يرجى التأكد من أنك قرأت إرشادات الواجب بعناية وأنك ترسل المهمة الصحيحة الموضحة في مخطط الدورة التدريبية. عدم تقديم الواجب الصحيح سيؤدي إلى درجة الصفر. علق عزف الموسيقى] مارليز سيلفر سويني: ماندي ، شكرا لك الكثير لأخذ الوقت ليكون هنا اليوم. ماندي لين كاسترون: نعم. أنه من دواعي سروري. مارليز سيلفر سويني: ولدي اعتراف لك قبل أن نبدأ. أنا معجب كبير بعملك. ماندي لين كاسترون: شكرًا لك. MARLISSE SILVER SWEENEY: أنا في الواقع قارئ منتظم من عمود "الحب الحديث". وأنا في ممارسة googling دائما المؤلف بعد أن قرأت. ماندي لين كاسترون: أوه. هذا جيد. مارليز سيلفر سويني: نعم. أنا إما فضولي حقًا أو فضولي ، اعتمادًا على كيفية تأطيرها. وعندما قرأت أول قطعة كتبتها لهذا العمود ، "الأسئلة الـ 36 التي تؤدي إلى الحب ،" غوغل لك. ورأيت أنك تدرس في جامعة كولومبيا البريطانية ، وأنت تعيش في فانكوفر. وكنت أعلم أنني يجب أن أجد ذريعة لمقابلتك واختيارها عقلك حول رواية القصص. ماندي لين كاترون: أحب ذلك. مارليس سيلفر سويني: شكرًا لك. ماندي لين كاسترون: نعم. مارليز سيلفر سويني: وأردت فعلاً أن أبدأ بهذه القطعة لأنه كان فقط هذا التأثير الهائل ، دوليا. لذلك كان ، ليس فقط "الحب الحديث" العمود الأكثر قراءة ومشاركة ، وهذا عمود شائع حقًا في صحيفة نيويورك تايمز ، لكنها كانت القطعة الأكثر شعبية في صحيفة نيويورك تايمز ، مثل ، واحدة من القطع الأكثر شعبية في ذلك العام. أوه ، كما حفزت المشاريع. لذلك كان هناك تطبيق تم إنشاؤه منه. ماندي لين كاسترون: كان هناك ، مثل ، ثمانية تطبيقات. لا أدري، لا أعرف. كان هناك واحد ، نعم. لقد كان جنونيا. MARLISSE SILVER SWEENEY: A podcast الموسيقية أنا فقط أكتب عن - ماندي لين كاسترون: نعم. أنا لم أستمع إلى ذلك حتى الآن. مارليز سيلفر سويني: وهكذا أردت أن أعرف منك ، ما رأيك حول قصتك أن الناس على اتصال مع ذلك بعمق؟ ماندي لين كاترون: مم-هم. بلى. من الواضح أنني قضيت الكثير من الوقت في التفكير حول هذا لأنني بالتأكيد لم أكن على استعداد للرد أن العمود حصل. كنت أعرف أنه مكان شائع لنشر شيء ما ، ولكن لم يكن لدي أي فكرة عن مدى قوة الاستجابة. لذلك بشكل أساسي ، لدي بعض النظريات. نظريتي الأكبر هي أني أعتقد أن الحب جذاب بطبيعته للناس كموضوع ، والحب الرومانسي. وأعتقد أن العمود ، في حد ذاته ، في الأساس يقترح أن أهم شيء عن الحب - ما أعتقد أنه أكثر الأشياء قيمة في الحب هو شعور عميق ومتفهم من قبل شخص آخر. وأعتقد أن العمود-- ليس العمود ، حتى ، ولكن 36 سؤالا ، الدراسة النفسية أن العمود يصف نوع من المقترحة أن هناك طريقة لتوليد هذا النوع من التقارب مع شخص آخر وأنه من المرجح حقا أن تعمل. وبالتالي أعتقد أن هذا الاحتمال لأنني أعتقد أنه أمر مخيف أن أقول لشخص غريب ، مهلا ، أريدك أن تعرف أعمق التفاصيل الحميمة في حياتي. لكنني أعتقد أنها سهلة ومريحة للغاية ، نسبيا ، أن أقول لشخص ما ، مهلا ، قرأت عن هذه الدراسة. هل تريد أن تجربه؟ وأعتقد أن هذا كان جزءًا كبيرًا منه. مارليز سيلفر سويني: تحدثنا قليلاً في هذا حول بنية القصة الكلاسيكية للغاية - المقدمة الذاتية ، المضاعفات ، الحركة الصاعدة ، الذروة ، إلخ. وقرأنا مقالا في التايمز مرة أخرى. وتحدث عن كيفية الشركات ، عندما تستغل هذه القصة الكلاسيكية هيكل واستخدامها في الرسائل الخاصة بهم ، هذه الرسائل صدى بطريقة أقوى مع جماهيرهم من أنواع الاتصالات الأخرى. وأردت أن أعرف أفكارك حول بنية القصة وكيف تعمل معها في عملك. ماندي لين كاسترون: إذن عندما أكتب ، أنا أفكر دائمًا ما هو الشيء الذي أحاول فهمه هنا؟ وفي بعض الأحيان هناك مؤامرات تحدث. لذلك في هذه المقالة ، على سبيل المثال ، هناك هذه السرد الأساسي ، وهو ما قمنا به هذه الدراسة ، وإليك الطريقة التي سارت بها. وأعتقد أن هذه قصة رائعة بطبيعتها. ولكن هناك هذه الرواية الثانوية التي أعتقد ، على الأقل آمل ، هو ما يجعل العمود أكثر جوهرية من مجرد هنا ما حدث ، وهو كيف يمكنني جعل معنى من هذه التجربة؟ ماذا أنا ، كإنسان ، وأيضاً ككاتبة جالسة على مكتبها ، ما الذي أخذه من هذه التجربة؟ هذا هو هذا النوع من التفكير الأكبر كيف غيرت هذه التجربة ما فكرت به في الحب الرومانسي؟ وقد غيّرت حقًا ما فكرت به في الحب الرومانسي. لذلك أعتقد أن هناك هذه ، في قصصي ، على الأقل بالنسبة لي ، خاصةً إذا كان مزيجًا من المذكرات ، السرد الشخصي ، والتفكير ، هناك هي دائما هاتين المؤامرات المتوازية. واحد منهم هو القصة ، مثل ، هنا ما حدث. والآخر هو ، لماذا هذا مثير للاهتمام؟ لذلك القصة والتأمل - وهذا الجزء الثاني هو - أعتقد أن هناك الكثير من القدرات المثيرة للاهتمام لصنع معنى. وأعتقد في النهاية ، لهذا السبب نقرأ السرد الشخصي. لا نريد فقط معرفة ما حدث. نريد أن نعرف لماذا حدث ما حدث للشخص الذي كتب عن ذلك. مارليز سيلفر سويني: نعم. ذلك مثير للاهتمام. لأنني أردت أن أتحدث إليكم قليلاً عن قوة القصة ولماذا أنت MUSIC PLAYING] MARLISSE SILVER SWEENEY: Mandy, thank you so much for taking the time to be here today. MANDY LEN CATRON: Yeah. It's my pleasure. MARLISSE SILVER SWEENEY: And I have a confession for you before we get started. I'm a huge fan of your work. MANDY LEN CATRON: Thank you. MARLISSE SILVER SWEENEY: I'm actually a regular reader of the "Modern Love" column. And I'm in the practice of always googling the author after I read. MANDY LEN CATRON: Oh. That's great. MARLISSE SILVER SWEENEY: Yeah. I'm either really nosy or curious, depending on how you frame it. And when I read the first piece that you wrote for that column, "The 36 Questions That Lead to Love," I googled you. And I saw that you teach at UBC, and you live in Vancouver. And I knew I would have to find an excuse to meet you and pick your brain about storytelling. MANDY LEN CATRON: I love that. MARLISSE SILVER SWEENEY: Thank you. MANDY LEN CATRON: Yeah. MARLISSE SILVER SWEENEY: And I actually wanted to start with that piece because it had just this phenomenal impact, internationally. So it was, not only "Modern Love's" most read and shared column, and that's a really popular column in the New York Times, but it was the most popular piece in The New York Times, like, one of the most popular pieces that year. Oh and it also spurred projects. So there was an app created from it. MANDY LEN CATRON: There were, like, eight apps. I don't know. There were one, yeah. It was crazy. MARLISSE SILVER SWEENEY: A podcast musical I just write about-- MANDY LEN CATRON: Yeah. I haven't listened to that yet. MARLISSE SILVER SWEENEY: And so I wanted to know from you, what do you think it was about your story that people connected with that deeply? MANDY LEN CATRON: Mm-hmm. Yeah. So I have obviously spent a lot of time thinking about this because I was definitely not prepared for the response that the column got. I knew that it's a popular place to publish something, but I just had no idea how strong the response would be. So basically, I have some theories. My biggest theory is that, I think love is inherently appealing to people as a subject, romantic love. And I think that the column, itself, basically suggests that the most valuable thing about love-- what I think to be the most valuable thing about love is feeling deeply known and understood by another person. And I think the column-- not the column, even, but the 36 questions, the psychological study that the column describes sort of suggested that there's a way to generate that kind of closeness with another person and that it is really likely to work. And so I think this possibility that-- because I think it's terrifying to say to a stranger, hey, I want you to know the deepest intimate details of my life. But I think it's very easy and comfortable, relatively, to say to someone, hey, I read about this study. Do you want to try it? And so I think that was a big part of it. MARLISSE SILVER SWEENEY: We talked a little bit in this about the very classic story structure-- self-introduction, complication, rising action, climax, et cetera. And we read an article in The Times again. And it talked about how businesses, when they tap into this classic story structure and use it in their messaging, these messages resonate in a stronger way with their audiences than other types of communication. And I wanted to know your thoughts on story structure and how you work with it in your work. MANDY LEN CATRON: So when I'm writing, I'm always thinking what is the thing that I'm trying to understand here? And sometimes there are then two plots that are happening. So in that article, for example, there's this primary narrative, which is we did this study, and here's how it went. And I think that's a pretty inherently compelling narrative. But there's this secondary narrative that I think, at least I hope, is what makes the column more substantial than simply here's what happened, which is how do I make meaning from this experience? What do I, as a human, but also as a writer sitting at her desk, what do I take away from this experience? So that is this sort of larger reflection on how did this experience change what I thought about romantic love? And it really did change what I thought about romantic love. So I think there are these, in nonfiction, at least for me, especially if it's a blend of memoir, personal narrative, and reflection, there are always these two parallel plots. So one of them is the story, like, here's what happened. And the other one is the, why is this interesting? So the story and the reflection-- and so that second part is-- I think there's a lot of interesting capacity there for making meaning. And I think ultimately, that's why we read personal narrative. We don't just want to know what happened. We want to know why what happened matters to the person who wrote about it. MARLISSE SILVER SWEENEY: Yeah. That's interesting. Because I wanted to talk to you a little bit about the power of story and why you أعتقد أنها وسيلة قوية. ماندي لين كاسترون: مم-هم. بلى. لذلك كتبت هذا الكتاب ، الذي يدور حول قصص الحب. وعندما تكتب عن قصص الحب ، انها حقا مجرد وسيلة لتركيز تفكيري. ولكن كل ما أعتقد أنني أقول عن قصص الحب ربما يكون صحيحًا بالنسبة لمعظم أنواع القصص بشكل عام. ولكن يمكنني التحدث على وجه التحديد إلى قصص الحب ، ويمكننا استقراء ذلك قليلا. لكن في الأساس ، أحد الأشياء التي وجدتها هو - هناك الكثير من الأبحاث المثيرة للاهتمام التي أجراها علماء الأحياء التطورية وعلماء الأعصاب. ربما تحدثتم يا رفاق بالفعل عن بعض الأشياء مثل هذا. ولكن عندما تشاهد ، دعنا نقول ، كوميديا رومانسية - لذلك فإن أفضل مثال على ذلك هو الرقص القذر ، التي شاهدتها كثيرا على مدار حياتي. وهذا هو المثال المفضل لي لأنه حتى على الرغم من أنني أعرف بالضبط ما سيحدث ، ما زلت أجد أنه ممتع للغاية للمشاهدة. وهذه مشكلة مثيرة للاهتمام. ما هو حول هذا السرد الذي يشبه إلى حد ما التقليدية؟ لديها مثل هذه النقاط مؤامرة رومانسية كوميديا مألوفة حقا. انها مثل صبي يلتقي فتاة. هناك بعض العوائق التي تشبه إبعادهم. في حالة الرقص القذر ، إنها طبقة اجتماعية. إنهم ينتمون إلى هذين العالمين المختلفين ، وهم يحاولون الاتصال. انه رائع وجيد في الرقص. هي ليست. ولكن أيضًا ، إنها - هي موظفة في هذا المنتجع ، وهي ضيفة. وهكذا هناك هذه الحواجز المثيرة للاهتمام. وليس فقط أن الكتابة جيدة ، وهو أمر جيد. انها جبني جدا. لكن هذا على الرغم من أننا نعرف أنه سيأتي ، عندما يضرب هذه المختلفة-- عندما ترى يجتمع العشاق ، عندما ترى ضربهم هذه العقبة ، عندما نراهم يتغلبون على العقبة ، ونلتقي معًا لفترة قصيرة - كل هذه لحظات مرضية لأننا ننتظرها. لذلك تشير بعض الأبحاث إلى أن البشر في الأساس هي الأنواع الوحيدة التي لديها هذا الشعور الفطري للرواية ، ونحن مجرد نوع من المولد أو ننمو ، في وقت مبكر جدا في حياتنا ، وهذا الشعور الواضح ما يجعل قصة جيدة. مارليز سيلفر سويني: أوه. ماندي لين كاسترون: نعم ، الأمر الذي أعتقد أنه مثير للاهتمام حقًا. نحن نعرف هذا فقط. هذا من كتاب "رواية القصص" من قبل كاتب يدعى جوناثان Gottschall وهكذا أنا أعتقد أن حجة واحدة هي أن أدمغتنا تنجذب بطبيعتها فقط إلى السرد وأن السرد هي طرق لترميز المعلومات التي نحن ثم استخدم في حياتنا بطرق مختلفة. MARLISSE SILVER SWEENEY: ما هي عملية الكتابة الخاصة بك؟ هل تفكر في كل هذه الهياكل المختلفة ، وماذا يفعل عقلك ، والمؤامرة والحبكة الفرعية ، والعناصر المختلفة؟ أو كيف تبدو عملية الكتابة في الواقع؟ ماندي لين كاسترون: نعم. أنا لا أفكر في هذه الأشياء ، حقا على الإطلاق. أعتقد في بعض الأحيان أفكر في هذه الأشياء في عملية المراجعة. مثل ، أنا تبسيط السرد في عملية المراجعة. عندما أبدأ في كتابة شيء ما ، عادة ما يكون ذلك هناك فكرة تشعر أنها مقنعة بالنسبة لي. وفي كثير من الأحيان ، لا أفهم ذلك تمامًا. وعادةً ، عندما أقول أن هناك هذين السرد المتوازيين - سرد واحد هو ما حدث. 'aetaqid 'anaha wasilat qawiatun. think it is such a powerful medium. MANDY LEN CATRON: Mm-hm. Yeah. So I wrote this book, which is all about love stories. And when you're writing about love stories, it's really just a way of focusing my thinking. But everything that I think I say about love stories is probably true for most kinds of stories in general. But I can speak specifically to love stories, and we can extrapolate from that a little bit. But basically, one of the things that I found is-- there's so there's a lot of interesting research by evolutionary biologists and neuroscientists. Maybe you guys have already talked about some stuff like this. But when you watch, let's say, a romantic comedy-- so my favorite example of this is Dirty Dancing, which I've watched a lot over the course of my life. And it's my favorite example because even though I know exactly what's going to happen, I still find it immensely pleasurable to watch. And so this is an interesting problem. What is it about this narrative that is like fairly conventional? It has like these really familiar romantic comedy plot points. It's like a boy meets girl. There's some obstacle that's like keeping them apart. In the case of Dirty Dancing, it's social class. They come from these two different worlds, and they're trying to connect. He's cool and good at dancing. She's not. But also, she's-- he's staff at this resort, and she's a guest. And so there are these interesting barriers. And it's not just that the writing is good, which it's OK. It's pretty cheesy. But it's that, even though we know it's going to come, still, when it hits these various-- when you see the lovers meet, when you see them hit this obstacle, when we see them overcome the obstacle, and come together briefly-- all of those are gratifying moments because we're waiting for them. So some of the research suggests that, basically, humans are the only species that have this innate sense of narrative, and it we're just sort of born or we grow into, very early in our lives, this clear sense of what makes a good story. MARLISSE SILVER SWEENEY: Oh. MANDY LEN CATRON: Yeah, which I think is really interesting. We just know this. This is from the book, 'The Storytelling Animal' by a writer named Jonathan Gottschall And so I think one argument is that our brains are just inherently attracted to narrative and that narratives are ways of encoding information that we then use in our lives in various ways. MARLISSE SILVER SWEENEY: What's your writing process? Are you thinking about all of these different structure, and what your brain is doing, and the plot and subplot, and the different elements? Or what does your writing process actually look like? MANDY LEN CATRON: Yeah. I am not thinking about those things, really at all. I think sometimes I think about these things in the revision process. Like, I'm streamlining the narrative in the revision process. When I start writing something, it's usually there's an idea that feels compelling to me. And often, I don't fully understand it. And so usually, when I say that there's these two parallel narratives-- one narrative is here's what happened. لذلك عادة ما أعرف ما حدث. من الواضح ، إذا كنت أكتب عن حياتي الخاصة ، فأنا بالتأكيد أعرف ما حدث. لكن السرد الموازي هو لماذا أهتم بما حدث ، أو لماذا يجب أن يهتم أي شخص آخر بما حدث؟ وهذا هو الشيء الذي أشعر أنه يتعين علي في كثير من الأحيان أن أكتب طريقي إليه. لذلك ربما سأبدأ بمشهد أو تجربة. ولكن عادة ، في عملية الكتابة عن تلك التجربة ، انا ذاهب الى مكان ما على طول الطريق ما هو الذي أريد أن أفهم حول هذا الموضوع. لذلك أنا أكتب بشكل أساسي طريقي إلى هذا السؤال ، وهذا هو السبب الذي يجعل هذا الشعور مقنعا؟ ماذا يمكن أن يعلمني عن نفسي ، أو العالم ، أو ماذا يعني أن تكون إنسانًا؟ وبعد ذلك ، بمجرد تحديد هذا السؤال ، يجب علي الإجابة عليه. وهذا لا يعني أنني أحصل دائمًا على إجابة مرضية ، لكنني أفعل ذلك غالبًا. لكنني أعتقد أنه حتى محاولة الإجابة على السؤال تثمر انعكاس للاهتمام. وبعد ذلك ، بمجرد أن حصلت على كل ذلك ، ثم إنها مجرد مسألة النظر إلى قطعة الكتابة ، مثلا ، هناك الكثير من المعلومات هنا. ما لا يخدم القصة. وإذا كان هناك أي شيء لا يخدمها ، ثم أحاول تبسيطه قليلاً. وبالتالي فإن عمود "الحب الحديث" هو 1500 كلمة. كتبت في البداية تلك القطعة ، مثل ، 2800 كلمة. لقد ناضلت حقًا للوصول إلى هناك. مارليز سيلفر سويني: أراهن. هذا نصف القصة. ماندي لين كاسترون: أعرف. أعتقد أنني وصلت إلى حوالي 1700 عندما أرسلتها. والمحرر ، الذي يجيد القيام بذلك ، تخلص من الـ 200 الآخرين ، الذي كنت ممتن جدا ل. مارليس سيلفر سويني: لذلك أردت أن أتحدث عن بعض الوسائط الأخرى أن تتواصل أيضا في. أولاً وقبل كل شيء ، أنت كاتبة ومذكرات. والتهاني على كتابك الذي خرج للتو. لكنك قد أجريت محادثات TED ، وكنت على طن من البرامج التلفزيونية المختلفة ، والإذاعة ، انت تعلم. كيف تتغير روايتك؟ على نوع قناة الاتصال؟ ماندي لين كاترون: هذا سؤال عظيم. أنا ، مثل ، كيف يتغير؟ لذا فإن أحد الأشياء هو ، خاصةً أنني أفكر في التدريس-- لأنني أدرس الطلاب كيفية الكتابة. أحاول دائمًا إقناعهم بأن ما نقوم به في الفصل الدراسي هو مهم وجدير بالاهتمام. وهذا أحد تلك الأشياء التي يسهل إقناع بعض الأشخاص بها ويصعب حقًا إقناع الآخرين. ولذا فإنني دائمًا أعود إلى سؤال "ماذا في ذلك؟" وأحاول دمجها في محاضراتي ، ولكن أيضًا في التعليقات التي أجريتها على أوراقهم ، والتي تشبه السؤال الذي باستمرار يجب أن تسأل نفسك لماذا يجب على أي شخص آخر غيري أن يهتم بهذا؟ وحقا ، إذا فكرت في هاتين الروايتين المتوازيين ، هذا هو السرد الثاني. ما يهم هنا؟ ما هو المهم في هذا؟ MARLISSE SILVER SWEENEY: إذن طلابنا ، في هذه الدورة ، بدأت للتو في التفكير في رواية القصص وكيف يمكنهم دمجها في اتصالاتهم. ما هي أفضل نصيحة لهم بالنسبة لهم؟ ماندي لين كاسترون: حسنًا. لذلك لدي نصيحة جيدة حقا - MARLISSE SILVER SWEENEY: مثالي. ماندي لين كاسترون: - الذي هو في الأساس - أعتقد أن لدينا هذه الفكرة غالبًا ، خاصة عندما نكون البدء في العمل مع السرد أننا نريد القراء لتتعلّق بما سنقول. ولكن هذه أفضل طريقة لجعل شخص ما يرتبط بما نقوله هو أن يبقيها واسعة. والواقع أن عكس ذلك صحيح. لذا كلما كنت أكثر تحديداً ، كلما كانت الكلمات التجريدية محددة بدرجة أكبر تستخدمه ، المشاهد السينمائية الأكثر تحديدًا ، التفاصيل الحية ، الحسية ، وكلما بسهولة شخص آخر يمكن أن يستحضر مهما كان السرد الذي تحاول إنشاؤه لهم ، والأفضل يمكنهم إدراج أنفسهم في القصة. لذلك حتى لو كانت تلك التفاصيل المحددة لا شيء مثل ظروف حياتهم ، ويقول ، لا يزال هناك ، يصبح - أنت تخلق عالماً يصبح أكثر واقعية بالنسبة لهم. لذلك أعتقد أن أكبر شيء يمكنك القيام به هو باستمرار يخطئ في جانب مثل حية ، ملموسة ، محددة ، وتجنب أي شيء من هذا القبيل غامضة ، مجردة ، أي شيء من هذا القبيل. مارليز سيلفر سويني: حسنًا. الخرسانة. محدد. ماندي لين كاسترون: نعم. مارليز سيلفر سويني: وسؤالي الأخير هو ، ما هو شعورك بالنسبة لك لتكون موضوع هذه القصة التي اكتسبت الكثير من الاهتمام؟ ماندي لين كاترون: كان غريبًا حقًا. أنت تعرف ، لقد كنت نوعا من التحقيق قصص الحب في هذه الطريقة الحاسمة الصارمة لمدة خمس سنوات ، في تلك المرحلة. مرارا وتكرارا ، لقد كنت أفكر في قصص الحب إشكالية. وأكبر مشكلة في قصص الحب هو أنني أعتقد أنها ، في الأساس ، تحد من الطريقة التي يمكننا بها التفكير في الحب. ويقترحون نوعًا من الطريقة "المثالية" لممارسة الحب. وفي كثير من الأحيان ، أعتقد أننا نتخيل أن هذه هي أفضل طريقة أو الطريق الصحيح. وعند القيام بذلك ، أعتقد أنهم غالباً ما يقللون من التفاصيل المهمة ، فارق بسيط. أنها تبسيط الأشياء المعقدة. وأنا دائمًا ما اعتقدت أن ذلك حقيقي. البحث يوحي بأن هذا كان صحيحا. ولكن فجأة ، حصلت على مشاهدة حبي الخاص يتم الإبلاغ عن القصة في الأخبار ، والتي So usually, I kind of know what happened. Obviously, if I'm writing about my own life, I definitely know what happened. But the parallel narrative is why do I care about what happened, or why should anyone else care about what happened? And that's the thing that, often, I feel like I have to write my way into. So maybe I'll begin with a scene or an experience. But usually, in the process of writing about that experience, I'm going to, somewhere along the way, figure out what it is that I want to understand about it. So I'm essentially writing my way into this question, which is why does this feel compelling? What can it teach me about myself, or the world, or what it means to be human? And then, once I can identify that question, I have to answer it. And it's not that I always get to a satisfying answer, but often I do. But I think even the attempt to answer the question yields interesting reflection. And then, once I've kind of got all that, then it's just a matter of looking at the piece of writing, say, there's a lot of information here. What doesn't serve the story. And if there's anything in there that doesn't serve it, then I try to streamline it a little bit. So the "Modern Love" column is 1,500 words. I initially wrote that piece at, like, 2,800 words. And I really struggled to get it down there. MARLISSE SILVER SWEENEY: I bet. That's half of the story. MANDY LEN CATRON: I know. I think I got it to about 1,700 when I sent it in. And the editor, who's very good at doing this, just got rid of the other 200, which I was quite grateful for. MARLISSE SILVER SWEENEY: So I wanted to talk about some of the other mediums that you also communicate in. So first and foremost, you're a writer and a memoirist. And congratulations about your book that's just coming out. But you've done TED Talks, you've been on a ton of different TV shows, radio, you teach. How does your storytelling change depending on the type of communication channel? MANDY LEN CATRON: That's a great question. I'm, like, how does it change? So one of the things is, especially I think with teaching-- because I'm teaching students how to write. I'm always trying to convince them that what we're doing in the classroom is important and worthwhile. And that is one of those things that's easy to convince some people and really hard to convince others. And so I'm always coming back to this question of "So what?" And I try to integrate it into my lectures, but also in the comments that I make on their papers, which is just like the question you constantly have to be asking yourself is why should anyone other than me care about this? And really, if you think about those two parallel narratives, that is that second narrative. What matters here? What's important about this? MARLISSE SILVER SWEENEY: So our students, in this course, are just starting to think about storytelling and how they can incorporate it into their communication. What's your best tip for them? MANDY LEN CATRON: OK. So I have one really good tip-- MARLISSE SILVER SWEENEY: Perfect. MANDY LEN CATRON: --which is basically-- I think we often have this idea, especially when we're beginning to work with narrative that we want our readers to relate to what we're going to say. But that the best way to make someone relate to what we're saying is to keep it broad. And actually, the inverse of that is true. So the more specific you are, the more concrete, the fewer abstract words you use, the more specific filmable scenes, vivid, sensory details, the more easily another person can conjure whatever narrative it is you're trying to create for them, and the better they can insert themselves in the story. So even if those specific details are nothing like the circumstances of their life, say, there's still, it becomes-- you're creating a world that becomes more real for them. So I think the biggest thing you can do is constantly err on the side of like vivid, concrete, specific, and avoid anything that is vague, abstract, anything like that. MARLISSE SILVER SWEENEY: OK. Concrete. Specific. MANDY LEN CATRON: Yeah. MARLISSE SILVER SWEENEY: And my last question is, what did it feel like for you to be the subject of this story that gained so much attention? MANDY LEN CATRON: It was really weird. You know, I have been sort of investigating love stories in this critical, rigorous way for five years, at that point. And over and over again, I've been thinking love stories are problematic. And the biggest problem with love stories is that I think they, essentially, limit the way we can think about love. And they suggest a sort of 'ideal' way to practice love. And often, I think, we imagine that that's the best way or the right way. And in doing that, I think they often minimize important details, nuance. They simplify things that are complicated. And I always sort of believed that to be true. The research suggests that was true. But then suddenly, I got to watch my own love story be reported in the news, which هذه تجربة غريبة. وما وجدته هو أن الناس أخطأوا حقًا. لقد فهموا التفاصيل بشكل خاطئ ، أو أبلغوا عنها نسخة قصيرة حقا من القصة. سيكون الكثير من الناس ، مثل ، بحلول نهاية المساء ، كانوا يقعون في الحب. ولم أقل في أي وقت أن أقول إن تلك كانت تجربتي ، وفي الواقع لم تكن تجربتي على الإطلاق. أعتقد أننا بدأنا علاقة بعد ثلاثة أشهر من ذلك. وخلق هذا الشعور بالعلاقة الحميمة. بالنسبة لي ، كانت القصة الأكثر تعقيدًا هي القصة الأكثر إثارة للاهتمام. لكن لم تكن هذه هي القصة التي رواها الناس. وأعتقد ، ربما ، لم يكن بالضرورة القصة التي أراد الناس سماعها. انهم يريدون هذا حقا-- لقد قمنا بالدراسة ، ووقعنا في الحب ، سنكون سعداء إلى الأبد. And-- MARLISSE SILVER SWEENEY: النهاية. ماندي لين كاترون: بالضبط. بلى. وهكذا ، كان من الرائع أن أكون على الجانب الآخر من هذه التجربة بدلاً من البحث عن قصص حب أخرى. وكنت أبحث في تجربتي الخاصة ومقارنة ذلك لهذا النوع من الإصدار العام ، والسرد ، من علاقتي. وهكذا نعم ، لقد تعلمت الكثير منه. مارليز سيلفر سويني: أراهن. حسنًا ، أردت أن أشكرك مجددًا على قضاء الوقت في المجيء إلى هنا وأيضا لكتابتك لأنني ، مثل الآلاف وآلاف وآلاف الأشخاص الذين قرأوا وشاركوا عملك ، بوضوح ، يتردد صداها معنا. شكرا لك ماندي لين كاسترون: أقدر ذلك. [عزف الموسيقى] is such a strange experience. And what I found is that people really got it wrong. They got the details wrong, or they reported a really short version of the story. A lot of people would be, like, by the end of the evening, they were falling in love. And at no point did I say that that was my experience, and it actually wasn't my experience at all. I think we started a relationship three months after that. And it just created this sense of intimacy. And to me, the more complex story was the more interesting one. But that wasn't the story that people told. And I think, maybe, it wasn't necessarily the story that people wanted to hear. They wanted this really-- we did the study, and we fell in love, we're going to be happy forever. And-- MARLISSE SILVER SWEENEY: The end. MANDY LEN CATRON: Exactly. Yeah. And so in a way, it was kind of cool to be on the other side of this experience instead of looking out toward other love stories. And I was looking into my own experience and comparing that to the sort of public version, narrative, of my relationship. And so yeah, I learned a lot from it. MARLISSE SILVER SWEENEY: I bet. Well, I wanted to thank you again for taking the time to come here and also for your writing because me, like the thousands and thousands and thousands of people that have read and shared your work, clearly, it really resonates with us. So thank you. MANDY LEN CATRON: I appreciate that. [MUSIC PLAYING] |
ي هذا القسم ، سنعمل على دمج أفكار الكود السابقة مع أفكار الصور وبكسل وأرقام RGB لفرز ذلك معا. الآن ، الأمثلة في هذا القسم ، سنتعامل مع بكسل واحد فقط في كل مرة. ثم في اليوم التالي قسم سنقوم بتوسيعه لإنشاء ، للقيام الآلاف من بكسل في وقت واحد. لذلك ، للحصول على بدأت ، أريد أن أنظر إلى هذا ، صورة تسمى x.png. وهذه الصورة صغيرة ، لذلك أنا يمكن أن نشير إليها هنا. لذلك ، إنها صورة من عشرة إلى عشرة ، إنها موجودة ، تظهر على الصفحة. إنها صورة سوداء عليها علامة X بيضاء. وكما قلت ، إنه كذلك صغيرة جدا. لكننا سنعرضها أكبر قليلاً في الثانية. لذلك بابوا نيو غينيا هو ، شكل صورة ، رسومات الشبكات المحمولة. تماما مثل ، JPEG هو شكل والتي قد تكون أكثر دراية. لذلك كلاهما تنسيقات الصور. لذلك ، في هذا الحالة ، ما أريد أن ننظر إلى هنا. هو بعض الرموز ، التي تحمل x.png صورة ويعرضها. لذلك ، سيكون هذا مجرد مثال أول بسيط للغاية على الكود ، الذي يعمل مع الصور. لذا ، إليك الرمز هنا ، وسأتحدث عنه ماذا يفعل كل سطر. لذلك ، هذا السطر الأول ، image = new SimpleImage (x.png) ما هذا ، هو الجانب الأيمن أساسا. يحمّل صورة x.png في الذاكرة. وسوف نتحدث بمزيد من التفصيل في وقت لاحق ، ماذا ، ما الذاكرة هو. لكن يكفي القول ، هذا نوع من ، يدخل الكمبيوتر حتى يتمكن من ذلك ، يمكن للكمبيوتر العمل عليه. لذلك بمجرد الحصول على الصورة ، علامة المساواة هنا فقط يخزنها في متغير ، وأنا ، أنا سأدعو صورة ، تماما مثل ، تماما مثل لقد رأينا المتغيرات من قبل. السطر الثاني ، image.setZoom (20). ما يفعله هو يطلق عليه ، مجموعة ، وظيفة setZoom ، وهو شيء يحتوي على الصور. و يمر الرقم 20. وهذا كله لا. هل هذا خيار لإظهار الصورة بحجم 20x؟ و حينئذ. هذا مجرد شيء نستخدمه لصورة صغيرة مثل هذا فقط حتى يظهر بشكل كبير بما يكفي ، حتى نتمكن من رؤيته. وأخيرا ، طباعة (صورة) ، يشبه إلى حد كبير ما نراه قبل ذلك ، فقط يطبع الصورة الجانب الأيمن تماما كما رأينا ، سلاسل والأرقام من قبل. لذلك يمكننا جميعا فلتجربه فقط. لذلك إذا قمت بتشغيل هذا ما تراه هو هنا x.png ، يظهر هنا. و في الواقع ، يمكنك الاعتماد فعلاً على واحد أو اثنين أو ثلاثة أو أربعة. يمكنك فعلا الاعتماد أكثر ، ونرى أنه في الواقع ، عشرة بكسل في عشرة بكسل. ويتم عرضها هنا في حجم 20x. في الواقع يمكنني تغيير هذا الرقم هنا. لذلك إذا قمت بتغيير هذا إلى عشرة ، ثم قم بتشغيلها مرة أخرى ثم حسنا ، حسنا ، الآن 20X فقط. وإذا وضعت مثل ، a ، 40 هنا ، وقم بتشغيله ، ثم حسنًا ، أكبر كثيرًا. لذلك سوف أعيدها إلى عشرون. هذا مجرد مثال أول على القليل من الكود ، لكننا نوع من السير في طريق القدرة على تحميل ومعالجة الصور. حسناً لجعل هذا أكثر إثارة للاهتمام قليلا. أريد تمديد الشفرة لتكون قادرًا على التعامل مع وحدات بكسل فردية ، فأنا أضع خطوطًا في منتصف الصورة البرنامج هنا ، لذلك هذا الخط بكسل = image.getPixel (0،0). ما هذا هل يذهب إلى الصورة وسيحصل على إشارة إلى بكسل معين أيا كان ، كلما كانت إحداثيات س ، ص نحدد هنا 0،0 أو يشير هذا إلى ، بكسل اليسار العلوي ، لذلك يحصل على إشارة إلى بكسل اليسار العلوي ويخزن ذلك في بكسل متغير ثم هذا السطر: pixel.setRed (255). الذي يستدعي وظيفة وقد دعا بكسل setRed وماذا ، ما يفعله setRed هو أنه يأخذ في أي رقم هنا بين قوسين ومهما كان هذا الرقم ، فإنه يأخذ ويضع القيمة الحمراء للبكسل ليكون هذا الرقم. لذلك ، سأعمل على هذا. نحن بحاجة لرؤية ماذا يفعل. وما تراه هو ، ما حصل عليه الكود هو الحصول على مرجع إلى هذا ، بكسل اليسار العلوي وكان أسود من قبل ، وتذكر ، تذكر يحتوي كل بكسل على الأرقام الثلاثة فيه ، الأحمر والأخضر والأزرق. وما هذا رمز يفعل ، ذهب إلى الرقم الأحمر وتغير إلى 255 ، مجرد تجاوز كل ما كان هناك من قبل. لذلك عندما نراها ، حسناً ، تظهر في صورة بكسل أحمر ، وبالتالي. هناك setRed لتغيير القيم الحمراء. هناك وظيفة مماثلة setGreen و setBlue. لذلك ، لدينا هذه الثلاثة ، setRed ، setGreen و setBlue. وهكذا ، مع هؤلاء ، يمكننا فقط تغيير القيم الحمراء والخضراء والزرقاء أيا كان ، أينما نريد. وبالتالي. أوه ، وسأذكرها جانباً لذا أنا ، أنا فقط ، كما تعلمون ، قدمت ثلاث وظائف. هناك هذه الصفحة منفصلة ، مرجع وظائف الصورة ، الذي يسرد فقط جميع الوظائف في الجدول ، وذلك بالنسبة للبعض في وقت لاحق التمرين ، قد تريد ، يمكنك أن ترى أنه إذا كنت تريد أن تتذكر ما وظيفة لا. ولكن عادةً بالنسبة للمحاضرات ، سأستخدم فقط ، إذا كنت سأستخدم وظيفة أنا فقط ، وأنا ذاهب سأتحدث عن ذلك. لذلك ، ما أريد القيام به ل شرح كيف ، كيف تعمل هذه الوظائف ، هو مجرد الذهاب من خلال مجموعة من الأمثلة. مجرد استخدامها لفعل شيء في الواقع. حسنا ، لذلك هنا ، وبالتالي ، فإن الشكل من هذا أنا عندي ، منطقة كود صغيرة هنا مع بعض الرموز المبدئية فيها. و ثم في هذا الجدول هنا ، لقد سردت مجموعة من التحديات الصغيرة مشاكل ، مثل ، أوه ، تعيين شيء ليكون أخضر أو ص In this section, we're gonna combine the earlier ideas of code with the ideas of images and pixels and RGB numbers to sort of bring that together. Now, the examples in this section, we'll just manipulate one pixel at a time. And, then in the next section we'll scale it up to build, to do thousands of pixels at a time. So, to get started, I wanna look at this, image called x.png. And this image is tiny, so I can point to it here. So, it's a ten by ten image, it's there, shown on the page. And it's a black image with a white X drawn on it. And, as I said, it's, it's quite small. But we'll, we'll show it a little bit bigger in a second. So the PNG is a, an image format, portable networks graphics. Just like, JPEG is a format which you might be more familiar with. So those are both image formats. So, in this case, what I wanna look at here. Is some code, that loads the x.png image and displays it. So, this will just be a first, very simple example of code, that works with images. So, here's the code in here, and I'll just talk about what each line does. So, this first line, image = new SimpleImage(x.png) What this does, is the right hand side essentially. Loads the x.png image into memory. And we'll talk in more detail later on, what, what memory is. But suffice to say, that's sort of the, it gets into the computer so it can, the computer can work on it. So once I've got the image, the, the equal sign here just stores it into a variable, which I'm, I'm gonna call image, just like, just like we've seen variables before. The second line, image.setZoom(20). What that does is it calls a, a set, the setZoom function, which is something that images have. And it passes the number 20. And all this does. Is it such an option to show the image at 20x size? And so. That's just something we'd use for a small image like this just so it shows up big enough, that we can see it. And then finally, print(image), is very similar to what we see before that, just prints the image over the right hand side just as we saw, strings and numbers before. So we can all just try it. So if I run this what you see is here's x.png, shows up over here. And act-, you can actually count, one, two, three, four. You can actually count over, and see it is in fact, ten pixels by ten pixels. And it's being displayed here at 20x size. So actually I could change this number here. So if I change this to a ten, and then run it again then okay, well, now it's only 20X. And if I put like, a, a 40 here, and run it, then okay, it a lot bigger. So I'll put it back to twenty. So that's just a first example of a little bit of code, but we're sort of going down the path of being able to load and manipulate images. Right, so to make this a little more interesting. I wanna extend the code to be able to deal with individual pixels so I'm a add a, a couple lines in the middle of the a program here, so this line pixel=image.getPixel(0,0). What that does it goes to the image and its gonna get a reference to a particular pixel whatever, whenever x, y coordinates we specify here so 0,0 or this refers to the, the upper left pixel, so it gets reference to the upper left pixel and stores that in a variable pixel and then this line: pixel.setRed(255). That calls a function a pixel has called setRed and what the, what setRed does is it takes in any number here between the parentheses and whatever that number is, it takes it in and it sets the red value of the pixel to be that number. So, I'm gonna run this. We need to see what it does. And what you see is, what the code has done is obtained a reference to this, the upper left pixel and it was black before and it, remember, recall each, each pixel has the three numbers in it, red, green and blue. And so what this code does, it went to the red number and it changed to 255, just overriding whatever was there before. So when we see it, well okay it shows up as a red pixel, so. There's a setRed to change the red values. There's an analogous function setGreen and setBlue. So, we have these three, setRed, setGreen and setBlue. And, so, with those, we can just change the red, green and blue values to be whatever, wherever we want. So. Oh, and I'll mention it as an aside so there I, I just, you know, introduced three functions. There's this separate page, Image Functions Reference, that just lists all the functions in a table, so for some later exercise, you might wanna, you can go see that if you want to remember what a function does. But usually for the lectures I will just, if I'm gonna use a function I'll just, as I'm going I'll talk about it. So, what I want to do to demonstrate how, how these functions work, is just go through a bunch of examples. Just use them to actually do something. Alright, so here are, so the, the format of this is I've got, a little code area here with some starter code in it. And then in this table down here, I've just listed a bunch of little, challenge problems, like, oh, set something to be green or y رموز اللون الأصفر يتم إنشاء اللون الأصفر عن طريق إضافة ألوان الأحمر والأخضر. رمز اللون الأصفر RGB مخطط اللون الأصفر رمز اللون الأصفر HTML رمز اللون الأصفر RGB رمز RGB الأصفر = 255 * 65536 + 255 * 256 + 0 = # FFFF00 الأحمر = 255 ، الأخضر = 255 ، الأزرق = 0 ظلال اللون الأصفر المخطط لون HTML / CSS اسم اللون رمز الهيكس #RRGGBB الكود العشري (R، G، B) lightyellow # FFFFE0 RGB (255255224) lemonchiffon #FFFACD RGB (255250205) RGB lightgoldenrodyellow # FAFAD2 (250250210) papayawhip # FFEFD5 RGB (255239213) RGB حذاء بدون كعب # FFE4B5 (255228181) peachpuff RGB # FFDAB9 (255218185) RGB palegoldenrod # EEE8AA (238232170) الكاكي RGB # F0E68C (240230140) darkkhaki # BDB76B RGB (189183107) RGB الأصفر # FFFF00 (255،255،0) الزيتون # 808000 RGB (128،128،0) RGB greenyellow # ADFF2F (173،255،47) yellowgreen # 9ACD32 RGB (154،205،50) اللون غير HTML اسم اللون رمز الهيكس #RRGGBB الكود العشري R، G، B أصفر فاتح 1 # FFFCC rgb (255،255،204) أصفر فاتح 2 # FFFF99 rgb (255،255،153) أصفر فاتح 3 # FFFF66 rgb (255،255،102) أصفر فاتح 4 # FFFF33 rgb (255،255،51) RGB الأصفر # FFFF00 (255،255،0) أصفر داكن 1 # CCCC00 rgb (204،204،0) أصفر داكن 2 # 999900 rgb (153،153،0) أصفر داكن 3 # 666600 rgb (102،102،0) أصفر داكن 4 # 333300 rgb (51،51،0) رمز اللون الأصفر HTML أتش تي أم أل الفقرة مع الخطوط الصفراء الشفرة: <p style = "colour: yellow؛ background: black"> هذه الخطوط صفراء! </ p> نتيجة: هذه الخطوط صفراء! أو <p style = "colour: # FFFF00؛ background: black"> هذه الخطوط صفراء أيضًا! </ p> نتيجة: هذه الخطوط صفراء أيضًا! أو <p style = "color: rgb (255،255،0) ؛ الخلفية: أسود"> هذه الخطوط صفراء ، أيضًا! </ p> نتيجة: هذه الخطوط صفراء أيضًا! فقرة HTML مع خطوط سوداء ولون خلفية صفراء الشفرة: <p style = "colour: black؛ background: yellow"> لون الخلفية أصفر </ p> نتيجة: لون الخلفية أصفر لون الذهب ► أنظر أيضا اللون الأزرق لون سماوي لون ذهبي اللون الاخضر كستنائي اللون لون برتقالي اللون الوردي اللون الأرجواني أحمر اللون أكواد ألوان HTML ألوان الويب آمنة Yellow color codes Yellow color is generated by adding red and green colors. Yellow RGB color code Yellow color chart Yellow HTML color code Yellow RGB color code Yellow RGB code = 255*65536+255*256+0 = #FFFF00 RED=255, GREEN=255, BLUE=0 Shades of yellow color chart Color HTML / CSS Color Name Hex Code #RRGGBB Decimal Code (R,G,B) lightyellow #FFFFE0 rgb(255,255,224) lemonchiffon #FFFACD rgb(255,250,205) lightgoldenrodyellow #FAFAD2 rgb(250,250,210) papayawhip #FFEFD5 rgb(255,239,213) moccasin #FFE4B5 rgb(255,228,181) peachpuff #FFDAB9 rgb(255,218,185) palegoldenrod #EEE8AA rgb(238,232,170) khaki #F0E68C rgb(240,230,140) darkkhaki #BDB76B rgb(189,183,107) yellow #FFFF00 rgb(255,255,0) olive #808000 rgb(128,128,0) greenyellow #ADFF2F rgb(173,255,47) yellowgreen #9ACD32 rgb(154,205,50) Color Non HTML Color Name Hex Code #RRGGBB Decimal Code R,G,B Light yellow1 #FFFFCC rgb(255,255,204) Light yellow2 #FFFF99 rgb(255,255,153) Light yellow3 #FFFF66 rgb(255,255,102) Light yellow4 #FFFF33 rgb(255,255,51) Yellow #FFFF00 rgb(255,255,0) Dark yellow1 #CCCC00 rgb(204,204,0) Dark yellow2 #999900 rgb(153,153,0) Dark yellow3 #666600 rgb(102,102,0) Dark yellow4 #333300 rgb(51,51,0) Yellow HTML color code HTML paragraph with yellow fonts Code: <p style="color:yellow; background:black">These fonts are yellow!</p> Result: These fonts are yellow! OR <p style="color:#FFFF00; background:black">These fonts are yellow, too!</p> Result: These fonts are yellow, too! OR <p style="color:rgb(255,255,0); background:black">These fonts are yellow, too!</p> Result: These fonts are yellow, too! HTML paragraph with black fonts and yellow background color Code: <p style="color:black; background:yellow">Background color is yellow</p> Result: Background color is yellow Gold color ► See also Blue color Cyan color Gold color Green color Maroon color Orange color Pink color Purple color Red color HTML color codes Web safe colors في هذا القسم ، أريد أن أتحدث عن كيفية عمل الصور الرقمية في الكمبيوتر. وبالتالي، لدي هنا مثال - صورة لبعض الزهور الصفراء وما سنراه هو أن هذا يبدو وكأنه نوع من الشيء كله مدورة العضوية. في الكمبيوتر ، هو سيذهب إلى أسفل إلى الكثير من الأرقام. إذن كيف يعمل هذا؟ وبالتالي ما أريد القيام به هو التركيز على هذه الزهرة اليسرى العليا هنا. سترى هناك منطقة خضراء صغيرة مع شيء صغير في الوسط. حتى لو كنت التكبير من قبل عامل عشرة على ذلك المربع ، يبدو مثل هذا. فما تراه هو أن الصورة هي مصنوعة من هذه الأشياء مربع صغير. لذلك تسمى هذه بكسل. لذلك كل بكسل هو ميدان. إنها صغيرة جدًا ، لذلك ، كما تعلم ، لا يوجد رقم محدد لذلك ربما 100 بكسل لكل بوصة. ويظهر كل بكسل لونًا واحدًا فقط ، لذلك فهو فقط مقفل مثل مربع من لون واحد. والمضحك هو أنك إذا نظرت إليه هنا يبدو نوعا من. ارتفع مصطنع جدا ومن الصعب ، ولكن لأن بكسل هو كذلك صغير عندما تنظر إليه هنا في الصورة الأصلية ، كما تعلم ، فقط يبدو صحيحا. العين لا ، البيكسلات صغيرة بما يكفي بحيث لا ترى تلك الأشياء الصغيرة حواف صعبة. هذا ما تبدو عليه الصورة عند التكبير / التصغير ورؤية الصورة أجزاء. إذا كنت ترغب في التفكير في عدد البكسلات الموجودة في صورة ما ، فهي مجرد صورة مسألة الضرب. لذلك إذا كان لدي صورة عرضها 800 بكسل في 600 بكسل عالية انها مجرد مسألة الضرب. لذلك اضرب هذين ، و هذا هو 480،000 بكسل. ربما سمعت مصطلح ميغابيكسل. يشيع استخدامها ل أجهزة الكمبيوتر والكاميرات والأشياء. لذلك ، ميغابيكسل هو مليون بكسل. كذلك انا صورة 800 × 600 ، 480،000. حسنًا ، هذا حوالي نصف ميغابكسل تقريبًا. هذه ليست صورة كبيرة جدًا ، وفقًا للمعايير الحديثة. الرقمية الكاميرا اليوم ، حتى على الهاتف عادة ما تنتج صورة حسب الطلب خمسة ميغا بكسل ، عشرة ميغا بكسل ، ربما عشرين ميغا بكسل. سيكون ذلك جميلا صورة كبيرة. كل الحق ، لذلك دعونا نرى كيف ، كيف يعمل هذا الشيء. لذلك لقد صنعت فقط لجعله أكثر وضوحا قليلا أنا جعلت هذا المخطط. لذلك إذا كان لدي صورة أستطيع التفكير في الأمر حقا مثل هذه الشبكة من بكسل. لذلك كل بكسل مربع وهو فقط تظهر لون واحد. الآن سنحصل على مخطط للعناوين تحديد كل بكسل بدلا من جميع الآخرين. لذلك الطريقة التي تعمل هي أن لدينا مجموعة من الأرقام س على طول الجزء العلوي هنا. لذلك الصفر هو أقصى اليسار ثم يرتفع ، يذهب إلى اليمين. وبعد ذلك يتم الاتجاه y بطريقة فريدة من نوعها. إذاً الصفر هو الأعلى ، الصف العلوي ، ومن ثم قراءة الأرقام ص. وذاك تاريخيا كيف ، كيف يتم ترقيم الأشياء في الكمبيوتر. لذلك يمكنني أن أفعل فقط بعض الأمثلة البسيطة. لذلك ، على سبيل المثال ، يكون البيكسل الأيسر العلوي في (0،0). أو س = 0 ، ص = 0 ، أستطيع أن أقول. بكسل واحد إلى يمينه ، لذلك هذا بكسل هنا في x = 1 ، y = 0. وفي كثير من الأحيان إذا قلت التنسيق ، فإن الاصطلاح هو فقط قول رقم x ثم رقم y. لذلك أود أن أقول ، هذا هو (1،0). ودعونا نقول ، هذا بكسل هنا. حسنا ، يمكنك قراءة كيندا. انه عند س = 4 ، ص = 2. أو يمكن أن أقول فقط (4،2). الآن ، في الواقع ، نحن لن ندخل الكثير من التفاصيل من العبث مع هذه الأرقام س ص لتحديد محددة بكسل. تحتاج فقط أن نقدر أن هناك هذا المخطط. لذلك حتى لو كنا كان لديه عشرة ملايين بكسل ، أي بكسل معين لديه عدد س ص يعالج ذلك ، مقابل ، كل بكسل أخرى. لذا ، فإن السؤال هو. حسنا لقد حصلت هذه بكسل ، كيف يمكنني ترميز لون أي بكسل معين؟ وذلك للحديث عنه ذلك ، أنا ذاهب للقيام بجولة جانبية تاريخية وجيزة. لذلك كان نيوتن هذا الشهيرة تجربة في 1600s ، حيث كان لديه - الذي استنسخته هنا - المنشور الذي هو مجرد قطعة من الزجاج الثلاثي. وهنا أشعة الشمس البيضاء تأتي في اليد اليسرى الجانب والمنشور تقسيمه. في طيف الألوان هنا ، الذي أنا فقط ، المسقطة على قطعة بيضاء من الورق. ما يدل على ذلك هو أن الضوء الأبيض ليس كذلك بعض الشيء النقي غير قابل للتجزئة. بدلا من ذلك ، يمكن فصلها إلى هذه نقية الألوان المكونة. وهذا هو نفس الشيء الذي ستراه مع قوس المطر. وبالتالي فإن الألوان هي في الواقع في طيف مستمر. لكننا نيوتن حددت بعض منها. أنت تعرف أعطاهم ، أعطاهم الكلمات. وغني ، هذا هو التسلسل الشهير حيث يذهب أحمر على الجانب هنا ، ثم البرتقالي ، و الأصفر والأخضر. وأخيراً اللون الأزرق والنيلي والبنفسجي على الجانب البعيد هنا. وبالتالي. في الحاسوب. أريد أن أفكر في هذه الألوان النقية كنوع من لوحة الألوان. والمخطط الذي سنستخدمه هو اختيار الواقع باللون الأحمر والأخضر والأزرق من هنا. واستخدم تلك الأنواع كنوع من العناصر ، كمكونات لبناء أي لون آخر قد نريد. لذلك ، أو ، في نهاية المطاف ، يمكنك التفكير في الأمر ، هنا لدينا الأبيض ضوء قادم في اليسار ، ونحصل على المكونات هنا. يمكنك التفكير في كما تشغيله إلى الوراء. هذا إذا أخذت الألوان المكونة وركضتهم بهذه الطريقة ، يمكن أن أخرج الضوء الأبيض. ثم ، الفيزياء ليست هي نفسها بالضبط ، ولكن هذا هو القليل In this section, I wanna talk about how digital images work in the computer. So, here I've got an example - an image of some yellow flowers and what we're gonna see is that this looks like sort of an organic rounded whole thing. In the computer, it's gonna come down to really just a lot of little numbers. So, how's that work? So what I wanna do is focus on this upper left flower here. You'll see there's a little green area with a little thing in the middle. So if I zoom in by a factor of ten on just that square, it looks like this. So what you see is that the image is made of these little square things. So these are called pixels. So each pixel is square. They're quite small, so, you know, there's not an exact number for it but maybe 100 pixels per inch. And each pixel shows just a single color, so it's just locked as the square of a single color. And what's funny is if you, you look at it here it looks kind of. Very artificial and hard edged, but because the pixel is so small when you look at it here in the original image, you know just, it just looks right. The eye doesn't, the pixels are small enough that you don't see those little hard edges. So this is what an image looks like when you sort of zoom in and see the parts. If you want to think about how many pixels there are in an image, it's just a question of multiplication. So if I had an image that was 800 pixels wide by 600 pixels high it's just a question of multiplying. So I multiply those two, and that's 480,000 pixels. You may have heard the term megapixel. Is commonly used for computers and cameras and things. So, a megapixel is a million pixels. So, my 800x600 image, 480,000. Well, that's about half a megapixel, roughly speaking. So that's not a very big image, by modern standards. A digital camera today, even on a phone usually would produce an image on the order of five megapixels, ten megapixels, maybe twenty megapixels. That would be a pretty big image. All right, so let's see how, how this thing works. So I've made a. Just to make it a little more crisp I made this diagram. So if I have an image I can think of it really as this grid of pixels. So each pixel is a square and it's just showing a single color. Now we're gonna have an addressing scheme to sort of identify each pixel as opposed to all the others. So the way that works is that we have a set of x numbers along the top here. So zero is the far left and then it goes up, goes to the right. And then the y-direction is done in sort of a unique way. So zero is the very top, the top row, and then the y numbers read down. And that's just historically how, how things are numbered in the computer. So I can just do some simple examples. So for example, the, the, the upper left pixel is at (0,0). Or x=0, y=0, I can say. The pixel one to its right, so this pixel here is at x=1, y=0. And a lot of times if I say the coordinate, the convention is to just say the x number and then the y number. So I would say, this is (1,0). And let's say, this pixel over here. Well, you can kinda read up. It's at x=4, y=2. Or I could just say (4,2). Now, in reality, we're not gonna get into a lot of detail of messing around with these x-y numbers to identify specific pixels. You just need to appreciate that there is this scheme. So even if we had ten million pixels, any particular pixel has some x-y number that addresses it, versus, all the other pixels. So, the question is. Well I've got these pixels, how do I encode what the color is of any particular pixel? And so to talk about that, I'm going to make a brief historical side-trip. So Newton had this famous experiment in the 1600s, where he had a - which I reproduced here - a prism which is just a triangular piece of glass. And here white sunlight is coming in the left hand side and the prism splits it. Into the spectrum of colors here, which I just, projected onto a white piece of paper. So what this shows is that white light is not some indivisible pure thing. Instead, it can be separated into these pure constituent colors. And so this is the same thing that you would see with a rainbow. So the colors are actually in a continuous spectrum. But we Newton identified certain ones. You know gave them, gave them words. So it goes, this is the famous sequence where it goes red on the side here, and then orange, and yellow, and green. And finally blue, indigo and violet on the far side here. So. In the computer. I want to think of these pure colors as kind of a palette. And the scheme we're gonna use is to pick actually red, green and blue out of here. And use those as sort of to, as constituents to build up any other color we might want. So the, or, ultimately, you could think of it, here we have white light coming in the left, and we get the constituents out here. You could think of it as running it backwards. That if I took the constituent colors and ran them back this way, I could get white light out. And then, physics is not exactly the same, but this is a litt سوف ندعو ذلك 255. وإذا رأيته في الأسفل فعليًا ، فهذا دائمًا يقرأ ما هي الأرقام للمتزلجون. لذلك حصلت على شريط التمرير الأحمر ، و منزلق أخضر لصنع الضوء الأخضر ومزلق أزرق لصنع الضوء الأزرق. و حينئذ الإستراتيجية في مخطط RGB هي ذلك. أساسا لديك هذه ، هذه ثلاثة مقابض أستطيع أن أتمكن من تغيير سطوع الضوء الأحمر والأخضر والأزرق. واتضح أنه يمكنك صنع أي لون من خلال الجمع بين النسب الصحيحة فقط الأحمر والأخضر والأزرق. وبالتالي. سوف تظهر بعض الأمثلة. حسنًا ، من الواضح إذا كنت أريد أن أحمر ، أنا سوف يتحول إلى اللون الأحمر على طول الطريق ، وكذلك إذا كنت أريد أن أصبح أخضرًا ، مجرد تحويل الأخضر على طول الطريق. إذا ، الآن إذا قمت بقلبها بالطريقة التي تحصل عليها نوعًا ما نسخة مشرقة. إذا كنت أريد اللون الأخضر الداكن ، حسناً ، يمكن أن أبدأ باللون الأخضر و ثم مجرد نوع من رفضها. حتى أحصل على اللون الأخضر الداكن. في هذا الطريقة. الآن حقًا ، على الجانب الأيسر هنا ، تمثل الأرقام الصفرية اللون الأسود. حتى في بمعنى أن ما أفعله هو أنني آخذ اللون الأخضر ، وأنا أحب ذلك ، حسناً ، ما عليك سوى الاقتراب منه أسود. وهذا ، هذا أخضر غامق. لذلك ، الطرف الآخر ، إذا كنت أريد أن أكون أبيضًا ، فهذا هي الحالة التي أرتدي فيها اللون الأحمر وأقلبه طوال الطريق. والأخضر والأزرق و تحويل كل منهم ، كل ما يصل ، وهذا كيف أحصل على اللون الأبيض. لذلك كل الأرقام في 255 ، هذا ابيض. ومن ثم قلبهم على طول الطريق هنا ، كل ذلك عند مستوى الصفر ، هذا أسود. لذلك اسمحوا لي أن أعرض فقط بعض المجموعات هنا. أعتقد ربما الأكثر إثارة للاهتمام هو ، أحمر زائد الأخضر. لذا ، إذا تحولت إلى اللون الأحمر ، ثم أدرت الأخضر على طول الطريق ، ما أحصل عليه أصفر. وإذا أردت أن أجعل ربما أ أصفر أغمق قليلاً ، حسناً ، أستطيع أن أبقي نوعًا أحمر وأخضر قريبًا من كل منهما البعض ، ولكن فقط قم بتقليصهما قليلاً ، قليلاً نحو اللون الأسود ، وأحصل على لون أصفر داكن ، أو سنذهب بهذه الطريقة ، وسنحصل على لون أصفر داكن. إذا كنت تريد أن تجعل البرتقال. ما سأفعله هو أنني ، أعتقد أن اللون البرتقالي مثل ، حسنا انها كيندا مثل الأصفر ولكن بدلا من الأحمر والأخضر يجري مماثلة ، الأحمر أقوى قليلاً. لذلك سآخذ اللون الأحمر والأخضر هنا وسأدير فقط احمر قليلا. وسأنقل اللون الأخضر قليلاً. ويمكننا الحصول على لطيفة البرتقال هناك ، وهذا هو نوع من. لون مخروط الطريق ، نوع من البرتقال لطيف. لذلك هذا النوع من فقط يعطيك نكهة كيف يمكنك ، كما تعلمون ، من خلال التغيير في الأشياء صنع الكثير من الألوان الممتعة. دعونا نرى ، كانت هناك محاولة أخرى أردت فعل. أوه نعم ، سأصنع نوعًا من اللون الأخضر الفاتح. لذلك ، في الواقع ، اسمحوا لي أن أريك كيفية جعل الباستيل الأصفر. حتى هنا لدي أحمر وأخضر ظهر كل شيء الطريق لذلك أنا أتلقى هذا أصفر مشرق جدا. وحتى الباستيل تفكر فيه كونه نوع من أكثر انتشارا ، وأكثر من نوع من الضبابية. وبالتالي فإن طريقة القيام بذلك هي في الواقع أنا ذاهب لإضافة باللون الأزرق. لذلك سأقلب اللون الأزرق إلى حوالي 180 ، 185 هنا. وكما ترى ، لا يزال اللون أصفر ، لكنه نوع من الباستيل الضبابية. والطريقة للتفكير في الأمر تبدو جيدة ، إذا كان لديّ كل هذه الأشياء الثلاثة الطريق في أقصى الحدود ، كان ذلك أبيض. وهكذا ، من خلال تحويل اللون الأزرق لأعلى ، لقد ذهبت إلى حد ما نحو الأبيض ولكن بدلاً من الأبيض النقي فقط ، من خلال الحصول على الأحمر والأخضر أ قليلا من رأس الأزرق ، وانتهى بي الأمر مع هذا يلقي الأصفر. الآن الطريق هذا سوف تعمل من أجل هذه الفئة ، أنا ، أنا لا أطلب منك أن تعرف ، يمكنك فقط توصيل ما الأرقام الثلاثة لأي لون معين. انها فقط لأنك تحت ، أنت تقدر أن هناك هذا المخطط الأساسي لصنع الألوان فقط من خلال اختلاف الأحمر والأخضر والأزرق. دعونا نرى ، هناك واحد فقط واحد أنا يريد ان يعرض. لذلك فعلنا الأحمر والأخضر والأصفر ، وهو أمر مهم ، وسنفعل ذلك مجموعات أخرى. حتى الأزرق زائد الأخضر يمكنك أن ترى في الواقع نوع من الفيروز ، لطيف من المنطقي نوعا من الأخضر الأزرق. وسوف يكون لدينا مزيج الماضي أحمر زائد الأزرق والأحمر زائد الأزرق تحصل على نوع من البنفسجي. نوع من المنطقي لا يبدو ل يكون مزيج من الأحمر والأزرق. حسنا ، لذلك اسمحوا لي أن أعود هنا إلى صورنا. وبالتالي لدينا هذه الفكرة التي يمكنك أن تأخذ الضوء الأحمر والأخضر والأزرق ومزجها سويا. وما يعنيه هذا فيما يتعلق بالصورة هو أن لدي كل هذه الأشياء بكسل ، لكل بكسل ستحصل على بعض الألوان. وهذا اللون سيصبح يحددها مستويات الأحمر والأخضر والأزرق. أو من حيث الأرقام ، ما يعنيه هو ، في الأساس ، كل بكسل يحتوي على ثلاثة أرقام فقط. لذلك أستطيع أن أقول ، حسنا ، الأحمر هو 250 ، والأخضر هو 10 ، والأزرق 240. ولكن ، على الأرجح ، كنا نقول ، أوه بلى. هذا بكسل هو (250 ، 10 ، 40). لذلك ، فإننا نميل دائمًا إلى استخدام الترتيب ، الرقم الأحمر ، ثم الرقم الأخضر ، ثم الرقم الأزرق. لذلك يمكنني نوع من صقل مخططي هنا. لذا ، إليك شبكة البكسل الخاصة بي. إنها تشكل الصورة ولدينا x ، y كما كان لدينا من قبل والآن. أساسا ما ، ما يحدث مع كل واحد من هذه البكسلات هي أنه يوجد لكل منها ثلاثة أرقام خاصة بها. لذلك ، ربما هذا واحد يساوي (6 ، 250 ، 7) ، لذلك 6 منخفض جدًا ؛ الأخضر 250 ، عالية جدا ؛ الأزرق 7 هو منخفض. الأخضر أساسا ، أليس كذلك؟ الرقم الأخضر مرتفع جدًا وقد يكون للبكسل هذا كن We're gonna call that 255. And if you see it at the bottom actually, the it always reads out what the numbers are for the sliders. So I got a red slider, and a green slider for making green light and a blue slider for making blue light. And so the strategy in the RGB scheme is that. Essentially you have these, these three knobs that I can have I can vary the brightness of red, green and blue light. And it turns out, you can make any color by combining just the right proportions of red, green and blue. So. I'll show some examples. Well, so obviously if I wanna make red, I would just turn red up all the way, and likewise if I wanna make green, I would just turn green up all the way. If, now if you turn it all the way you get kind of a bright version. If I want a darker green, well, I could start with green and, and then just sort of turn it down. So that I get darker green. In this way. Now really, the left-hand side here, the zero numbers represents black. So in a sense what I'm doing is I'm taking green, I'm like, well I just sorta go closer to black. And that's, that's dark green. So, the other end, if I wanna make white, this is the case where I take red and I turn it all the way up. And green and blue and turn them all, all the up, and that's how I get white. So all the numbers at 255, that's white. And then turning them all the way down here, all at zero, that's black. So let me show just a few combinations here. I think probably the most interesting one is, is red plus green. So, if I turn red up, and I turn green all the way up, what I get is yellow. And if I wanted to make maybe a slightly darker yellow, well I can st, keep red and green sort of close to each other, but just turn them both down a little bit, a little bit towards black, and I get a darker yellow, or we'll go this way, we'll get an even darker yellow. If I want to make orange. What I'm gonna do is I'm, I think of orange as being like, well it's kinda like yellow but instead of red and green being similar, the red is a little stronger. So I'll have red and green here and I'll just turn the red up a little bit. And I'll turn the green down a bit. And we can get a nice orange there, that's kind of a. Road cone color, kind of a nice orange. So this sort of just gives you the flavor of how you can, you know, by tweaking things end up making a lot of fun colors. Let's see, there was one other attempt I wanted to do. Oh yeah, I'll make kind of a, a light green. So I'll, actually, let me show you how to make a pastel yellow. So here I've got red and green turned up all the way so I'm getting this very bright yellow. And so pastel you think of as being kind of more diffuse, more sort of foggy. And so the way to do that is actually I'm going to add in blue. So I'll turn the blue up to about 180, 185 here. And as you can see, well it's still yellow, but it's kind of pastel, foggy. And the way to think about that is like well, if I had all three of these all the way at max, that was white. And so, by turning the blue up, I've sort of gone towards white but instead of just pure white, by having the red and green a little bit of the head of the blue, I end up with this yellow cast. Now the way this is going to work for this class is, I'm, I'm not requiring that you have you know, you can just plug there what the three numbers are for any particular color. It's just that you under, you appreciate that there is this basic scheme to make colors just by varying red, green, and blue. Let's see, there is just one other one I want to show. So we did red, green, yellow, is important, and we'll do the other combinations. So blue plus green you can actually see a kind of turquoise, kind of makes sense sort of a blue green. And our last combination will be red plus blue, so red plus blue you get a kind of a violet. Kind of makes sense does seem to be a combination of red and blue. Alright, so let me go here back to our images. So we've got this idea that you can take red, green, and blue light and mix them together. And so what that means in terms of the image is that I've got all those pixels, for every pixel is gonna have some color. And that color is gonna be defined by red, green, blue levels. Or, in terms of numbers, what it means is, basically, every pixel just has three numbers. So I could say, well, red is 250, and green is 10, and, blue is 240. But, I mean, more likely, we were to say, oh yeah. That pixel is (250, 10, 40). So, we tend to always use the order, the red number, then the green number, then the blue number. So I can sort of refine my diagram here. So, here's my grid of pixels. It's making up the image and we've got the x, y like we had before and now. Essentially what, what's going on with each one of these pixels is that there's each one has it's own three numbers. So, maybe this one is (6, 250, 7) right, so 6 is very low; green 250, very high; blue 7 is low. Basically green, right? The green number is very high and this pixel might be a في الكمبيوتر ، سنقوم بترجمة ذلك إلى بعض العمليات على الأرقام. لذلك ، على سبيل المثال ، للحصول على صورة ، إذا كنت أرغب في جعلها أخف قليلاً. مثل ، أوه jeez ، لدينا كل هذه الأرقام الأحمر والأخضر والأزرق. ربما ما يمكنني القيام به هو مجرد الذهاب وإضافة عشرة إلى كل واحد. وإذا فكرت مرة أخرى في مستكشف RGB ، سأعمل على تحويل كل واحدة إلى اليمين قليلاً ، فقط اجعلها كبيرة قليلاً ولاعة. على أي حال ، هذا سيكون ، بعض الأقسام من الآن. لكن الجنرال لهم أنه في الكمبيوتر ، [غير مسموع] الكثير من الأرقام الصغيرة ، وهذا كيندا ، هذا ما يشبه مجال الكمبيوتر. وهذا هو ، وهذا بالتأكيد شيء سنرى الكثير من. In the computer, we're gonna translate that into some operation on the numbers. So, for example, for an image, if I wanted to make it a little lighter. Like, oh jeez, we've got all these, red, green, blue numbers. Maybe what I could do is just go through and add ten to each one. And if you think back to the RGB explorer, I'm gonna shift each one a little bit to the right, just make it a little big lighter. Anyway, that's gonna be, a few sections from now. But the, the general them that in the computer, [inaudible] a lot of little numbers, and that's kinda, that's what the computer domain looks like. That is, that is certainly something we'll be seeing a lot of. الصور الرقمية في هذا القسم ، سننظر في كيفية عمل الصور الرقمية. الصور الرقمية الصور الرقمية في كل مكان تبدو طبيعية ، مدورة وراء الكواليس: الكثير من الأرقام الصغيرة تشاهد الصور على أجهزة الكمبيوتر في كل وقت. هنا سننظر خلف الستار ، ونرى كيف يتم تجميع الصور معًا. ما يشبه صورة كاملة لنا ، في الكمبيوتر هو هيكل مصنوع من العديد من الأرقام الصغيرة. فيما يلي صورة لبعض الزهور الصفراء: ازهار صفراء تكبير - بكسل تكبير 10x - مربع صغير "بكسل" بكسل بلون واحد ، صغيرة جدا تصور المشهد بأكمله ، وليس بكسل صغيرة صورة 800 بكسل ، صورة عالية 600 بكسل اضرب .. 480،000 بكسل (حوالي 0.5 "ميغابكسل") كاميرا رقمية 5-20 ميجا بكسل تكبير لرؤية بكسل عند التكبير على الجزء العلوي الأيسر من الزهرة ، يمكننا أن نرى أنه مصنوع بالفعل من العديد من "البيكسلات" المربعة ، حيث يظهر كل منها لونًا واحدًا. كل بكسل عبارة عن مربع صغير يعرض لونًا واحدًا الصورة 800 × 600 عرض 800 بكسل ارتفاع 600 بكسل ، 480،000 بكسل في الكل (0.5 ميجا بكسل) تنتج الكاميرات الرقمية اليوم صورًا بها عدة ميغابكسل لكل صورة ، على سبيل المثال 8000 × 6000 لنحو 5 ميجابكسل لن نعمل مع إحداثيات س / ص الفردية أكثر من اللازم. تحتاج فقط إلى تقدير وجود نظام إحداثيات x / y هذا ، بحيث يكون لكل بكسل في صورة إحداثي x / y يحدد موقعه داخل شبكة الصور. مخطط الصورة كل بكسل - صغير ، لون واحد تنظيم بكسل كشبكة يمكن تحديد كل بكسل بأرقام x و y و "address" س = 0 ، ص = 0 العلوي الأيسر - (0 ، 0) س = 1 ، ص = 0 بكسل واحد على اليمين - (1 ، 0) لن نستخدم مستوى x ، y المفصل سؤال: كيف يتم ترميز لون البيكسل؟ شبكة بكسل مع إحداثيات س ، ص يتم تنظيم البيكسلات كشبكة ، مع تحديد كل منها بإحداثيات (س ، ص) ، بحيث يمكن تحديد كل بكسل بواسطة عنوانه (س ، ص) س = 0 ، ص = 0 هو الجزء العلوي الأيسر - ويعرف أيضا باسم (0 ، 0) بكسل أعلى اليسار من الصورة بأكملها x = 1 ، y = 0 هي البيكسل 1 إلى اليمين - الملقب (1 ، 0) x = 2 ، y = 0 هي البيكسل 1 إلى اليمين - الملقب (2 ، 0) - لا يزال في الصف العلوي كيف يتم تشفير لون كل بكسل؟ جانبا - نيوتن اللون موشور تجربة نيوتن الشهيرة الضوء الأبيض - مقسمة إلى ألوان نقية ومستمرة الأحمر والبرتقالي والأصفر والأخضر والأزرق والنيلي والبنفسجي (ROY G BIV) الألوان النقية مثل لوحة قم بتشغيل التجربة للخلف للحصول على اللون الأبيض شيء مضحك عن "النيلي" تجربة نيوتن موشور قام السير إسحاق نيوتن بتجربة المنشور الشهيرة ، حيث أظهر أن الضوء الأبيض يتكون من طيف ملون نقي. إليكم صورة للتجربة في طابقي. تأتي أشعة الشمس البيضاء من اليسار إلى المنشور الزجاجي الثلاثي الذي يفصل الضوء. عند الخروج من المنشور لدينا مجموعة مستمرة من الألوان النقية ، ويتم اختيار عدد قليل منها بالاسم: الأحمر ، البرتقالي ، الأصفر ، الأخضر ، الأزرق ، النيلي ، البنفسجي (ROY G BIV). قصة مضحكة: لماذا تضيف "نيلي" إلى هناك ، بدلاً من مجرد تركها باللون الأزرق؟ يعكس تصوف عصره ، شعر نيوتن أن عدد الألوان يجب أن يتطابق مع عدد الكواكب ، التي كانت في ذلك الوقت سبعة. نظام الألوان RGB - أحمر أخضر أزرق كل بكسل هو لون واحد - كيف تمثل؟ RGB مخطط أحمر / أخضر / أزرق اصنع أي لون بمزيج من الضوء الأحمر / الأخضر / الأزرق يختلف عن خلط الدهانات ، هنا يخلط الضوء كيفية تمثيل لون بكسل؟ يعد مخطط الأحمر / الأخضر / الأزرق (RGB) أحد الطرق الشائعة لتمثيل اللون في الكمبيوتر. في RGB ، يتم تعريف كل لون على أنه مزيج معين من الضوء الأحمر والأخضر والأزرق النقي. مستكشف RGB أفضل طريقة لمعرفة كيفية عمل RGB هي مجرد اللعب به. تعرض صفحة RGB Explorer هذه كيف يمكن صنع أي لون من خلال الجمع بين الضوء الأحمر والأخضر والأزرق. RGB - ثلاثة أرقام يمكن تمثيل أي لون بمزيج من الضوء الأحمر / الأخضر / الأزرق يمكن تمثيل أي لون بثلاثة أرقام ليس فقط 0 و 255 ، القيم المتوسطة 12 ، 238 ، 39 مثلا r: 250 غ: 10 ب: 240 - أرجواني ، أو قل فقط "250 10 240" مثلا r: 150 جم: 150 ب: 10 - أصفر داكن ، أو قل فقط "150 150 10" لا تحفظ جميع الألوان ، فقط افهم مخطط RGB الأساسي في الأساس ، يمكن ترميز أي لون على هيئة ثلاثة أرقام .. رقم واحد للأحمر والأخضر والأزرق. اللون أحمر رقم أخضر رقم أزرق أحمر 255 0 0 الأرجواني 255 0 255 أصفر داكن 100 100 0 أبيض 255 255 255 أسود 0 0 0 في RGB ، يتم تعريف اللون على أنه مزيج من المصابيح الحمراء والخضراء والزرقاء النقية ذات نقاط القوة المختلفة. يتم تشفير كل من مستويات الضوء الأحمر والأخضر والأزرق كرقم في النطاق 0.55 ، مع 0 يعني صفر ضوء و 255 يعني أقصى ضوء. على سبيل المثال (أحمر = 255 ، أخضر = 100 ، أزرق = 0) هو اللون الذي يكون فيه اللون الأحمر كحد أقصى ، والأخضر متوسط ، والأزرق غير موجود على الإطلاق ، مما ينتج عنه ظل برتقالي. وبهذه الطريقة ، عند تحديد درجة السطوع 0.55 لمكونات اللون الأحمر والأزرق والأخضر للبكسل ، يمكن تشكيل أي لون. ملاحظة الصباغ - قد يكون لديك ألوان مختلطة ، مثل إضافة الطلاء الأحمر والأخضر معًا. هذا النوع من خلط الألوان "الصباغ" يعمل بشكل مختلف تمامًا عن المزج "الخفيف" الموجود هنا. أعتقد أن خلط الضوء أسهل في المتابعة ، وعلى أي حال هو الأكثر شيوعًا Digital Images In this section we'll look at how digital images work. Digital Images Digital images everywhere Look natural, rounded Behind the scenes: lots of little numbers You see images on computers all the time. Here we will look behind the curtain, seeing how images are put together. What looks like a whole image to us, in the computer is a structure made of many little numbers. Here is an image of some yellow flowers: yellow flowers Zoom In - Pixels Zoom in 10x - small square "pixels" Pixel one solid color, quite small Perceive the whole scene, not tiny pixels Image 800 pixel wide, 600 pixels high image Multiply .. 480,000 pixels (about 0.5 "megapixels") Digital camera 5-20 megapixels zoom in to see pixels Zooming in on the upper left flower, we can see that it is actually made of many square "pixels", each showing one color. Each pixel is a small square that shows a single color An 800 x 600 image is 800 pixels wide by 600 pixels high, 480,000 pixels in all (0.5 megapixels) Digital cameras today produce images with several megapixels per image, say 8000 x 6000 for about 5 megapixels We will not work with individual x/y coordinates too much. You just need to appreciate that there is this x/y coordinate system, so that every pixel in an image has some x/y coordinate that identifies its location within the image grid. Image Diagram Each pixel - small, one color Organize pixels as a grid Every pixel can be identified by x,y numbers, "address" x=0, y=0 upper left -- (0, 0) x=1, y=0 one pixel to the right -- (1, 0) We will not use the x,y detailed level Question: how is the color of the pixel encoded? grid of pixels with x,y coordinates The pixels are organized as a grid, identifying each by an (x, y) coordinate, so every pixel can be identified by its (x, y) address x=0, y=0 is the upper left -- aka (0, 0) the top left pixel of the whole image x=1, y=0 is the pixel 1 to the right -- aka (1, 0) x=2, y=0 is the pixel 1 more to the right -- aka (2, 0) -- still in the top row How is the color of each pixel encoded? Aside - Newton's Color Prism Newton's famous experiment White light - broken up into pure colors, continuous Red, orange, yellow, green, blue, indigo, violet (ROY G BIV) Pure colors as a palette Run the experiment backwards to make white Funny thing about "indigo" newton prism experiment Sir Isaac Newton did the famous prism experiment, showing that white light is made up of a spectrum pure colored light. Here is a picture of the experiment on my floor. White sunlight is coming in from the left into the glass triangular prism which splits up the light. Coming out of the prism we have a continuous range of pure colors, and a few are picked out by name: red, orange, yellow, green, blue, indigo, violet (ROY G BIV). Funny story: why add "indigo" in there, instead of just leave it at blue? Reflecting the mysticism of his time, Newton felt the number of colors should match the number of planets, which at the time was seven. RGB Color Scheme - Red Green Blue Each pixel is one color - how to represent? RGB red/green/blue scheme Make any color with combinations of red/green/blue light Different from mixing paints, here mixing light How to represent the color of a pixel? The red/green/blue (RGB) scheme is one popular way of representing a color in the computer. In RGB, every color is defined as a particular combination of pure red, green, and blue light. RGB Explorer The best way to see how RGB works is to just play with. This RGB Explorer page which shows how any color can be made by combining red, green, and blue light. RGB - Three Numbers Any color can be represented by combination of red/green/blue light Any color can be represented by three numbers Not just 0 and 255, intermediate values 12, 238, 39 e.g. r:250 g:10 b:240 - purple, or just say "250 10 240" e.g. r:150 g:150 b:10 - dark yellow, or just say "150 150 10" Don't memorize all colors, just understand the basic RGB scheme So essentially, any color can be encoded as three numbers .. one each for red, green, and blue. Color Red number Green number Blue number red 255 0 0 purple 255 0 255 dark yellow 100 100 0 white 255 255 255 black 0 0 0 In RGB, a color is defined as a mixture of pure red, green, and blue lights of various strengths. Each of the red, green and blue light levels is encoded as a number in the range 0..255, with 0 meaning zero light and 255 meaning maximum light. So for example (red=255, green=100, blue=0) is a color where red is maximum, green is medium, and blue is not present at all, resulting in a shade of orange. In this way, specifying the brightness 0..255 for the red, blue, and green color components of the pixel, any color can be formed. Pigment Note -- you may have mixed color paints, such as adding red and green paint together. That sort of "pigment" color mixing works totally differently from the "light" mixing we have here. Light mixing is, I think, easier to follow, and in any case, is the most comm على سبيل المثال (أحمر = 255 ، أخضر = 100 ، أزرق = 0) هو اللون الذي يكون فيه اللون الأحمر كحد أقصى ، والأخضر متوسط ، والأزرق غير موجود على الإطلاق ، مما ينتج عنه ظل برتقالي. وبهذه الطريقة ، عند تحديد درجة السطوع 0.55 لمكونات اللون الأحمر والأزرق والأخضر للبكسل ، يمكن تشكيل أي لون. ملاحظة الصباغ - قد يكون لديك ألوان مختلطة ، مثل إضافة الطلاء الأحمر والأخضر معًا. هذا النوع من خلط الألوان "الصباغ" يعمل بشكل مختلف تمامًا عن المزج "الخفيف" الموجود هنا. أعتقد أن خلط الضوء أسهل في المتابعة ، وعلى أي حال ، فهو الطريقة الأكثر شيوعًا التي تقوم بها أجهزة الكمبيوتر بتخزين الصور ومعالجتها. ليس من الضروري أن يكون لديك حدس ، على سبيل المثال ، ما اللون الأزرق = 137. تحتاج فقط إلى فهم أنه يمكن إجراء أي لون من خلال الجمع بين قيم الألوان الثلاثة. مخطط صورة مع RGB الآن لدينا الرسم البياني الكامل للصورة بكسل في الشبكة ، ولكل منها عنوان x و y كل بكسل يحتوي على 3 أرقام لتحديد لونه مكتوب كـ "أحمر: 6 أخضر: 250 أزرق: 7" أو فقط "6 250 7" شبكة من بكسل مع إحداثيات س ، ص وأرقام RGB الموضوع: الانحلال الرقمي كله معقد - "ذري" كسر في الكثير من الأرقام الصغيرة "الكثير من الأرقام الصغيرة" - مجال الكمبيوتر تغيير مرئي لصورة الصورة العبارة كتغييرات على الأرقام في الكمبيوتر لقد بدأنا مع صورة كاملة ، وقمنا بتقليصها إلى مجموعة كبيرة من العناصر الصغيرة. هذا موضوع شائع في علوم الكمبيوتر - ما يشبه الكل معقدًا عضويًا ، هو "صغير" في الكمبيوتر ... يتكون من مجموعة كبيرة جدًا من العناصر البسيطة جدًا. لذلك يمكننا أن نبدأ مع صورة رقمية كاملة محكم لشيء ما. ثم تقسيمها إلى بكسل مربع صغير. ثم ينقسم كل بكسل إلى 3 أرقام في النطاق 0.55. هذا نمط نموذجي للكمبيوتر - شيء كامل والعضوية ، إذا نظرت وراء الكواليس ، يتم تقسيمها وتمثيلها في الكثير من الأرقام الصغيرة. So for example (red=255, green=100, blue=0) is a color where red is maximum, green is medium, and blue is not present at all, resulting in a shade of orange. In this way, specifying the brightness 0..255 for the red, blue, and green color components of the pixel, any color can be formed. Pigment Note -- you may have mixed color paints, such as adding red and green paint together. That sort of "pigment" color mixing works totally differently from the "light" mixing we have here. Light mixing is, I think, easier to follow, and in any case, is the most common way that computers store and manipulate images. It's not required that you have an intuition about, say, what blue=137 looks like. You just need to understand that any color can be made by combining the three color values. Image Diagram with RGB Now have the complete diagram of an image Pixels in a grid, each with an x,y address Each pixel has 3 numbers to define its color Written as "red:6 green:250 blue:7" Or just "6 250 7" grid of pixels with x,y coordinates and RGB numbers Theme: Digital Atomization Complex whole - "atomized" Broken down into lots of little numbers "Lots of little numbers" -- the domain of the computer Visual change to the image image Phrase as changes to the numbers in the computer We started with a whole image, and reduced it to a big collection of small elements. This a common theme in computer science -- what looks like an organic complicated whole, is "atomized" in the computer ... made up of a very large collection of very simple elements. So we can start with a whole, textured digital image of something. Then break it down into small square pixels. Then each pixel breaks down to 3 numbers in the range 0..255. This is a typical computer pattern -- something whole and organic is, if you look behind the scenes, is broken down and represented as a lot of little numbers. دارين: إذن الأسبوع الثاني ، الأسبوع المثير للاهتمام. تحدثنا كثيرا عن بعض الأساسيات الأساسية في التسويق - أبحاث السوق وتجزئة. وأردت أن أبدأ تقريرنا الصغير عن الحديث قليلاً عن التجزئة. لأن شيئًا واحدًا كثيرًا ما طُلب مني ، بولس ، هو عدد المرات التي يجب أن تفكر فيها شركة أو منظمة في تقسيمها أو بناء نظام أو سؤال هيكل تجزئة؟ هل هذا شيء يحدث مرة كل شهر ، مرة كل خمس سنوات؟ عندما تقدم نصيحة للمنظمات ، ماذا هل تقول لهم أن يفعلوا عندما يتعلق الأمر بتجزئة؟ بول: الجواب القصير على ذلك هو أنه يعتمد. الآن ، بالطبع-- دارين: أنت تبدو كمسوق. بول: بالطبع ، هذه ليست إجابة مرضية للغاية ، لكن دعنا نستكشف ما يعتمد عليه. لذلك يعتمد على بعض الأشياء. إذا كنت في صناعة ساكنة للغاية ولديك عملاء اليوم الذين هم مشابهون جدا لتلك التي كنت أمس ، قد لا تحتاج إلى إعادة تقسيم حسابك كثيرًا. ومع ذلك ، إذا كنت في خلية صناعة سريعة التغيير الهواتف وألعاب الفيديو وما إلى ذلك-- قد تجدها أنك تريد مراجعة التجزئة بشكل أكثر تكرارًا. ليس شهريا ، لكنك بالتأكيد قد تفعل ذلك على أساس سنوي. وتجربتي هي أن معظم المنظمات التي أتحدث معها ارتكاب بعض الأخطاء الأساسية مع التجزئة. بادئ ذي بدء ، انهم واسع جدا في ما يفعلونه. لذلك لم يذهبوا إلى مستويات كافية من المستويات المختلفة والمعايير التي حددناها عندما ذهبنا من خلال الأدوات. وثانياً ، لا يقومون بمراجعتها في كثير من الأحيان. تبقى واسعة جدًا وثابتة جدًا بمرور الوقت ، وقد تغيرت السوق من حولهم ثم يلعبون أو أنهم في وضع رجعي. دارين: هذا أمر منطقي. إطلاقا. بول: كنت أرغب في اللعب معك مرة أخرى. في نهاية الأسبوع الماضي ، تحدثنا عن البعض من أوجه التشابه والاختلاف بين العمل إلى المستهلك مقابل الأعمال التجارية إلى الأعمال أو الإعداد الصناعي ، وأردت أن ألعبها هنا فيما يتعلق بالتقطيع. كما قلنا مرات قليلة ، لقد مالت لاستخدام الكثير من الأمثلة التي تواجه المستهلكين لأنها أكثر سهولة في الوصول إليها قادرة على فهم وربط. لكن الكثير من الناس يأخذون هذه الدورة ، سيكونون في الصناعة ، والأعمال التجارية إلى إعدادات الأعمال. إذن كيف ترى تجزئة اللعب هناك؟ أعني ، هناك علاقة واسعة ، لكن هل يمكن أن تعطينا قصة صغيرة؟ A mini one that kind of bring to life؟ دارين: ليس 10 دقائق؟ بول: مجرد واحد صغير. دارين: مجرد مصغر. حسنا ، إنه سؤال رائع وواضح التي غالباً ما نفعلها هنا هي كيف تفكر حول التجزئة في سياق B2B؟ وأنا أعلم عندما كنت تقدم أفكارك حول هذا الموضوع ، كنت تتحدث عن واحدة من أسس التجزئة في الأعمال التجارية هو التفكير في التركيبة السكانية للأعمال التجارية أو ما أسميه الشركة. ما حجم الشركة؟ كم عدد الموظفين؟ ما هي عائداتها؟ كم عدد خطوط المنتجات؟ ويمكنك استخدام ذلك كجزء من قاعدة التجزئة الخاصة بك. سأطرح قصة تضيف عنصرا آخر وهذا قصة عن شركة تدعى لافارج. و lafarge هي منظمة تقوم بها ملموسة - واحدة من قادة العالم ، في الواقع ، في تصنيع الخرسانة. وتتحدث قصة رائعة حقًا عن كيفية تقديمهم للتسويق في الانضباط. لأن لسنوات عديدة ، فإن "لافار as" قد يجادل البعض بأن صناعة من نوع السلع لم يكن لديه نائب رئيس التسويق. وقبل حوالي 15 سنة أو أكثر ، استأجروا نائبًا للرئيس التسويق - زميل سابق في ماكينزي. وعندما جاء إلى المنظمة ، هو فعلت ما تريد معظم الوحدات الجديدة أن تفعله على الفور هو إظهار قيمة التسويق في المنظمة. ونظر إلى نظام التجزئة الذي استخدمه لافارج. وما يثير الاهتمام هو أنه كان مخصصًا جدًا في الطبيعة. وبشكل أساسي ، مع كل عميل ، سيكون لديهم إبرام صفقة وفقا لمن كان في الغرفة ومهما كان معنى في تلك المناسبة. وهكذا كان قادرًا جدًا على بناء نظام تجزئة التي ركزت على كلٍّ من المعلومات الثابتة و ما قد يفعله بعض الناس استدعاء التجزئة السلوكية. وما أعنيه بالتجزئة السلوكية هو ينظر إلى سلوك الشراء للعملاء. وبعبارة أخرى ، ما هو نوع حجم الكمية التي يشترونها؟ كم مرة اشتروا؟ ماذا كانت دورة الشراء؟ كيف ذهبوا في الواقع بشأن إصدار أمر؟ والنظر في كل تلك المعلومات السلوكية ، كان قادرا على عبور نوعي أنظمة التجزئة باستخدام كل من firmographics-- على سبيل المثال ، حجم المنظمة ذلك كان شراء وكذلك كيف كانوا في الواقع شراء - وإنشاء هيكل للمنظمة. حتى يتمكنوا من القيام بعمل جيد من حيث الأسعار والتسليم. والكمان العظيم حقا في هذه القصة هو أنه بعد ست سنوات ، كان قادرا على الإشارة إلى حقيقة أنه قد صنع المنظمة 100s من ملايين الدولارات فقط عن طريق تبديل بسيط جدا إلى تجزئة هيكل من المنطقي. بول: حسنًا ، شكرًا. أنا حقا أحب هذه القصة لأنها حقا يلعب مرة أخرى إلى طبقات من معايير التجزئة المختلفة التي تحدثنا عنها. وأنا أيضا معجب جدا في هذا الأسبوع كنت قد تمكنت من نوع من segue من الملابس الداخلية إلى السيارات الفاخرة من خلال ملموسة. ويثبت المثل القديم القائل بأن المسوق الجيد يمكنه العمل مع أي فئة. لذلك شكرا لتقاسم هذا واحد. دارين: بالتأكيد. لدي واحد آخر لهذا اليوم. وقد تحدثنا كثيرًا عن التجزيء في الجزء الأخير القليل هنا ، لكني أردت أن أسألك كيف يرتبط البحث التسويقي - موضوعنا الأول - والتجزئة في الواقع؟ هل هذه البنى مستقلة تماما؟ هل هناك شيء يمكننا تعلمه عندما نفكر في كلاهما معاً؟ بول: هذه طريقة جيدة بالنسبة لي للبدء في مساعدة الجميع على رؤية كيف سنستمر في هذه الدورة بأكملها. لقد تم تفريغ الانضباط التسويق في هذه الموضوعات المختلفة حتى يتمكن الناس من فهم المبادئ الأساسية. ثم لاستخدامها بشكل جيد ، سنقوم بدمجها مرة أخرى. وتعتبر الأبحاث المتعلقة بالتقطيع والتسويق من الأمثلة الجيدة على المكان الذي يمكننا فيه البدء في وضع اثنين من هذه المجموعات البنائية الفردية معاً والحصول على بعض التأثيرات التآزرية. ولذا عندما ننظر إليها بعناية ، فإن التقسيم يتعلق بالقدرة على الفصل من مجموعة كبيرة من المعلومات والبيانات والقدرة على تحديد بعض القواسم المشتركة ، وقياسها. وبهذا المعنى ، نحن نستخدم أبحاث السوق من أجل جمع المعلومات ، ومن ثم بعد التحليل ، نستخدمها كشكل من أشكال القياس والإبلاغ. لذلك لديهم الكثير من القواسم المشتركة ، وهي طريقة جيدة للبدء في رؤية هذه الأشياء تعود مرة أخرى. بينما نمضي قدمًا خلال بقية البرنامج ، ستبدأ في رؤية كيف يمكنك أن تأخذ تركيبات مختلفة من اثنين أو ثلاثة من وحدات البناء وتدمجها للحصول على تأثير أكبر. دارين: ممتاز. حسنا ، نتطلع إلى الأسبوع المقبل. بول انا كمان. في هذا القسم ، أود الوصول إلى النقطة التي أنت فيها يمكن كتابة بعض التعليمات البرمجية ، وتشغيلها ، ونرى ما يفعله. كل شيء في الكمبيوتر يأتي حقا إلى أسفل إلى رمز التشغيل ، وهذا كيف يحدث الأشياء. وهكذا ، من أجل فهم طبيعة أجهزة الكمبيوتر ، حسنا ، أنت تضطر إلى تشغيل رمز قليلا ونرى كيف يعمل. ليس مثل مليون سطر من التعليمات البرمجية ، فقط قليلا من التعليمات البرمجية. هذه هي الطريقة التي سنقوم بها في CS101. الآن ، قبل أن أحصل على الكود ، سأحصل عليه ل ، يجب أن نسأل عن القليل من الصبر. عناصر الكود التي سأريكها هنا فقط ، أنها ليست براقة ، فهي بسيطة للغاية. ربما يكون نوعًا ما مثل طوب Lego. يجب أن تظهر لك زوجين الأساسية الطوب الذي لا يفعل أي شيء بشكل فردي ، ولكن في وقت لاحق سنكون قادرين على وضع لهم معا والقيام بأشياء هذا رائع فقط. فقط عن طريق التنبيه: في غضون ساعات قليلة ، ستتمكن من كتابة التعليمات البرمجية التي تتعامل مع الصور. مثل على سبيل المثال هنا لدينا القرد والقمر والموز. لذلك هناك شيء نتطلع إليه ، لكن اليوم بسيط للغاية. جافا سكريبت هي لغة الكمبيوتر. هناك الكثير من لغات الكمبيوتر المختلفة لك يمكن استخدامها لإعلام الكمبيوتر بما يجب القيام به. جافا سكريبت هي التي سنستخدمها في CS 101 أو في الواقع JavaScript بالإضافة إلى القليل من الأشياء الإضافية التي وضعت في CS 101 فقط. CS 101 لا يغطي كامل جافا سكريبت اللغة ، هذه ليست فئة البرمجة المهنية الكاملة. بدلاً من ذلك ، اخترت بعض الميزات فقط الحد الأدنى الذي نحتاجه من أجل اللعب مع الأفكار الرئيسية لفهم حقا كيف تعمل أجهزة الكمبيوتر. كل الحق ، لذلك هنا المثال الأول لدينا. لذلك ، يحتوي هذا المستطيل على كود به ، يمكنك الكتابة هنا. وعندما أقوم بالنقر فوق الزر "تشغيل" ، فإن ما يفعله الكمبيوتر هو أنه يعمل فقط ذلك ، يفعل ذلك ، يفعل ذلك ويذهب من خلالهم ، ويفعل ما أقوله. في هذه الحالة ، فإن أول شيء سنراه هو وظيفة الطباعة ، و التي تخبر الكمبيوتر بطباعة شيء هنا على الجانب الأيمن. لذلك تحتوي على كلمة "طباعة" ومن ثم يتبعها قوس الأيسر ثم بعد قوس ، نحن فقط اكتب ما إنه ، نريد الكمبيوتر لطباعة. لذلك في هذه الحالة ، نرى فقط ستة وما فوق هنا ، على اليمين ، يطبع ستة. إذا أردت تغيير ذلك إلى 123 ثم تشغيله بالتأكيد بما يكفي سنحصل على 123 هنا. يمكنك الحصول على أشياء متعددة في داخل أقواس هنا ، لذلك يمكنني فصلهم بفواصل. لذلك إذا قلت ، 2،12 وأنا أديرها ، وسنحصل على هذه الأشياء. لذلك يمكنك أن ترى هناك أيضًا نسخة مطبوعة ، إثنتان هنا توضح ذلك. إذاً ، هذا نوع محدود جدًا ، لكن هذا هو أول شيء لدينا. كما أنه يوفر لك مثالًا بسيطًا على التفاعل فقط بين الكود وزر التشغيل الذي يؤدي إلى قيام الكمبيوتر بذلك. الآن ، بناء الجملة الذي تراه هنا ، محدود للغاية. انها ليست كما لو كنت تستطيع فقط كتابة بعض الجملة شكل حر. سوف الكمبيوتر فقط معرفة ما تقصد. انها حقا عكس ذلك تماما. هناك عدد قليل من الكلمات التي الكمبيوتر يفهم هنا وعليك استخدام واحد من هؤلاء. ثم أيضًا الأجزاء الأخرى من بناء الجملة مثل الحقيقة أن هناك قوس الأيسر هنا وقوس الأيمن هناك. كل هذه الأشياء مطلوبة. ويجب أن ، كل شيء يجب أن يكتب فقط ، فقط حتى يتمكن الكمبيوتر من فهمه. هذا ليس مجرد قيود غير مبررة على الكود. بدلاً من ذلك ، يكون الرمز محدودًا باعتباره انعكاسًا للنوع الداخلي الميكانيكية ، نوع من الغباء الكمبيوتر الذي كنت أتحدث عن آخر مرة. لذلك ليس من قبيل الصدفة أن رمز ، من أجل الكمبيوتر ل لتكون قادرة على فهم ذلك ، يجب أن يكون في هذا النوع من الميكانيكية ، شكل صارم In this section, I want to get to the point where you can write some code, and run it, and see what it does. Everything in the computer really comes down to code running, that's how stuff happens. And so, in order to understand the nature of computers, well, you have to run code a little bit and see how it works. Not like a million lines of code, just a little bit of code. That's how we're going to do it in CS101. Now, before I get to the code, I'm going to have to, have to ask for a little bit of patience. The code elements that I'm going to show you here are just, they're not flashy, they're very simple. It's maybe a little sort of like Lego bricks. I have to show you a couple basic bricks that individually don't really do anything, but later we're going to be able to put them together and do stuff that's just fantastic. Just by way of foreshadowing: within a few hours, you'll be able to write code that manipulates images. Such as for example here we have the monkey, moon and banana. So there's something to look forward to, but for today it's just very simple. Javascript is a computer language. There's a lot of different computer languages you can use to tell the computer what to do. Javascript is the one we're going to use in CS 101 or it's actually JavaScript plus a little bit of extra stuff that I put in just for CS 101. CS 101 does not cover the entire JavaScript language, this is not a full professional programming class. Instead I've picked out just a few features just the minimum that we need in order to play with the key ideas to really understand how computers work. All right, so here's our first example. So, this rectangle has code in it, you can type in here. And when I click the run button what the computer does is it just runs it, it does that, does that and just goes through them, and does whatever I say. In this case, the first thing we're going to see is the print function, and that tells the computer to print something over here to, on the right hand side. So it has the word print and then its followed by a left parenthesis and then after the parenthesis, we just type out whatever it is, we want the computer to print. So in this case, we just see a six and so over here, on the right, it prints a six. If I were to change that to a 123 and then run it sure enough we get a 123 over here. You can have multiple things in within the parentheses here, so I can they're separated by commas. So if I said ,2,12 and I run it, and we'll get those things. So you can see there's also a print one, two down here showing that. So this is, this is very kind of limited, but that's our first thing, print. And it also gives you a little example of just the interaction between code and a run button that causes the computer to do it. Now, the syntax that you see here, is very limited. It's not like you can just write out some sentence free form. The computer will just figure out what you mean. It's really quite the opposite. There's a small number of words that the computer understands here and you have to use one of those. And then also the other bits of syntax like the fact that there's a left parenthesis here and a right parenthesis there. All those things are required. And the have to, everything has to be written out just, just so for the computer to be able to understand it. That is not just a gratuitous limitation of the code. Instead the code is limited sort of as a reflection of the inner sort of mechanical, sort of stupidity of the computer that I was talkin' about last time. So it is not an accident that the code, in order for the computer to be able to understand it, has to be in this sort of mechanical, strict form. والخبر السار هو أنه لأنه بسيط ، إنه ليس كذلك من الصعب علينا أن نستخدمها ، إنها مجرد أجنبي قليلاً. لكنني أحب أن أفكر في ذلك كنوع من هذا جيد يعطينا فكرة بسيطة عن الطبيعة الميكانيكية البسيطة للكمبيوتر. على أي حال ، فإن الخبر السار هو أنه يمكنك ، يمكنك التعود على ذلك. يبدو غريبًا ولكنه بسيط جدًا. حسنًا ، لذلك اسمحوا لي أن أقدم جزءًا ثانيًا من الكود هنا. أوه ، قبل أن يفعلوا ذلك ، لدي تذكير بنفسي هنا. هكذا ، كما ذكرت من قبل ، كل فيديو يأتي مع هذا المستند هكذا يمكنك إيقاف الفيديو مؤقتًا الآن والانتقال إلى زيارة المستند. وفي الوثيقة ، كل هذه الأشياء مع زر التشغيل ورمز يمكنك فقط محاولة نفسك ، أو بالطبع في وقت لاحق بعد محاضرة هل يمكن أن تذهب ومحاولة القيام بذلك كما الاستعراض. حسنًا ، إذن هذا هو الجزء الثاني من الشفرة. لذلك سأقوم بتشغيل هذا ، لذلك يقول "6 ، مرحباً". وهذا "مرحبًا" بين اقتباسات مزدوجة ، هذه سلسلة. لذلك ، في كود الكمبيوتر ، السلسلة هي مجرد سلسلة من الحروف. وفي الكود يتم كتابتها بين علامات اقتباس مزدوجة. إذن ، هناك الكلمة hi ، أو يمكنني تغييرها إلى ، woo hoo ضمن علامات اقتباس مزدوجة. عندما أقوم بتشغيله ، سوف يقوم بطباعة woo hoo هنا. لذلك ، يمكنك أن تتخيل السلاسل والسلاسل والأرقام أنواع البيانات شائعة جدًا في رمز الكمبيوتر. يمكنك أن تتخيل استخدام سلسلة ، وربما لعقد عنوان URL أو فقرة ، إذا كنت تكتب شيئًا ما. يتم تخزين كل هذا النوع من التلاعب بالنص ، على شكل سلاسل في الكمبيوتر. هذا مجرد نوع بيانات ثاني سنكون عليه قادرة على استخدام لإخبار الكمبيوتر كيف تفعل الأشياء. شيء آخر نراه هنا هو تعليق. لذا ، يبدأ التعليق بخطين مائلين كهذا وهو يعمل فقط إلى نهاية السطر. وفي التعليق ، يمكنك فقط كتابة ملاحظات على نفسك ، ما كنت تقصد أو ما يحدث والكمبيوتر ، متى نضغط على زر التشغيل ، الكمبيوتر يعرف فقط تجاهل التعليق لذلك هو مجرد وسيلة لتزيين الكود مع القليل من الملاحظات. كل الحق ، حتى أتمكن من وضع أشياء مختلفة هنا. إذا قلت مرحبا أو أيا كان ، أيا كان ما وضعت هناك ، إنها مجرد سلسلة بحيث يمكن طباعتها. نوع واحد من مثال مضحك يمكنني القيام به هنا ماذا لو وضعت كلمة الطباعة هناك ، منذ ذلك الحين هذا هو أيضًا اسم الوظيفة هنا ، لذلك يمكننا أن نرى ما الذي يفعله ، فقط جربه. انقر فوق زر التشغيل. إنه يضع فقط ، إنه يطبع فقط الطباعة. لذلك عندما يتم تضمين الحروف التي أكتبها ، أرفقها ونقلت مزدوجة مثل هذا ، الكمبيوتر يفهم أنهم مجرد بيانات سلبية. وهذا يعالجهم بالطريقة المعتادة. لا تشعر بالارتباك من أي كلمة أضعها هناك. لذلك ، رسالة رئيسية هنا حول بناء الجملة. تحدثت عن بناء الجملة قبل قليل حول كيفية ميكانيكية. ولكن هناك نمط عند كتابة رمز ذلك ينطوي على بناء الجملة وهذا هو عندما تكتب فقط في رمز ، يا طباعة هذا أو أيا كان ، هو شائع جدا حتى ل المبرمجين المحترفين جدًا من الشائع جدًا وجود أخطاء في بناء الجملة. وهكذا ، عندما يضرب المبرمج المحترف زر التشغيل ، إنه أمر شائع جدًا ، سيكون هناك أخطاء في بناء الجملة. والبرنامج هو مجرد الذهاب وإصلاح تلك. بسرعة كبيرة ، ولا تفكر في شيء. إنها مجرد عملية سريعة ، صغيرة ، صغيرة. السبب في ذكر ذلك ، هو عندما يبدأ شخص ما بالكود ، بالطبع ، سوف يركضون أخطاء بناء الجملة 'السبب هذا هو الشيء المشترك. أعتقد أنهم يمكنهم الحصول على الانطباع الخاطئ بأن خطأ في بناء الجملة يعني أوه ، واو ، أنا حقا لا أفهم هذا. أنا ، كما تعلمون ، لا أحد لديه هذه المشكلة. وهذا لا يمكن أن يكون أبعد عن الحقيقة ، كل شخص لديه أخطاء في بناء الجملة. إنه مجرد شيء تقوم بإصلاحه بسرعة كبيرة. لذلك ، لتعزيز هذه الفكرة أن الخطأ في بناء الجملة ليست مجرد صفقة كبيرة ، وأريد أن أوضح لك كيفية إصلاحه ، لقد أعددت بعض الأمثلة هنا. مجرد مجموعة من أمثلة التعليمات البرمجية التي تحتوي جميعها على أخطاء في بناء الجملة. وأريد فقط إجراء نوع من العمل من خلال عملية تحديدها وإصلاحها. لذلك كل واحدة من هذه الكتل من التعليمات البرمجية هي من المفترض أن ينتج هذا قليلاً ، ب ، ب ، ج ، ج ، ج المطبوعة وكل واحد من هؤلاء لديه خطأ وأريد فقط أن تمر عبر تعرف ، إصلاحها. حسنًا ، فلنحاول النقر على هذه التجربة أولاً. دعونا نرى حتى نتلقى رسالة الخطأ هذه. في بعض الأحيان تكون رسائل الخطأ مفيدة ، وأحيانًا تكون مشوشة. لذلك ، ولكن يجب عليك على الأقل قراءة رسالة الخطأ. لذلك يقول ، "خطأ: لم يتم تعريف prlnt." غير محدد يعني أنها كلمة ولكن الكمبيوتر لا يعرف هذه الكلمة. لذلك إذا نظرت بعناية ، سترى هنا ، ذلك الثانية ، بدلاً من قول "طباعة" ، تقول prlnt. واخترت l ، 'السبب ، بدا الأمر وكأنه i. كنت أحاول أن أكون خادعة. المفتاح هناك ، لذلك سوف أضع المؤشر هناك ، سوف مجرد تغيير ذلك إلى أنا ، والآن أركض. حسنًا ، إنه يعمل. ودعنا نذهب [غير معروف]. خطأ غير منتهية السلسلة الحرفية. ليس الصياغة الأكثر ودية. لذلك لديه سلسلة الكلمات في هناك ، وهذا هو تلميح. سلسلة حرفية هو هذا النموذج حيث لديك اقتباس مزدوج والسلسلة داخل علامات الاقتباس. وما تراه هنا هو الأوان The good news is that because it's kind of simple, it's not very hard for us to use, it's just a little bit foreign. But I like to think of that as sort of oh well that's giving us a little insight about the mechanical, simple nature of the computer. Anyway, the good news is you can, you can get used to it. It looks weird but really it's pretty simple. All right, so let me introduce a second bit of code here. Oh, before they do that I have a reminder to myself here. So, as I mentioned before, each video comes with this document so you could pause the video right now and go visit the document. And in the document, all these things with the run button and the code you can just try yourself, or of course maybe later after a lecture you could go and try do it as review. All right, so here's our second bit of code. So I'll run this, so it says "6, hi". And that "hi" in between double quotes, that's a string. So, in computer code, a string is a, just a series of letters. And in the code it's written in between double quotes. So there's the word hi, or I could change it to, woo hoo within double quotes. When I run it, it's going to print the woo hoo over here. So, you can imagine strings, strings and numbers, are the two very common data types in computer code. You can imagine a string is used, maybe to hold a URL or a paragraph, if you are typing something. All that sort of text manipulation, is stored as strings in a computer. That's just a second data type that we're going to be able to use to tell the computer how to do stuff. Another thing that we see here is a comment. So, a comment begins with two slashes like that and it just runs to the end of the line. And in the comment, you can just sort of write notes to yourself, what you intended or what's going on and the computer, when we click the run button, the computer just knows to ignore the comment so it's just a way of decorating the code with little remarks. All right, so I can put different things in here. If I say hello or whatever, whatever I put in there, it's just a string so that it can get printed out. One sort of funny example I could do here is what if I put the word print in there, since that is also the name of the function over here, so we can see what that does, just try it. Click the run button. It just puts, it just prints print there. So when letters that I type are include, are enclosed by double quotes like this, the computer understands that they're just passive data. And it just handles them the regular way. It doesn't get confused by what word I put in there. So, a key message here about syntax. I talked about syntax a little bit before about how it's mechanical. But there's a pattern with when you write code that involves the syntax and that is when you just write in code, oh print this or whatever, it's very common even for very professional programmers it's very common to have little syntax errors. And so, when the professional programmer hits the run button, it's very common, oh there'll be a couple syntax errors. And the program is just going to go in and fix those. Very quickly, and think nothing of it. It's just a quick, superficial, little process. The reason I'm mentioning this, is when someone is just beginning with code, of course, they're going to run into syntax errors 'cause that's the common thing. I think they can get the mistaken impression that the syntax error means oh, wow, I really don't understand this. I, you know, no one else has this trouble. And that couldn't be farther from the truth, everyone has syntax errors. It's just something you fix very quickly. So, to promote this idea that the syntax error is just no big deal, and I want to show you how to fix it, I've prepared some examples here. Just a bunch of code examples all of which have syntax errors. And I just want to sort of work through the process of identify and fixing them. So each one of these blocks of code is supposed to produce this little a, b, b, c, c, c printout and each one of these has an error and I just want to go through you know, fixing them. All right so let's try clicking this try this first one. Let's see so we're getting this error message. Sometimes the error messages are helpful, and sometimes, they're just confused. So, but you should at least read the error message. So it says, "Error: prlnt is not defined." Not defined means it's a word but that the computer doesn't know that word. So if I look carefully, you'll see here, that second one, instead of saying "print," it says prlnt. And I chose the l, 'cause it, it looked kind of like an i. I was trying to be tricky. key there, so I'll put the cursor there, I'll just change that to an I, and now I run. Okay, it works. And let's go [UNKNOWN]. Error unterminated string literal. Not the most friendly phrasing. So it has the word string in there, that's a tipoff. String literal is this form where you have double quote and the string inside the quotes. And what you'll see here is unterm دعونا نجرب هذا واحد. خطأ ، مفقود قوس الأيمن بعد قائمة الوسيطة. أوه نعم ، بالتأكيد ، انظر. لذلك في هذه الحالة ، كانت رسالة الخطأ في الحال. لذا ضع المراجع هناك. حسنًا ، سأحاول هذا. خطأ ، المراجع المفقودة بعد ، أوه الآن في هذه الحالة ، أنا أنظر ، القوس الصحيح موجود. في بعض الأحيان تكون رسالة الخطأ مشوشة. على الأقل هو تسليط الضوء على الخط الصحيح في هذه الحالة. لذلك عليك أن تبدو نوعا من الحذر. وأعتقد أن هذا هو واحد خفية قليلا. نعم ، اطبع bb يبدو صحيحًا ولكن إذا نظرت إليه السطر التالي ، نرى لديهم هذا واحد لديه فاصلة. إنه مثل أوه ، حسنًا ، نفتقد الفاصلة بعد العنصر الأول. حسنًا ، الآن يعمل. حسنًا ، سأفعل أكثر من ذلك. هذا واحد له خطأ في بناء الجملة. هذا تعليق. سوف استخدم ذلك. دعونا نرى ، خطأ ، هناك أقواس مفقودة. سوف أركض مرة أخرى ولا يزال هناك خطأ لم يتم تعريف الكلمة التي لا يعرفها بحيث يجب طباعتها. حسنا ، هذا يعمل. سأترك هذا واحد يمكنك زيارة إذا كنت تهتم وهنا أيضًا مشكلة مثال يمكنك تجربتها إذا أردت. أحيانًا في المستند ، إذا رغبت في ذلك ، يمكنك زيارة الزيارة والمحاولة. لقد رأينا وظيفة الطباعة ، وكيفية تسميتها ، العملية الأساسية ، كما تعلمون ، النقر على زر التشغيل ورؤية رمز التشغيل وإصلاح أخطاء بناء الجملة. هذه هي كل الأشياء التي تحتاج إلى القيام بها لكتابة رمز أبسط مثل هذا. لذلك ، لخطوتنا التالية ، جربها في التمارين. Let's try this one. Error, missing right parenthesis after argument list. Oh yeah, sure enough, look. So in that case, the error message was just spot on. So put the references there. All right, I'll try this one. Error, missing references after, oh so now in this case, I'm looking, the right parenthesis is there. Sometimes the error message is just confused. At least it's highlighting the right line in this case. So you have to look kind of careful. I think this one's a little subtle. Yeah, print bb it looks right but if you look at the next line, see they have this one has the comma. It's like oh, right, we're missing the comma after the first item. All right, now it works. All right, I'll do just one more. This one has two syntax errors. That's a comment. I'll use that. Let's see, error, there's the right parenthesis missing. I'll run again and there is still an error pront is not defined the word it doesn't know so that should be print. All right, that works. I will leave this one that you can visit if you care to and here is also an example problem you can try if you want. Sometimes in the document that if you wanted to you could go visit and try. So we've seen the print function, how to call it, the basic process of, you know, clicking the run button and seeing code run and fixing syntax errors. Those are all the things you need to do to write simpler code like this. So, for our next step, give it a try yourself on the exercises. كتابة التعليمات البرمجية في هذا القسم ، اكتب بعض التعليمات البرمجية وقم بتشغيلها كل إجراء في الكمبيوتر يأتي إلى رمز لفهم طبيعة أجهزة الكمبيوتر ... عليك أن تلعب مع رمز قليلا يشير الرمز إلى اللغة التي يمكن للكمبيوتر فهمها. بالنسبة لهذه المحاضرات ، سنقوم بكتابة وتشغيل قصاصات قصيرة من التعليمات البرمجية لفهم ما هي الصفات الأساسية لأجهزة الكمبيوتر ، وخاصة نقاط القوة والقيود. بتجربة استخدام الكود ، ستظهر طبيعة أجهزة الكمبيوتر بوضوح شديد ... قوية بطريقتها الخاصة ، ولكن بنوعية ميكانيكية محدودة. IMHO ، هذه الطبيعة المختلطة لأجهزة الكمبيوتر هي شيء يجب أن يفهمه الجميع ، لاستخدامهم بشكل جيد ، حتى لا يخيفهم. قبل الترميز - الصبر سنبدأ ببعض الترميز البسيط أدناه أمثلة التعليمات البرمجية الأولى ليست براقة رمز يشبه الطوب ليغو ... القطع الفردية بسيطة للغاية -بناء ما يصل بناء مجموعات كبيرة ولكن علينا أن نبدأ الصغيرة ينذر في غضون ساعات قليلة من المحاضرة ، سنقوم بكتابة رمز التأثير المرئي البسيط مع القرد والقمر والموز: لعبة قرد القمر سطح الموز لكن الآن لدينا فقط print () الصبر سنبدأ بتعلم بعض عناصر البرمجة ، وسنقوم فيما بعد بإعادة تجميع هذه العناصر القليلة لحل العديد من المشكلات. هذه العناصر الأولى بسيطة ، لذا فهي ليست كافية للنظر إليها بمفردها. التحلي بالصبر ، سرعان ما سنضع هذه العناصر معًا - مثل الطوب ليغو - للقيام بمشاريع جميلة وأنيقة. جافا سكريبت Lang Lang الكمبيوتر "Javascript" هي لغة كمبيوتر شائعة تشفير CS101: Javascript + بعض ميزات CS101 المحددة ليست كلها لغة جافا سكريبت ، فقط بت مجرد رمز يكفي لتجربة الأفكار الرئيسية بالنسبة لهذه الفئة ، سنستخدم متغيرًا للغة المعروفة باسم "Javascript" ، مع بعض الميزات المضافة لهذه الدورة. تعمل لغة Javascript في متصفح الويب ، بحيث يمكن لجميع تجاربنا أن تعيش مباشرة في المتصفح دون الحاجة إلى أي شيء آخر. سنلقي نظرة على جافا سكريبت اللازمة لتجاربنا ، وليس اللغة الكاملة التي يمكن للمرء أن يرى باستخدام جافا سكريبت باحتراف. ومع ذلك ، فإن Javascript هي لغة حقيقية ورمزنا رمز حقيقي. تُظهر برامجنا الصغيرة الميزات المهمة للرمز ، مع إبقاء الأمور سريعة وصغيرة. 1. مثال الرمز الأول - طباعة هنا هو رمز الذي يدعو وظيفة "طباعة". انقر فوق الزر "تشغيل" أدناه ، وسيقوم جهاز الكمبيوتر الخاص بك بتشغيل هذا الرمز ، وسيظهر إخراج الرمز إلى اليمين. طباعة (6)؛ طباعة (1 ، 2) ؛ ينفذ Run كل سطر مرة واحدة ، ويمتد من أعلى إلى أسفل الطباعة هي وظيفة - مثل الفعل في الشفرة يتم تمرير الأرقام الموجودة داخل الأقواس (...) إلى وظيفة الطباعة قيم متعددة مفصولة بفواصل التجارب تغير الكود وتعمل بعد أن يرى كل تغيير المخرجات الجديدة: تغيير رقم -إضافة المزيد من الأرقام مفصولة بفواصل داخل الطباعة (...) - انسخ السطر الأول والصقه مرتين بعد السطر الأخير من أنا أعدكم أن إنتاجنا سيصبح أكثر إثارة للاهتمام! بناء جملة التعليمات البرمجية ليست حرة شكل -Syntax من رمز محدودة للغاية وصارمة - انعكاس للطبيعة الداخلية والميكانيكية / الغبية للكمبيوتر لا يمكن تأجيله - "عندما تكون في روما ..." - نحن في زيارة لعالم الكمبيوتر ملاحظة "طباعة" ليست جزءًا طبيعيًا من Javascript ، لقد أضفتها إلى CS101 تذكير: Video + Document - أوقف الفيديو مؤقتًا وجربه بنفسك 2. طباعة سلسلة // السطر أدناه يطبع رقمًا واحدًا وسلسلة واحدة طباعة (6 ، "مرحبا") ؛ طباعة ("مرحبًا" ، 2 ، "وداعًا") ؛ حتى الآن لدينا أرقام ، على سبيل المثال 6 السلسلة عبارة عن سلسلة من الحروف المكتوبة ضمن علامات اقتباس لاستخدامها كبيانات داخل الكود -e.g. "مرحبا" - السلاسل تعمل مع وظيفة الطباعة ، بالإضافة إلى الأرقام - تعليق في نص مخزن الكمبيوتر ، مثل عناوين url أو نص الفقرات ، إلخ. يبدأ التعليق بـ // ويمتد حتى نهاية السطر. طريقة لكتابة ملاحظات حول الكود ، يتم تجاهلها بواسطة الكمبيوتر. التجارب: ، تحرير النص داخل سلسلة -إضافة المزيد من السلاسل مفصولة بفواصل -إضافة سلسلة "طباعة" - داخل السلسلة هو مجرد بيانات ، لا يعامل كرمز رمز مقابل البيانات كود = التعليمات التي يتم تشغيلها البيانات = الأرقام الخاملة ، الأوتار ، يتم التعامل معها بواسطة الكود لاحظ أنه يتم التعرف على الطباعة كدالة في الكود مقابل سلسلة "الترحيب" والتي هي مجرد بيانات غير فعالة (مثل الأفعال والأسماء) يتجاهل الكمبيوتر التعليقات ، لذلك فهي مجرد وسيلة لك لتدوين ملاحظات لنفسك حول ما الرمز يفعل. يمكن استخدام التعليقات لإزالة سطر من الشفرة مؤقتًا - "تعليق" الكود ، عن طريق وضع "//" على التفكير في بناء الجملة والأخطاء (رسالة رئيسية!) بناء جملة - نص التعليمات البرمجية منظم للكمبيوتر خطأ شائع جدا - تكتب في التعليمات البرمجية ، مع مشكلة في بناء الجملة طفيفة المبرمجين المحترفين يقومون بهذا النوع من "الخطأ" طوال الوقت لحسن الحظ ، من السهل جدا إصلاح ... لا تقلق بشأن ذلك ليس انعكاسًا لبعض عيوب المؤلف يحصل المحترفون على أخطاء في بناء الجملة طوال الوقت يمكن إخراج المبتدئين عن طريق أخطاء بناء الجملة ، معتقدين أنهم يرتكبون بعض الأخطاء الكبيرة أمثلة أدناه لتلقيحك: مجموعة من الأخطاء اللغوية النموذجية + إصلاحها إصلاح هذه الأخطاء الصغيرة هو صغير طبيعي Code Writing In this section, write some code and run it Every action in the computer comes down to code To understand the nature of computers... You have to play with code a little Code refers to the language the computer can understand. For these lectures, we'll write and run short snippets of code to understand what the essential qualities of computers, and especially their strengths and limitations. Experimenting with code, the nature of computers will come through very clearly ... powerful in their own way, but with a limited, mechanical quality. IMHO, this mixed nature of computers is something everyone should understand, to use them well, to not be intimidated by them. Before Coding - Patience We'll start with some simple coding below First code examples are not flashy Code is like lego bricks... -Individual pieces are super simple -Eventually build up great combinations But we have to start small Foreshadowing Within a few hours of lecture, we'll be writing simple visual effect code with the monkey, moon, and banana: toy monkey moon surface banana But for now we just have print() Patience We're going to start by learning a few programming elements, and later we'll recombine these few elements to solve many problems. These first elements are simple, so they are not much to look at on their own. Be patient, soon we'll put these elements together -- like lego bricks -- to make pretty neat projects. Javascript Computer Langauge "Javascript" is a popular computer language CS101 coding: Javascript + some CS101 specific features Not the whole Javascript language, just bits Just enough code to experiment with key ideas For this class, we'll use a variant of the language known as "Javascript", with some added features for this course. The Javascript language works in the web browser, so all of our experiments can live right in the browser with nothing else required. We'll look at just the of Javascript needed for our experiments, not the full language one would see using Javascript professionally. That said, Javascript is a real language and our code is real code. Our small programs show the important features of code, while keeping things fast and small. 1. First Code Example - Print Here is code which calls the "print" function. Click the Run button below, and your computer will run this code, and the output of the code will appear to the right. print(6); print(1, 2); Run executes each line once, running from top to bottom print is a function -- like a verb in the code Numbers within the parenthesis ( ... ) are passed in to the print function Multiple values separated by commas Experiments change the code and run after each change see the new output: -Change a number -Add more numbers separated by commas inside the print(...) -Copy the first line and paste it in twice after the last line -I promise our output will get much more interesting! Syntax the code is not free form -Syntax of the code is very limited and strict -A reflection of the inner, mechanical/dumb nature of the computer -Don't be put off - "When in Rome..." -We're visiting the world of the computer Note "print" is not a normal part of Javascript, I added it for CS101 Reminder: Video + Document - pause the video and try it yourself 2. Print String // The line below prints one number and one string print(6, "hi"); print("hello", 2, "bye"); Thus far we have numbers, e.g. 6 A string is a sequence of letters written within quotes to be used as data within the code -e.g. "hello" -Strings work with the print function, in addition to numbers -Strings in the computer store text, such as urls or the text of paragraphs, etc. A comment begins with // and extends through the end of the line. A way to write notes about the code, ignored by the computer. Experiments: -Edit the text within a string -Add more strings separated by commas -Add the string "print" - inside of string is just data, not treated as code Code vs. Data Code = instructions that are Run Data = passive numbers, strings, handled by the code Note that print is recognized as a function in the code vs. the "hello" string which is just passive data (like verbs and nouns) The computer ignores the comments, so they are just a way for you to write notes to yourself about what the code is doing. Comments can be use it to temporarily remove a line of code -- "commenting out" the code, by placing a "//" to its Thinking About Syntax and Errors (key message!) Syntax - code text structured for the computer Very common error - you type in code, with slight syntax problem Professional programmers make that sort of "error" all the time Fortunately, very easy to fix ... don't worry about it Not a reflection of some author flaw Professionals get syntax errors all the time Beginners can be derailed by syntax errors, thinking they are making some big error Examples below to inoculate you: a bunch of typical syntax errors + fixing them Fixing these little errors is a small, normal تفكير في بناء الجملة والأخطاء (رسالة رئيسية!) بناء جملة - نص التعليمات البرمجية منظم للكمبيوتر خطأ شائع جدا - تكتب في التعليمات البرمجية ، مع مشكلة في بناء الجملة طفيفة المبرمجين المحترفين يقومون بهذا النوع من "الخطأ" طوال الوقت لحسن الحظ ، من السهل جدا إصلاح ... لا تقلق بشأن ذلك ليس انعكاسًا لبعض عيوب المؤلف يحصل المحترفون على أخطاء في بناء الجملة طوال الوقت يمكن إخراج المبتدئين عن طريق أخطاء بناء الجملة ، معتقدين أنهم يرتكبون بعض الأخطاء الكبيرة أمثلة أدناه لتلقيحك: مجموعة من الأخطاء اللغوية النموذجية + إصلاحها إصلاح هذه الأخطاء الصغيرة خطوة صغيرة عادية بناء الجملة يجب أن يتبع بناء الجملة الموضح أعلاه بشكل صارم أو لن يعمل الرمز: اسم الوظيفة ، قوس ، كل سلسلة لها علامات اقتباس الفتح والإغلاق ، الفواصل التي تفصل القيم لاستدعاء الوظيفة. صلابة بناء الجملة هي انعكاس لقيود أجهزة الكمبيوتر .. لغتهم الطبيعية ثابتة والميكانيكية. من المهم استيعاب هذا عند العمل مع أجهزة الكمبيوتر ، وأعتقد أن هذا هو المكان الذي يخرج فيه الكثير من الأشخاص عن مساره عن بدء استخدام أجهزة الكمبيوتر. تكتب شيئًا ما يمكن لأي إنسان أن يفهمه ، لكن الكمبيوتر يمكنه فقط فهم الكود الذي يناسب تركيب الجملة الميكانيكية للكمبيوتر. عند الكتابة لجهاز الكمبيوتر ، من الشائع جدًا ارتكاب أخطاء بناء جملة تافهة سطحية في التعليمات البرمجية. معظم المبرمجين الخبراء على الأرض يرتكبون هذا الخطأ طوال الوقت ، ولا يفكرون في شيء. أخطاء بناء الجملة لا تعكس بعض الإستراتيجيات المعيبة من قبل المؤلف. إنها مجرد خطوة طبيعية في ترجمة أفكارنا إلى اللغة الأكثر ميكانيكية للكمبيوتر. كما سنرى أدناه ، فإن إصلاح هذه الأخطاء سريع للغاية. من المهم ألا يتم الخروج عن مسارها بسبب حالات الأخطاء السطحية الصغيرة هذه. للمساعدة في تعليمك الأنماط ، يوجد أدناه العديد من الأمثلة التي توضح الأخطاء النموذجية ، حتى تتمكن من رؤية شكل رسائل الخطأ ومعرفة كيفية إصلاحها. لكل قصاصة من الشفرة أدناه ، ما هو الخطأ؟ في بعض الأحيان تشير رسالة الخطأ التي تم إنشاؤها بواسطة الكمبيوتر إلى المشكلة بدقة ، ولكن في بعض الأحيان تكشف رسالة الخطأ فقط أن الخطأ قد تسبب في إرباك جهاز الكمبيوتر إلى درجة لا يمكن معه إنشاء رسالة خطأ دقيقة. ينتج Firefox حاليًا رسائل الخطأ الأكثر فائدة والتي تشير غالبًا إلى السطر المحدد الذي يحتوي على مشاكل. أمثلة خطأ في بناء الجملة يجب أن تطبع أمثلة التعليمات البرمجية أدناه ، فيما يلي ، ولكن تحتوي جميعها على أخطاء في بناء الجملة. هذه يجب أن تكون سريعة لإصلاحها. ا ب ب ج ج ج طباعة ( "أ")؛ prlnt ("b"، "b")؛ print ("c"، "c"، "c")؛ طباعة ( "أ")؛ طباعة ("ب" ، "ب)" ؛ print ("c"، "c"، "c")؛ طباعة ( "أ")؛ طباعة ("ب" ، "ب") ؛ طباعة ("c" ، "c" ، "c" ؛ طباعة ( "أ")؛ طباعة ("ب" "ب") ؛ print ("c"، "c"، "c")؛ / / هذا له خطأان في بناء الجملة طباعة ( "أ")؛ pront ("b" ، "b") ؛ طباعة ("c" ، "c" ، "c" ؛ طباعة ( "أ")؛ طباعة (، "ب") ؛ print ("c"، "c"، "c")؛ مثال المشكلة قم بتغيير الكود أدناه ، فعند التشغيل ، فإنه ينتج المخرجات التالية: 1 2 مشبك 3 4 طرق طباعة (1 ، "مرحبا") ؛ على سبيل المثال ، المشكلات الموضحة في المحاضرة ، تتوفر الحلول كما هو موضح أدناه. حتى تتمكن من إعادة النظر في المشكلة ، وممارستها ، ولا تزال ترى الحل إذا أردت. عرض الحل التالي: لقد رأينا بعض رموز الطباعة الأساسية وزر Run وكيفية إصلاح أخطاء بناء الجملة ، لذا جربها بنفسك باستخدام التمارين. حدث خطأ على خوادم Stanford Lagunita نأسف ، هذه الوحدة غير متاحة مؤقتًا. يعمل موظفونا لإصلاحها في أسرع وقت ممكن. يرجى مراسلتنا على techsupport@stanfordonline.zendesk.com للإبلاغ عن أي مشاكل أو تعطل. Thinking About Syntax and Errors (key message!) Syntax - code text structured for the computer Very common error - you type in code, with slight syntax problem Professional programmers make that sort of "error" all the time Fortunately, very easy to fix ... don't worry about it Not a reflection of some author flaw Professionals get syntax errors all the time Beginners can be derailed by syntax errors, thinking they are making some big error Examples below to inoculate you: a bunch of typical syntax errors + fixing them Fixing these little errors is a small, normal step Syntax The syntax shown above must be rigidly followed or the code will not work: function name, parenthesis, each string has opening and closing quotes, commas separating values for a function call. The rigidity of the syntax is a reflection of the limitations of computers .. their natural language is fixed and mechanical. This is important to absorb when working with computers, and I think this is where many people get derailed getting started with computers. You write something that any human could understand, but the computer can only understand the code where it fits the computer's mechanical syntax. When writing for the computer, it is very common to make a trivial, superficial syntax mistakes in the code. The most expert programmers on earth make that sort of error all the time, and think nothing of it. The syntax errors do not reflect some flawed strategy by the author. It's just a natural step in translating our thoughts into the more mechanical language of the computer. As we'll see below, fixing these errors is very fast. It's important to not be derailed by these little superficial-error cases. To help teach you the patterns, below we have many examples showing typical errors, so you can see what the error messages look like and see how to fix them. For each snippet of code below, what is the error? Sometimes the error message generated by the computer points to the problem accurately, but sometimes the error message just reveals that the error has so deeply confused the computer that it cannot create an accurate error message. Firefox currently produces the most helpful error messages often pointing to the specific line with problems. Syntax Error Examples The code examples below should print, the following, but they all have syntax errors. These should be quick to fix. a b b c c c print("a"); prlnt("b", "b"); print("c", "c", "c"); print("a"); print("b", "b); print("c", "c", "c"); print("a"); print("b", "b"); print("c", "c", "c"; print("a"); print("b" "b"); print("c", "c", "c"); // This one has two syntax errors print("a"); pront("b", "b"); print("c", "c", "c"; print("a"); print(, "b"); print("c", "c", "c"); Example Problem Change the code below so, when run, it produces the following output: 1 2 buckle 3 4 knock print(1, "hi"); For the example problems shown in lecture, the solutions are available as shown below. So you can revisit the problem, practice with it, and still see the solution if you like. Show Solution Next: We've seen some basic print code and the Run button and how to fix syntax errors, so now try it yourself with the exercises. There has been an error on the Stanford Lagunita servers We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible. Please email us at techsupport@stanfordonline.zendesk.com to report any problems or downtime. |
Skil
|
|
Skill ThreeSed ut perspiciatis unde omnis iste natus error sit voluptatem accusant doloremque laudantium, totam rem.
|