ผู้เขียน หัวข้อ: การตั้งค่าเวปจุมลาเพื่อแสดงโค้ดโปรแกรม  (อ่าน 4298 ครั้ง)

admin

  • Administrator
  • Hero Member
  • *****
  • กระทู้: 706
    • ดูรายละเอียด
    • อีเมล์
การตั้งค่าในจุมล่าเพื่อให้สามารถใส่ JavaScript ได้










*สรุป
-เวลาเขียนบทความให้เลือกเป็น -Use Default-
-เวลาใส่โค้ดโปรแกรมให้เลือก -CodeMirror
« แก้ไขครั้งสุดท้าย: มีนาคม 07, 2014, 10:45:20 PM โดย admin »

admin

  • Administrator
  • Hero Member
  • *****
  • กระทู้: 706
    • ดูรายละเอียด
    • อีเมล์
Re: การตั้งค่าเวปจุมลาเพื่อแสดงโค้ดโปรแกรม
« ตอบกลับ #1 เมื่อ: มีนาคม 09, 2014, 09:35:11 AM »
โค้ดที่แทรกเพื่อแสดง
โค๊ด: [Select]
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src='http://www.praphas.com/displaycode/scripts/shCore.js' type='text/javascript'></script>
<script src='http://www.praphas.com/displaycode/scripts/shBrushJScript.js' type='text/javascript'></script>
<link type="text/css" rel="stylesheet" href="http://www.praphas.com/displaycode/styles/shCoreDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all();</script>
<body style="background: white; font-family: Helvetica">
<pre class="brush: js;">
#include&lt;REGX52.h&gt;
void delay(int n);
void main(void)
{
  unsigned char value=0;
  while(1)
  {
    P0=value; 
    delay(100);
    value++; 
  }
}
/*  delay function
*/
void delay(int n)     
{
  int x,y;
  for(x=0;x&lt;n;x++)
  {
    for(y=0;y&lt;500;y++)
    {
    }   
  }
}
</pre>
« แก้ไขครั้งสุดท้าย: มีนาคม 09, 2014, 09:51:07 AM โดย admin »

admin

  • Administrator
  • Hero Member
  • *****
  • กระทู้: 706
    • ดูรายละเอียด
    • อีเมล์
Re: การตั้งค่าเวปจุมลาเพื่อแสดงโค้ดโปรแกรม
« ตอบกลับ #2 เมื่อ: มีนาคม 09, 2014, 09:49:14 AM »
ทดสอบการแทรกโค้ดใน smf
โค๊ด: [Select]
#include <REGX52.h>
void delay(int n);
void main(void)
{
  unsigned char value=0;
  while(1)
  {
    P0=value; 
    delay(100);
    value++; 
  }
}
/*  delay function
*/
void delay(int n)     
{
  int x,y;
  for(x=0;x<n;x++)
  {
    for(y=0;y<500;y++)
    {
    }   
  }
}
« แก้ไขครั้งสุดท้าย: มีนาคม 09, 2014, 10:23:39 AM โดย admin »